Re: Custom images with NSProgressIndicator
Re: Custom images with NSProgressIndicator
- Subject: Re: Custom images with NSProgressIndicator
- From: "Alan Smith" <email@hidden>
- Date: Tue, 21 Nov 2006 16:37:38 -0500
It's simple. I'm making a theme kit (a framework to skin apps) and
I've overriden NSProgressIndicator so I know how to help you. Here is
the code:
- (void)drawRect:(NSRect)rect
{
rect = [self bounds];
// Do some spiffy drawing!
}
- (void)redrawWithTimer:(NSTimer*)timer
{
[self drawRect: NSZeroRect];
}
- (void)startAnimation:(id)sender
{
animationTimer = [[NSTimer scheduledTimerWithTimeInterval: 0.5
target: self selector: @selector(redrawWithTimer:) userInfo: nil
repeats: YES] retain];
[animationTimer fire];
}
- (void)stopAnimation:(id)sender
{
[animationTimer invalidate];
[animationTimer release];
}
There you go. And if you want to help me with my SkinKit let me know,
I'd love help.
Peace, Alan
--
// Quotes from yours truly -------------------------
"You don't forget, you just don't remember."
"Maturity resides in the mind."
"Silence is the Universe's greatest gift."
"When the World realizes that religion really is unnecessary, then it
shall evolve."
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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