I fixed my own issue.

It has to do with the timer. In short when using a timer to animate a
layer I was using scheduledTimerWithTimeInterval versus
timerWithTimeInterval. When I use timerWithTimeInterval I then set the
Fire Date and add the timer to three modes: (NSRunLoopCommonModes,
NSDefaultRunLoopMode, NSEventTrackingRunLoopMode). Now when I resize my
view the timer doesn't stall and the animation continues.

This worked for me, and I can only assume that adding the timer to these
other two modes was the solution: NSRunLoopCommonModes /
NSEventTrackingRunLoopMode.

If anybody can explain this further, I am all ears!

Thanks,
Arvin


On 4/18/11 10:49 PM, "Bhatnagar, Arvin" <arvin.bhatna...@verizon.com>
wrote:

>Hi All,
>
>This is probably a simple question for someone other than I.
>
>I have a very simple CALayer which is a simple plain layer with a white
>background. I then create a CABasicAnimation and add it to the actions
>property to animate the @"opacity". From here I setup a timer to fire and
>toggle the opacity between 0 and 1 which animates.
>
>My issue is, when I go to resize the window the animation halts. Anybody
>know why this occurs and if I can allow the animation to continue even if
>I resize the view that the layer resides in? It's probably something
>small and simple, but just don't know what it is and can't find it in the
>documentation.
>
>Oh yeah, my later tree is setup as such:
>
>[CALayer rootLayer]
>[view setWantsLayers:YES]
>[[view layer] addSublayer:mBasicLayer]
>
>Thanks,
>Arvin
>_______________________________________________
>
>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:
>http://lists.apple.com/mailman/options/cocoa-dev/arvin.bhatnagar%40verizon
>.com
>
>This email sent to arvin.bhatna...@verizon.com

_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Reply via email to