Re: animated button
Re: animated button
- Subject: Re: animated button
- From: Andrew Thompson <email@hidden>
- Date: Mon, 6 Feb 2006 21:56:02 -0800
On Feb 6, 2006, at 1:57 PM, Ricky Sharp wrote:
On Feb 6, 2006, at 1:56 PM, Andrew Thompson wrote:
I would like to make a button with an animated background. Does
anyone have advice on the best way to go about this?
NSTimer? When it fires you can basically do something like this:
[self incrementFrameIndex];
[self setNeedsDisplay:YES];
In your draw routine, draw the current frame.
Note that you can set up the timer to either suspend or continue to
fire during tracking events. Not sure what your needs are in that
respect.
Thanks. I guess what I was wondering more specifically is how to
organize it: should I subclass NSButton, or make my own animated custom
view class, or make a transparent button over a custom view? Or is
there some other better way?
~Andrew
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden