TableView reloadData after contentSize inaccurate

The reason UITableView's Self-Sizing. And automatically calculate property

 

Before iOS11 Self-Sizing is off by default and after a default Self-Sizing.

 

For performance, instead of using the estimated value to determine the exact contentsize. Therefore, after estimatedRowHeight, estimatedSectionHeaderHeight, estimatedSectionFooterHeight UITableViewAutomaticDimension from 0 to the height, contentSize gone wrong.

 

Solution Set estimatedRowHeight, estimatedSectionHeaderHeight, estimatedSectionFooterHeight zero.

 

Global alternative to using Runtime:

https://blog.csdn.net/Nathan1987_/article/details/78432585

Guess you like

Origin www.cnblogs.com/jisa/p/10943680.html