• 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: Drawing an NSProgressIndicator inside a custom view
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drawing an NSProgressIndicator inside a custom view


  • Subject: Re: Drawing an NSProgressIndicator inside a custom view
  • From: Troy Stephens <email@hidden>
  • Date: Mon, 9 Feb 2004 15:22:33 -0800

The recommended, and easy, way to do this kind of thing is to make the NSProgressIndicator a subview of the view that provides the background you want.

If you make it a sibling view, you're not guaranteed to get the desired drawing order.

Troy Stephens
Cocoa frameworks, Apple

On Feb 9, 2004, at 2:22 PM, email@hidden wrote:

Chris,

In fact I was thinking of letting my subview do the actual drawing, but maybe I was thinking to difficult. Doesn't it matter that these views then overlap?
I'll give it a try, thanks!
Alex

-----Original Message-----
From: Chris Pavicich [mailto:email@hidden]
Sent: Mon 2/9/2004 11:16 PM
To: Alexander Griekspoor
Cc: email@hidden
Subject: Re: Drawing an NSProgressIndicator inside a custom view

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.
_______________________________________________
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.

References: 
 >RE: Drawing an NSProgressIndicator inside a custom view (From: <email@hidden>)

  • Prev by Date: Re: applicationShouldTerminateAfterLastWindowClosed
  • Next by Date: Re: Anyone have experience coding software updating?
  • Previous by thread: RE: Drawing an NSProgressIndicator inside a custom view
  • Next by thread: Adding an NSSearchField into NSToolbar
  • Index(es):
    • Date
    • Thread