how to set tablecell row height automatically based on inner view outlet?

假装没事ソ 提交于 2019-12-14 03:22:09

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!