How to show/hide different windows using obj-c in xcode
I' wondering how I would go about having two windows in interface builder and then being able to show and/or hide either of them fr开发者_如何学Goom xcode with objective-c?
Any ideas?
Thanks
Make sure you've got outlets connected to each of your windows.
Then you can do - (void)orderOut:(id)sender
to make a window invisible, or - (void)close
if you actually want to close it.
To make the window visible and bring it to the front, do - (void)makeKeyAndOrderFront:(id)sender
.
There's more information in the NSWindow class reference.
精彩评论