How can I hide an NSView properly?
How can I hide an NSView properly?
- Subject: How can I hide an NSView properly?
- From: Gerben Wierda <email@hidden>
- Date: Thu, 28 Feb 2002 14:30:28 +0100
I have some NSViews (in fact NSProgressIndicators) that I want to
hide/unhide as they must temporarily take the place of other display
items. What I came up with is this:
In owner of nib file init:
Store the superview
[retain the indicator]
In owner of nib file dealloc:
[release the indicator]
For hiding (this releases the indicator, hence the init retains):
[[indicator retain] removeFromSuperviewWithoutNeedingDisplay]
For unhiding (this retains the indicators):
[superView addSubView:[indicator release]];
This will probably work, but I think this fails when the superview is
resized when the indicator is hidden. So this method will probably mean
that I have to give up on a resizable window (or do a lot of
calculation).
I haven't been able to find hide/unhide methods for views (or even
controls). Am I overlooking something?
Thanks,
G
_______________________________________________
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.