UIScrollView on scroll update method
2 answers
UIScrollViewDelegate
provides the following:
– scrollViewDidScroll:
– scrollViewWillBeginDragging:
– scrollViewDidEndDragging:willDecelerate:
– scrollViewShouldScrollToTop:
– scrollViewDidScrollToTop:
– scrollViewWillBeginDecelerating:
– scrollViewDidEndDecelerating:
in particular:
– scrollViewDidScroll:
+4
a source to share
Thanks a lot for the scrollViewDidScroll tip. sample trial implementation:
@interface YourClass : UIViewController <UIScrollViewDelegate>
{
UIScrollView *theView;
}
@end
in the .m file:
- (void)loadView
{
theView = [[UIScrollView alloc] initWithFrame:
CGRectMake(0, 10, 300, 300)];
theView.delegate = self;
[self.view addSubview:theView];
theView.contentSize = CGSizeMake(500, 500);
}
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
{
NSLog(@"SCROLL SCROLL SCROLL YOUR BOAT");
}
+2
a source to share