How to display NSPanel / NSWindow on the side of my application?

So basically I already have the application. And I would like to create an NSPanel or NSWindow that will basically be displayed to the right of my application when a button is clicked. And then it is automatically reset when the button is pressed again.

I accidentally searched Google, but I feel like I was not looking for the right things.

Ideally, it will work EXACTLY like [NSApp beginSheet], except that it will not control the application, it will just be another window on the right with which the user can interact.

How can I start with this?

Thank!

+3
source share
2 answers

, (NSDrawer). , - Cocoa Mac OSX. , , .

"" Xcode "" DrawerMadness. .

/ .

- . (, ), ( , " " " " ). . NSWindow addChildWindow: : , . , .

+3

3 .

  • Window/Drawer : A) . B) C)
  • D)
  • C) "toggle:" ( ) D) ( )

.

  • A) C) "parentWindow" | Outlets.
  • , A)
  • C), "parentWindow" Outlet.

. Disclosure /

Sidenote:

iPhone/iPad UI/UX, -, . , . . .

+5

Source: https://habr.com/ru/post/1782544/


All Articles