UITextViewis a subclass UIScrollViewthat has a class UIScrollViewDelegatefor controlling scroll behavior. One of his methods is scrollViewDidEndDecelerating. You can configure your view controller to this protocol, set your UITextView delegateproperty to the view controller, and then implement the method scrollViewDidEndDecelerating. When the method is called, it UITextViewwill complete the scroll. eg:.
in .h:
@interface MyViewController : UIViewController <UIScrollViewDelegate>
in .m:
- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
{
NSLog(@"Finished scrolling");
}
source
share