• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
iOS 7 GUI update lag during drag touches
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

iOS 7 GUI update lag during drag touches


  • Subject: iOS 7 GUI update lag during drag touches
  • From: Carl Hoefs <email@hidden>
  • Date: Thu, 03 Oct 2013 12:47:50 -0700

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 (email@hidden)

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:

This email sent to email@hidden


  • Follow-Ups:
    • RE: iOS 7 GUI update lag during drag touches
      • From: Julius Oklamcak <email@hidden>
    • Re: iOS 7 GUI update lag during drag touches
      • From: Carl Hoefs <email@hidden>
  • Prev by Date: Re: How to get a "Normal" button in iOS 7/IB
  • Next by Date: Re: iOS 7 GUI update lag during drag touches
  • Previous by thread: Re: How to get a "Normal" button in iOS 7/IB / One Solution
  • Next by thread: Re: iOS 7 GUI update lag during drag touches
  • Index(es):
    • Date
    • Thread