重写UIScrollView touchesShouldCanc

2017-01-20  本文已影响319人  fallrainy
// 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;
}
上一篇 下一篇

猜你喜欢

热点阅读