Create a new Window

Using Interface Builder with Xcode 11 I have created two windows, when I activate the second window it opens as a tab in the main window. How do I change this to start a second window instead of a tab?

Answered by Claude31 in 424591022

Do you use a storyboard or not ?

Is it a doc based app (I guess so)


I tested with a storyboard, no doc based:

- created 2 windows in IB

- a button on the view of the firstWindow to segue to second.


And they show in 2 seperate windows.


Can you describe your set up ?


You should try this:

- In IB, select the window of the WindowController

- In Attributes inspector, set tabbing mode to Disallowed.

You should now have new windows in stack.


If doc based, may have a look here:

https://stackoverflow.com/questions/45119813/how-do-i-open-another-window-in-macos-in-swift-with-cocoa

or

h ttps://www.raywenderlich.com/613-windows-and-windowcontroller-tutorial-for-macos

Accepted Answer

Do you use a storyboard or not ?

Is it a doc based app (I guess so)


I tested with a storyboard, no doc based:

- created 2 windows in IB

- a button on the view of the firstWindow to segue to second.


And they show in 2 seperate windows.


Can you describe your set up ?


You should try this:

- In IB, select the window of the WindowController

- In Attributes inspector, set tabbing mode to Disallowed.

You should now have new windows in stack.


If doc based, may have a look here:

https://stackoverflow.com/questions/45119813/how-do-i-open-another-window-in-macos-in-swift-with-cocoa

or

h ttps://www.raywenderlich.com/613-windows-and-windowcontroller-tutorial-for-macos

Thanks for you answer it resolved my question.

谢谢你的回答
Create a new Window
 
 
Q