• 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: Animated button
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Animated button


  • Subject: Re: Animated button
  • From: "Ken Ferry" <email@hidden>
  • Date: Tue, 26 Feb 2008 20:51:06 -0800

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@hidden> 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@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
>
_______________________________________________

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: 
 >Animated button (From: Micha Fuhrmann <email@hidden>)
 >Re: Animated button (From: Bill Dudney <email@hidden>)
 >Re: Animated button (From: "I. Savant" <email@hidden>)
 >Re: Animated button (From: Bill Dudney <email@hidden>)

  • Prev by Date: NSTextField and NSTextAttachment
  • Next by Date: Re: - outlineView:willDisplayCell:forTableColumn:item: and selected item
  • Previous by thread: Re: Animated button
  • Next by thread: Re: Animated button
  • Index(es):
    • Date
    • Thread