UIScroll View Delegate not calling ScrollViewDidEndScrollingAnimation
-
21-09-2019 - |
Question
I have implemented the UIScrollViewDelegate
protocol in my .h file and i have implemented the
- (void)scrollViewDidEndScrollingAnimation:(UIScrollView *)scrollView
method in my .m class. when the scrolling is done in my table view other delegate method of scrollview are getting called, but when scrolling ends, -scrollViewDidEndScrollingAnimation:
is not getting called. I am bit stuck in this.
Thanks and regards
Solution
-scrollViewDidEndScrollingAnimation:
is called when a programmatic-generated scroll finishes.
-scrollViewDidEndDecelerating:
is called when a user-swipe scroll finishes.
OTHER TIPS
I had the same problem ... Try using scrollViewDidEndDecelerating
instead.
Had the same problem. Have used the following in my delegate class:
#pragma mark -
#pragma mark UIScrollViewDelegate
- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView {
NSLog(@"lol");
}
works like a charm!
I had the same problem and the issue was i did not include the delegate code:
self.myScrollView.delegate=self;
Hope this helps someone as well.
Swift?
func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) {
}