• 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: Ricky Sharp <email@hidden>
  • Date: Mon, 6 Feb 2006 15:57:08 -0600


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.
___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Instant Interactive(tm) http://www.instantinteractive.com


_______________________________________________
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


  • Follow-Ups:
    • Re: animated button
      • From: Andrew Thompson <email@hidden>
References: 
 >animated button (From: Andrew Thompson <email@hidden>)

  • Prev by Date: NSTextField, NSSecureTextField, and custom formatters
  • Next by Date: Setting screen brightness
  • Previous by thread: animated button
  • Next by thread: Re: animated button
  • Index(es):
    • Date
    • Thread