iOS 6.1.3 & 7.0.2, newb!

I'm seeing an unacceptable lag in my iOS app on drag touches, from when a 
finger is dragged across the screen to when my code updates the screen. I can't 
figure out what is causing the lag.

Here's my setup. I have a -touchesBegan:withEvent: method in my view controller 
that gets invoked via callback from the GUI when a finger touch occurs. My code 
displays a tiny dot on the GUI beneath the user's fingertip that is supposed to 
track with the user's touch in real time.

-(void) -touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
    CGPoint apoint=[[touches anyObject] locationInView:[self view]];
    [layer setPosition:apoint];
}

The 'layer' variable is defined as:

    CALayer *layer=[[CALayer alloc]init];
    [layer setDelegate:self];
    [layer setBounds:CGRectMake(0,0,5,5)];  // a tiny "dot"
    
This all works well except when the user makes large, sweeping touches (say 
dragging a fingertip across the entire screen). In this case, the update 
drawing of the dot lags a second or two behind, which is unacceptable.

So I'm wondering how to handle this. FWIW, adding a [super touchesBegan:touches 
withEvent:event] to the above callback method didn't change the behavior.

- Carl



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to