skiaddict1
skiaddict1

Reputation: 525

Xcode: want multiple windows visible at launch

I'm using Xcode's interface builder to mock up the windows for a new app (which will not be written in XCode). I don't know Xcode well at all. I want to be able to run the project so I can see the windows and take copies of them. But when I do that, only the MainMenu.xib's window shows. The other windows have Visible at Launch turned on. Is there something else I need to do? Below is the Attributes Inspector for one of my windows.

I would be grateful for any help! :-)

enter image description here

Upvotes: 1

Views: 316

Answers (1)

Brad Allred
Brad Allred

Reputation: 7534

This probably depends on your version of Xcode; for 10: If you have your MainMenu.xib open do View -> Library -> Show Library (or the corresponding toolbar button). From the library window search for "Window" and drag a new window into your xib. Select this new window and use the "Attributes Inspector" to check the "Visible At Launch" checkbox.

All "Visible At Launch" does is set the visible bit on the Window so that when the Nib is unarchived the window is visible. You still have to actually unarchive the Nib, either programmaticly or via a ViewController (which may be another option for you, but I don't know if it can be configured to automatically open).

Word of warning here: this is generally fine to do when you definitely want multiple windows at launch. Do not use this as a general solution to adding new windows to your application.

Upvotes: 1

Related Questions