我想知道如何停止我的 sublass o UIScrollView 无法正常工作:
- (void) touchesShouldBegin:(NSSet *)touches withEvent:(UIEvent *)event inContentView:(UIView *)view {
if ([touches count] == 2) {
[super touchesShouldBegin:[touches anyObject] withEvent:event inContentView:view];
}
else {
//How do I stop it completely from using one touch?
}
}
我只希望它在它有 2 触动我不想做的所有其他事情时采取行动。或者更好的是,如果你能告诉我如何将 else 语句中的触摸传递给 UIView:
UntitledViewController.otherView
如果你能告诉我如何做到这一点,那么我会很高兴。