I need to get the current scroll开发者_StackOverflowing position of an UIScrollView. How could I do that?
It is the contentOffset property of your UIScrollView that holds the current offset of the content view. Simply add this method to your UIScrollViewDelegate to watch how the value of the contentOffset changes when you scroll:
- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
NSLog(@"contentOffset: %@", NSStringFromCGPoint(self.contentOffset));
}
精彩评论