When I upgrade to iOS 11, the tableview of my app suddenly cannot scroll smoothly. Whenever I scroll (or reloadData
), the tableview will suddenly jump to a random content offset position.
I use mopub's placer to insert ads into tableview and I notice whenever the app performs [tableview reloadData]
, the tableview scroll offset will go wrong and jump to a random position.
After one month after upgrade to iOS 11, I find this discussion: UITableView reload methods show behavior regression in Apple Developer Forums.
It turns out that this weird behavior is caused by [tableview reloadData]
, and mopub ad placer always calls [tableview reloadData]
. Therefore the tableview with mopub ad placer will suffer this problem most.
To solve the problem, just set:
self.tableView.estimatedRowHeight = 0;
self.tableView.estimatedSectionHeaderHeight = 0;
self.tableView.estimatedSectionFooterHeight = 0;
and all scroll and reloadData behavior will be really smooth like iOS 10.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With