Re: layer contents briefly appearing stretched when resizing
Re: layer contents briefly appearing stretched when resizing
- Subject: Re: layer contents briefly appearing stretched when resizing
- From: Matt Neuburg <email@hidden>
- Date: Tue, 1 Feb 2011 13:53:46 -0800
On Tue, 1 Feb 2011 20:32:27 +0800, Roland King <email@hidden> said:
>I have a UIView subclass in my iOS app and the content for that UIView is 3 CALayers, each with a bitmap image for their content, added as sublayers of the UIView's layer. Each of the CALayers is the full size of the UIView's layer (they have transparency to composite them together).
>
>When the UIView is resized the setFrame: method is called and I have a custom implementation of that which sets the bounds of the sublayers so they again fill the UIView's layer, and draws a new bitmap for each of them of the right size and sets it into their contents.
>
>However, when I resize, there's a brief flash of the current content, before it's been redrawn
Just going with a seat-of-the-pants reaction here, but perhaps the problem is that setFrame: is just the wrong time to do this. What if you implement layoutSublayersOfLayer: in the UIView subclass?
m.
--
matt neuburg, phd = email@hidden, <http://www.apeth.net/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
http://www.apeth.net/matt/default.html#applescriptthings_______________________________________________
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