• 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
Syncing CATiledLayer drawInContext: with setAffineTransform:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Syncing CATiledLayer drawInContext: with setAffineTransform:


  • Subject: Syncing CATiledLayer drawInContext: with setAffineTransform:
  • From: Dave Fernandes <email@hidden>
  • Date: Fri, 01 Mar 2013 17:43:43 -0500

I'm using a CATiledLayer to plot a stream of data points in real-time on iOS 6. When the user pinches to zoom in either X or Y, I need to zoom the plot. To avoid lots of flashing during redraws, I use an affine transform *during* the zoom gesture, but then redraw the plot after the gesture is complete.

This works, but there is an instant where I need to transition from the zoomed-by-transform plot to the zoomed-by-redrawing plot. Where is the appropriate place to reset the transform to the identity transform? Doing it in drawInContext: seems to work most but not all of the time (sometimes it flashes or fails to redraw correctly - presumably a race condition). Ditto for a dispatch_async to the main queue.

Note: all drawing in drawInContext is done using CGContextXXX methods.

I am going about this the wrong way?

Thanks,
Dave
_______________________________________________

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

  • Prev by Date: Re: Documents not opening from Finder
  • Next by Date: Re: Documents not opening from Finder
  • Previous by thread: Re: Documents not opening from Finder
  • Next by thread: Core Text attributed strings and NSTextField incompatibility
  • Index(es):
    • Date
    • Thread