如何配置uiscrollview当数据到达最低点时加载数据 [英] How to configure uiscrollview to load data, when it reaches the bottom point
问题描述
我正在制作一个应用程序,就像 Instagram ,路径,等等。我需要知道触发点,用户在何处滚动到最低点以及何时滚动到最低点弹跳,我需要打一些电话。如何获得该触发点?
I am making an application, just like Instagram, Path, etc. I need to know, trigger point, where, if the user scrolls to the bottom point and when it bounces, I need to make some calls. How do I get that trigger point?
推荐答案
看看UIScrollviewDelegate方法: http://developer.apple.com/library/ios/#documentation/uikit/ reference / uiscrollviewdelegate_protocol / Reference / UIScrollViewDelegate.html
Take a look at the UIScrollviewDelegate methods: http://developer.apple.com/library/ios/#documentation/uikit/reference/uiscrollviewdelegate_protocol/Reference/UIScrollViewDelegate.html
您可能想看看 – scrollViewDidEndDragging:willDecelerate:
和 – scrollViewDidEndDecelerating:
,然后在这些方法中使用 scrollView.bounds
来检查滚动视图的当前可见矩形。找出用户是否已滚动到底部。
You probably want to look at – scrollViewDidEndDragging:willDecelerate:
and – scrollViewDidEndDecelerating:
and then inside those methods check the current visible rect of the scrollview using scrollView.bounds
to find out if the user has scrolled to the bottom.
这篇关于如何配置uiscrollview当数据到达最低点时加载数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!