【发布时间】:2011-08-01 02:51:49
【问题描述】:
我正在检测我的 UIView 上的触摸。 在某些情况下,我想取消触摸,这样 touchesEnded 就不会被调用。但是无论 touchesEnded 总是会被调用吗?
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
if (SOMETHING_SPECIAL)
{
[super touchesCancelled:touches withEvent:event];
}
}
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{
//I don't want it to get here if touches were canceled how can i do this?
}
- 在我的 touchesEnded 中,我如何确定触摸是否被取消?
【问题讨论】:
标签: ios objective-c iphone uitouch touchescancelled