问题
I want to set tableview cell height automatically to show the label completely without happening like that?
Any help?
回答1:
There are 2 things that you need to do:
1st thing: Set AutoLayout for it. 2nd thing: implement these code:
self.tableView.rowHeight = UITableViewAutomaticDimension
self.tableView.estimatedRowHeight = 100
You can see more from my project: https://github.com/khuong291/Yelp
来源:https://stackoverflow.com/questions/33891244/how-to-set-tablecell-row-height-automatically-based-on-inner-view-outlet