简体   繁体   中英

Xcode TableView Cell dynamic heights with UITableViewAutoDimension

So, I have an issue that seems to have cropped up after having updated the Xcode program on my Mac. I have a tableView that houses an image and subsequent comments underneath, which are initially offscreen until you scroll down and then they load up. The issue I seem to be having is that the cells wont adjust their heights respectively unless I first scroll down to get them loaded, scroll up and then down again. Only then will the UITableViewAutoDimension seem to take effect.

Any suggestions? My auto-laying is exactly how it should be to accommodate dynamic heights of UILabels.

Let me know if more information is needed.

Cheers in advance.

So after about 10 hours of pulling my hair out and literally debugging to sh*t, I found that I had 'use size classes' selected along with 'use auto constraints' which was completely destroying any chance of the table cells from resizing first time. I switched 'use size classes' off in the interface builder document and it seems to have resolved the issue. All I can say is thank f**k! 👍

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