I have a UIImage view that responds to touch events. I want to cancel the touch sequence, i.e., further calls to touchesMoved:, if the touch goes o
On iOS5 there seems to be a private method in UITouch
-(void)setSentTouchesEnded:(BOOL)ended;
Depending on apple's implementation it could stop sending events
Another way of doing so would be using associative objects
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
if ([(NSNumber *)objc_getAssociatedObject(touch, &outKey) boolValue])
return;
if (sometouchisoutsideofview) {
objc_setAssociatedObject(touch, &outKey, [NSNumber numberWithBool:YES], OBJC_ASSOCIATION_RETAIN);
}
}