in iOS 8, I have a UILabel
in a UITableViewCell
. I want the cell to have dynamic height according to UILabel
's text. It works fine. But when the text is a empty string, it seems has a default height, but I want it to be zero.
Here is what I've done:
- set cell's constraints using
masonry
. settop
,bottom
constraint. - set
tableView.estimatedHeight
- return
UITableViewAutomaticDimension
forheightForRow
delegate method
So did I do anything wrong? Any help?