The same behaviour can be noticed in demo app: add leftNavBarItem "Up", which will handle tap as
tableView.setContentOffset(CGPoint(x: 0, y: -tableView.contentInset.top), animated: true)
for example. Scroll by finger to bottom, wait till fetching will be completed, then tap "Up" button and you will end up with messed contentOffset. When I was debugging this in my project I noticed that swizzled method pb_setContentOffset wasn't logging last values, i.e. contentSize was (375, 12000), contentOffset was (0, 6000), after setContentOffset (or scrollRectToVisivle with (0,0,tableView.frame.size.width, 1.0)) final log in pb_setContentOffset was like ±600, and it was the exact position according to View Debugger. Second tap when have an offset of 600 is driving contentOffset to be correct. Any thoughts or workarounds?
The same behaviour can be noticed in demo app: add leftNavBarItem "Up", which will handle tap as
tableView.setContentOffset(CGPoint(x: 0, y: -tableView.contentInset.top), animated: true)for example. Scroll by finger to bottom, wait till fetching will be completed, then tap "Up" button and you will end up with messed
contentOffset. When I was debugging this in my project I noticed that swizzled methodpb_setContentOffsetwasn't logging last values, i.e.contentSizewas (375, 12000),contentOffsetwas (0, 6000), aftersetContentOffset(orscrollRectToVisivlewith (0,0,tableView.frame.size.width, 1.0)) final log inpb_setContentOffsetwas like ±600, and it was the exact position according to View Debugger. Second tap when have an offset of 600 is driving contentOffset to be correct. Any thoughts or workarounds?