UITableViewCell with dynamic height iOS

前端 未结 12 2353
日久生厌
日久生厌 2020-11-27 17:54

I have implemented TableView with CustomCell in my app,

I want dynamic height of my UITableViewCell according to text length in UITableViewCell

12条回答
  •  没有蜡笔的小新
    2020-11-27 18:49

    If you want to constrain the maximum height to 100 pt you have to use MIN instead on MAX:

    CGFloat height = fmin(size.height, 100.0);
    

提交回复
热议问题