Is there any way to fire a method,when we scroll down from the bottom of a UIWebView ? I have seen many answers but could not find a workable idea :(
当我们从UIWebView的底部向下滚动时,有没有办法解雇方法?我见过很多答案,但找不到一个可行的想法:(
2 个解决方案
#1
1
UIWebView conforms to the UIScrollViewDelegate protocol.
UIWebView符合UIScrollViewDelegate协议。
The protocol defines the scrollViewDidScroll:
(look it up here) method. If you implement it and set your object as the delegate of UIWebView you should get notified if the View scrolls. You can then ask the webview for its contentOffset
and determine whether the scroll was upwards or downwards.
该协议定义了scrollViewDidScroll :(在此查找)方法。如果您实现它并将对象设置为UIWebView的委托,则应在View滚动时收到通知。然后,您可以向webview询问其contentOffset,并确定滚动是向上还是向下。
#2
0
I think you should use method scrollViewDidScroll
of UIScrollViewDelegate
我认为你应该使用UIScrollViewDelegate的方法scrollViewDidScroll
#1
1
UIWebView conforms to the UIScrollViewDelegate protocol.
UIWebView符合UIScrollViewDelegate协议。
The protocol defines the scrollViewDidScroll:
(look it up here) method. If you implement it and set your object as the delegate of UIWebView you should get notified if the View scrolls. You can then ask the webview for its contentOffset
and determine whether the scroll was upwards or downwards.
该协议定义了scrollViewDidScroll :(在此查找)方法。如果您实现它并将对象设置为UIWebView的委托,则应在View滚动时收到通知。然后,您可以向webview询问其contentOffset,并确定滚动是向上还是向下。
#2
0
I think you should use method scrollViewDidScroll
of UIScrollViewDelegate
我认为你应该使用UIScrollViewDelegate的方法scrollViewDidScroll