美文网首页
重写UIScrollView touchesShouldCanc

重写UIScrollView touchesShouldCanc

作者: fallrainy | 来源:发表于2017-01-20 15:21 被阅读319次
// default returns YES if view isn't a UIControl
// Returns whether to cancel touches related to the content subview and start dragging.
- (BOOL)touchesShouldCancelInContentView:(UIView *)view{ 
       // 即使触摸到的是一个 UIControl (如子类:UIButton), 我们也希望拖动时能取消掉动作以便响应滚动动作
       return YES;
}

相关文章

网友评论

      本文标题:重写UIScrollView touchesShouldCanc

      本文链接:https://www.haomeiwen.com/subject/gcowbttx.html