Re: Creating a small timer?
Re: Creating a small timer?
- Subject: Re: Creating a small timer?
- From: Jens Alfke <email@hidden>
- Date: Mon, 9 Nov 2009 10:53:55 -0800
On Nov 9, 2009, at 9:19 AM, Michael Abendroth wrote:
How can I create such a timer? I mean, it probably isn't very
efficient to redraw the whole view every second just to get the timer
to update.
Drawing a view once a second shouldn't be a problem. Look at all the
stuff iTunes' pseudo-LCD status view updates multiple times a second
while a track is playing.
It's always a good idea to tell the view to redraw only the bounding
box of the area that needs to update, though.
But is creating a separate thread just for the timer necessary (I
doubt that)?
Don't create a thread. Use an NSTimer.
—Jens_______________________________________________
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