I want to find page number in scroll view consisting of uiimage view.
Inside the m开发者_StackOverflow中文版ethod, - (void)scrollViewDidScroll:(UIScrollView *)sender
on logging it shows sender value properly i.e everything about scroller correct,
but for calculation when i use sender.contentOffSet.x
then it shows null
Thanks.
Try using following method of UIScrollViewProtocol
- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
Default value if contentSize is zero....see following details from apple documentation.
contentOffset The point at which the origin of the content view is offset from the origin of the scroll view.
Discussion The default value is CGPointZero.
contentSize The size of the content view.
Discussion The unit of size is points. The default size is CGSizeZero. Related Sample Code QuartzDemo
精彩评论