I am experiencing increasing lag in calls to touchesMoved / touchesEnded with UIViewConrtoller when simultaneously moving one finger on screen while same time moving Apple Pencil.
Xcode 8.0 beta 6.
Ipad Pro 9.7" running iOS 9.3.5.
Easiest repro is to create a new project, choose Game template, Objective-C language and Metal as game technology.
Then add these lines to GameViewController.m before viewDidLoad (for example):
static int counter = 0;
- (void) touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
printf( "touchesBegan %i\n", counter++ );
}
- (void) touchesMoved:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
printf( "touchesMoved %i\n", counter++ );
}
- (void) touchesEnded:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
printf( "touchesEnded %i\n", counter++ );
}
Now, if you run the app and move one or more fingers on screen, you get plenty of touchesMoved event with increasing counter.
When you lift your fingers, you'll get touchesEnded event immediately. Same happens if you only move Apple Pencil.
However, if you move one (or more) finger on screen same time when you move pencil on screen, you'll get plenty of touchesMoved as you should, but when you lift your fingers and pencil from screen, you'll still receive plenty touchesMoved events like they would be queued/lagging somehow. The longer you move both finger and pencil simultaneously before lifting them up, the more the touch events gets queued and lagged. The app is running always 60fps.
Can anyone reproduce this or have any knowledge why this is happening and how it could be fixed?
Thanks,
Kim