• 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
Re: CALayer: Animation using actions property
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CALayer: Animation using actions property


  • Subject: Re: CALayer: Animation using actions property
  • From: "Bhatnagar, Arvin" <email@hidden>
  • Date: Tue, 19 Apr 2011 08:39:37 -0400
  • Acceptlanguage: en-US
  • Thread-topic: CALayer: Animation using actions property

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" <email@hidden>
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 (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:
>.com
>
>This email sent to email@hidden

_______________________________________________

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

References: 
 >CALayer: Animation using actions property (From: "Bhatnagar, Arvin" <email@hidden>)

  • Prev by Date: Does not allow to Uninstall the application when it is running.
  • Next by Date: Re: updating a table without interrupting user editing
  • Previous by thread: CALayer: Animation using actions property
  • Next by thread: Re: CALayer: Animation using actions property
  • Index(es):
    • Date
    • Thread