//重写UIScrollView的以下三个方法,通过“类别”扩展或是继承自UIScrollView自定义类实现。
- (void)touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event
{
[super touchesBegan:touches withEvent:event];
if ( !self.dragging )
{
[[self nextResponder] touchesBegan:touches withEvent:event];
}
}
- (void)touchesMoved:(NSSet*)touches withEvent:(UIEvent*)event
{
[super touchesMoved:touches withEvent:event];
if ( !self.dragging )
{
[[self nextResponder] touchesMoved:touches withEvent:event];
}
}
- (void)touchesEnded:(NSSet*)touches withEvent:(UIEvent*)event
{
[super touchesEnded:touches withEvent:event];
if ( !self.dragging )
{
[[self nextResponder] touchesEnded:touches withEvent:event];
}
}