0

Good evening.

I have two controllers. Call them NSViewController1 and NSViewController2. Controllers placed on one NSWindow and have some network logic. It's not very good to delete them from memory while program is running.

I would like to create button. If user click on button, single window should separate on two windows. First of new window should contain NSViewController1 and second window should contain NSViewController2. Much better if switching is animated.

enter image description here

What is the best way to implement described behavior? May be somebody saw an open source project with this task?

alexchernyy
  • 1,216
  • 10
  • 12

1 Answers1

0

It would be best if you had a controller which controls both your window controllers, as well as both of your view controllers. If the button is clicked, you can send a message to this controller and remove the second view from the window and add it to the other window. And of course adjust the frame of those. I guess it's not that big of a deal.

IluTov
  • 6,807
  • 6
  • 41
  • 103