diff --git a/ios/ViewController.mm b/ios/ViewController.mm index b1bb24a6a9..0be72eecb7 100644 --- a/ios/ViewController.mm +++ b/ios/ViewController.mm @@ -344,6 +344,17 @@ static GraphicsContext *graphicsContext; } } +- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event +{ + for(UITouch* touch in touches) + { + CGPoint point = [touch locationInView:self.view]; + NSDictionary* dict = [self touchDictBy:touch]; + [self touchX:point.x y:point.y code:2 pointerId:[[dict objectForKey:@"index"] intValue]]; + [self.touches removeObject:dict]; + } +} + - (void)bindDefaultFBO { [(GLKView*)self.view bindDrawable];