开发者

Is contentOffset the right property to determine the scrolling position of the scroll view?

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));
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜