简体   繁体   中英

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

I want to set tableview cell height automatically to show the label completely without happening like that?

在此处输入图片说明

Any help?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM