如何立即响应scrollview上的子视图的手势
1个回答
2016-08-13 · 做真实的自己 用良心做教育
千锋教育
千锋教育专注HTML5大前端、JavaEE、Python、人工智能、UI&UE、云计算、全栈软件测试、大数据、物联网+嵌入式、Unity游戏开发、网络安全、互联网营销、Go语言等培训教育。
向TA提问
关注
展开全部
-(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
NSLog(@"PageScrollView Touch begin");
if(!self.dragging)
{
[[self nextResponder] touchesBegan:touches withEvent:event];
}
[super touchesBegan:touches withEvent:event];
}
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
NSLog(@"PageScrollView Touch Move");
if(!self.dragging)
{
[[self nextResponder] touchesMoved:touches withEvent:event];
}
[super touchesMoved:touches withEvent:event];
}
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{
NSLog(@"PageScrollView Touch End");
if(!self.dragging)
{
[[self nextResponder] touchesEnded:touches withEvent:event];
}
[super touchesEnded:touches withEvent:event];
}
{
NSLog(@"PageScrollView Touch begin");
if(!self.dragging)
{
[[self nextResponder] touchesBegan:touches withEvent:event];
}
[super touchesBegan:touches withEvent:event];
}
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
NSLog(@"PageScrollView Touch Move");
if(!self.dragging)
{
[[self nextResponder] touchesMoved:touches withEvent:event];
}
[super touchesMoved:touches withEvent:event];
}
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{
NSLog(@"PageScrollView Touch End");
if(!self.dragging)
{
[[self nextResponder] touchesEnded:touches withEvent:event];
}
[super touchesEnded:touches withEvent:event];
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询