Reputation: 323
After fetch data,i reload tableview. I use automatic dimension don't override heightForRowAtIndexPath like below
self.tableView.estimatedRowHeight = 200;
self.tableView.rowHeight = UITableViewAutomaticDimension;
Everything is ok in iOS9. But in iOS8 appear like following link until scroll. iOS8 appear
I tried:
[_tableView setNeedsLayout];
[_tableView layoutIfNeeded];
[_tableView reloadData];
After that occur else ui issue in iPhone 6Plus. Upvotes: 1
Views: 946
Reputation: 27448
Try to reload data in viewDidappear
or viewWillappear
and check your constraints that it is perfect or not because UITableViewAutomaticDimension
strongly recommended autolayout.
Update :
According to comments try to add this two line in cellforrowAtindexpath
[cell layoutIfNeeded];
[cell updateConstraintsIfNeeded];
In order to make UITableViewAutomaticDimension work you have to set all left, right, bottom, and top constraints relative to cell container view. If you missing like this then check that
hope this will help :)
Upvotes: 1