In the method - (void)scrollViewDidScroll:(UIScrollView *)sender
I tried to NSLog
an integer and it NSLog
the integer more than one time when I scroll.
Is there's any way to NSLog the integer just one time?
Use the UIScrollViewDelegate method scrollViewWillBeginDragging:
to get only when the scroll starts. It is not called constantly like scrollViewDidScroll:
is.
Here are the other UIScrollViewDelegate methods if you are interested:
– scrollViewDidScroll:
– scrollViewWillBeginDragging:
– scrollViewWillEndDragging:withVelocity:targetContentOffset:
– scrollViewDidEndDragging:willDecelerate:
– scrollViewShouldScrollToTop:
– scrollViewDidScrollToTop:
– scrollViewWillBeginDecelerating:
– scrollViewDidEndDecelerating: