Or, if you had a sequence of CGImages you wanted to show in a loop,
you could do this to kick off the animation.

    CAKeyframeAnimation *animation = [CAKeyframeAnimation
animationWithKeyPath:@"contents"];
    animation.calculationMode = kCAAnimationDiscrete;
    animation.values = arrayOfCGImageFrames;
    animation.duration = PERIOD;
    animation.repeatCount = FLT_MAX;

    [[self layer] addAnimation:animation forKey:@"MyAnimation"];

-Ken

On Tue, Feb 26, 2008 at 3:50 PM, Bill Dudney <[EMAIL PROTECTED]> wrote:
> Hi,
>
>  Sure...
>
>  Make 2 layers one is the 'background' the other is the button (think
>  the 'on/off' switch in time machine prefs pane)
>  when the user clicks the button you switch it to the on or off
>  position with buttonLayer.position = oppositePosition (a CGPoint)
>
>  make sense?
>
>  If not please feel free to ping and I'd be glad to elaborate.
>
>  TTFN,
>
>
>
>  -bd-
>  http://bill.dudney.net/roller/objc
>
>
>
> On Feb 26, 2008, at 11:49 AM, I. Savant wrote:
>
>  >> I'd suggest core animation as the easiest route but i'm sort of
>  >> partial.
>  >
>  >  For my own enlightenment, can you outline generally how this would
>  > be accomplished with Core Animation? I'm very interested.
>  >
>  > --
>  > I.S.
>
>  _______________________________________________
>
>  Cocoa-dev mailing list ([email protected])
>
>  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/kenferry%40gmail.com
>
>  This email sent to [EMAIL PROTECTED]
>
_______________________________________________

Cocoa-dev mailing list ([email protected])

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 [EMAIL PROTECTED]

Reply via email to