重写UIScrollView touchesShouldCancelInContentView方法的意义

// 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 touchesShouldCancelInContentView方法的意义)