Hey, I was wondering if it’s possible to make a mac os x app to hide specific windows that the user selects. I know how to make a button hide all windows and unhide all windows but I would like to know how to hide specific windows.
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Presumably somewhere you have references to your application’s windows. From there you simply tell the window to
-orderOut:.Even if you aren’t keeping track of your windows yourself, you can get a list of your application’s windows by asking
[NSApp windows].In a document-based app, you can get all the windows by their owning documents (there can be many windows per individual document) by asking:
[[NSDocumentController sharedDocumentController] documents]then asking each for its-windowControllers, then asking each window controller for its-window.