Re: Drawing an NSProgressIndicator inside a custom view
Re: Drawing an NSProgressIndicator inside a custom view
- Subject: Re: Drawing an NSProgressIndicator inside a custom view
- From: Chris Pavicich <email@hidden>
- Date: Mon, 09 Feb 2004 17:16:19 -0500
Alexander:
I am assuming that you are building your UI in IB, not creating it in code.
The progress indicator is on the Cocoa-Controller palette. Just drag it from there
to your view. There is a binding to support having the indicator disappear when
its not in use.
The animation itself is fairly simple. If you are using an indeterminate indicator, call
- (void) startAnimation as you begin to load the file and
- (void) stopAnimation after the file is fully loaded.
You may also need the PI to run in its own thread. If that the case call:
- (void)setUsesThreadedAnimation:TRUE
but remember that there will be a performance hit for using extra thread.
HTH
--CMP
On Monday, February 09, 2004, at 04:45PM, Alexander Griekspoor <email@hidden> wrote:
>
Hi!
>
>
What I would like to do is simulate the behavior iPhoto 4 shows while
>
loading the library. You see a white view with the text "loading" and
>
under it a spinning progressindicator. I have a custom view which I
>
want to do the same while it loads the document. But how would one draw
>
the spinning indicator in my own view? Should you add it as a subview,
>
or can you just call drawrect on the indicator inside of my custom
>
view's drawrect. I guess in the latter case I have to repeatedly draw
>
my view to see the spinning... Any clues? Did anyone do something like
>
this before?
>
Many thanks in advance!
>
Alex
>
>
**************************************************************
>
** Alexander Griekspoor **
>
**************************************************************
>
The Netherlands Cancer Institute
>
Department of Tumorbiology (H4)
>
Plesmanlaan 121, 1066 CX, Amsterdam
>
Tel: + 31 20 - 512 2023
>
Fax: + 31 20 - 512 2029
>
E-mail: email@hidden
>
Web: http://www.mekentosj.com
>
>
MacOS X: The power of UNIX with the simplicity of the Mac
>
>
***************************************************************
>
_______________________________________________
>
cocoa-dev mailing list | email@hidden
>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.