Is there a way to simulate a scrollViewDidScrollTo

2019-05-11 11:32发布

问题:

I would like to make an infinite scrolling on a UITableViewController, I'm using the scrollViewDidScroll: method to check the contentOffset, however I'm not able to drill down an offset that would be the bottom of the ScrollView.

Any suggestions?

Thanks in advance.

回答1:

Assuming contentSize.height > bounds.size.height

if ( contentOffset.y >= contentSize.height - bounds.size.height ) { ... }