Skip navigation.
 
mlRe: CoreAnimation removeFromSuperlayer flicker
FROM : Brian Christensen
DATE : Mon Jun 16 21:59:39 2008

On Jun 14, 2008, at 2:29 , Milen Dzhumerov wrote:

>>> I've got a root layer which has got a solid background and I've 
>>> got one sublayer. If I call removeFromSuperlayer on the sublayer 
>>> when the root layer is small in size, it removes itself with 
>>> animation and there are no problems. But if I increase the size of 
>>> the window (the hosting view and the root layer consequently 
>>> increase their size as ewll) and remove the sublayer again, I can 
>>> see that the root layer changes to become all white for a fraction 
>>> of a second and then goes back to normal (the sublayer is removed 
>>> with animation normally). Are there any reasons for the flicker 
>>> (e.g. wrong usage of removeFromSuperlayer)?

>>
>> How large is your root layer when you start seeing the flickering?

>
> Probably about  700x500.


Have you tried using an explicit animation to set the opacity property 
to 0.0 and then upon completion of said animation (by implementing the 
appropriate delegate method) remove the sublayer? Maybe that will 
eliminate the flickering by fading it out before actual removal.

/brian

Related mailsAuthorDate
mlCoreAnimation removeFromSuperlayer flicker Milen Dzhumerov Jun 14, 16:28
mlRe: CoreAnimation removeFromSuperlayer flicker Brian Christensen Jun 14, 19:50
mlRe: CoreAnimation removeFromSuperlayer flicker Milen Dzhumerov Jun 14, 20:29
mlRe: CoreAnimation removeFromSuperlayer flicker Brian Christensen Jun 16, 21:59