Phong Le
Phong Le

Reputation: 281

How can i split a nswindow?

So I am trying to emulate the new cleanlymac app. It looks like it has two windows on top of each other, one without the traffic lights and the other with it, but they were treated as one. That had the ability for the back one to slip out at the beginning. Would anyone have a good idea of how this was constructed?

Here is a photo of the cleanmymac app: enter image description here

Upvotes: 0

Views: 284

Answers (2)

Anoop Vaidya
Anoop Vaidya

Reputation: 46563

They are actually ONE WINDOW.

You can easily acheive this by using vertical NSSplitView with 2 panes.

Here you can opt for divider in between or fix the splitter.

And in each of the splitViews a new NSView is placed. Here in this view you can put your views from a single or multiple xibs.

Check here for ViewOnWindow how you can show a view from another xib to your main window.

Check here for tutorial.

Upvotes: 2

Nathan Day
Nathan Day

Reputation: 6047

That looks like a custom window with the black background for the top right part of the window. Search for custom window cocoa to find examples of how to do this. I don't see the point of the custom window in this situation, you could just split the content of the window, it probable branding.

Upvotes: 1

Related Questions