IBPlugin with Core Animated button.

2010-06-23 Thread Alexander Zvyagin
Hi, All! I'm try to making Core Animated button encapsulated to Interface Builder Plugin. >From inside, this button is NSControl created as layer-backed NSView and >filled with CALayers. All images of button states are draw by CALayers using mouseEvents (not by a simple drawRect

Re: Animated button

2008-02-27 Thread I. Savant
> The Core Animation Programming guide has some sample code that might > be of value: > >

Re: Animated button

2008-02-27 Thread douglas a. welton
On Feb 26, 2008, at 1:49 PM, 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. The Core Animation Programming guide has some

Re: Animated button

2008-02-26 Thread Ken Ferry
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 = arrayOfCGImageF

Re: Animated button

2008-02-26 Thread Bill Dudney
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

Re: Animated button

2008-02-26 Thread I. Savant
> 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 (Cocoa-dev@lis

Re: Animated button

2008-02-26 Thread Bill Dudney
Hi Micha, I'd suggest core animation as the easiest route but i'm sort of partial. HTH, -bd- http://bill.dudney.net/roller/objc On Feb 26, 2008, at 8:37 AM, Micha Fuhrmann wrote: Hi everyone, what is the simplest way to implement an animated button (the animation should star

Re: Animated button

2008-02-26 Thread Bill Dudney
Hi Micha, I'd suggest core animation as the easiest route but i'm sort of partial. HTH, -bd- http://bill.dudney.net/roller/objc On Feb 26, 2008, at 8:37 AM, Micha Fuhrmann wrote: Hi everyone, what is the simplest way to implement an animated button (the animation should star

Re: Animated button

2008-02-26 Thread I. Savant
> I've tried with a animated gif, unfortunately when pressed it doesn't > start the animation. That's because NSButtonCell really doesn't have the ability to animate an image on its own. The simplest setup is to use NSTimer to periodically 'advance' the frame of your animation by setting a new

Animated button

2008-02-26 Thread Micha Fuhrmann
Hi everyone, what is the simplest way to implement an animated button (the animation should start as it is pressed)? I've tried with a animated gif, unfortunately when pressed it doesn't start the animation. I'm thinking in the line of replacing the button image frame by f