Closed NikKovIos closed 8 years ago
Yes there is an issue with that, we force content size recalculation to make sure that scroll offset remains the same if more content is added, otherwise it tends to bounce back, layout calculations usually happen too late when they happen on their own.
That does not seem to be the case for cells with fixed height.
Maybe instead of forcing content size we could fix content offset, need to play with it.
Relevant hack we use to force update content size:
I figured out, that this problem is because of UITableViewAutomaticDimension. When i implemented fixed height for cell everything is all right. Also i figured out, that when table fully scrolled down - contentSize is, for example, 1000. All cell fitted content and result tableV content size is 1000.
Want to tell you, that your code style is good (IMHO), i like it =)
@NikKovV
Thanks :-)
Yes, self-sizing cells have been giving me a lot of pain, not only with infinite scroll. Unfortunately we don't have full control over table views and timing is not always right, so sometimes things may not look as smooth.
What was the thing with reloadData? Do you add new rows into table view or simply reload everything?
In realm [tableView reloadData] called, every time any realm object updates. So when it added new rows, it has been called.
@NikKovV normally to run animations properly you should batch updates, reloadData looks more like a hard reset to me, but I don't know if Realm has anything similar to FRC that would allow to receive incremental updates from store.
Feel free to reopen, but I guess at this point we can't do anything with table view.
When calling finishInfiniteScroll, tableView's content size changing, so when i drag up - table view lagging, becouse, i think, it recalculating size. For note: i use UITableViewAutomaticDimension for calculating row height.