2012-03-07 116 views
3

我基本上想要检测用户何时滚动并从屏幕上移除他的手指。这个最简单的东西是什么?我想使用的:检测用户触摸UIScrollView

-(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event; 
{ 
    NSLog(@"TOUCH ENDED"); 
} 

,但我把这个在我的UIViewController,但它不会被调用

回答

6

有关使用UIScrollViewDelegate功能

(void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate 

调用此方法如何当用户在拖动滚动视图后抬起手指时。 请参阅:UIScrollViewDelegate Documentation