Jobalisk
Jobalisk

Reputation: 728

Closing a window upon segue to new window

I am currently working on a game. I have 2 windows, a menu window and a game window. Upon pressing the run button on the menu, I programatically segue to the game window. However, the menu window stays after the segue. Assuming the menu viewcontroller is unaware of the window controller, what is the best way of closing the menu window from the menu viewcontroller?

Upvotes: 1

Views: 57

Answers (1)

Asperi
Asperi

Reputation: 257703

Somewhere inside menu view controller, in place where you going to close your menu window, you call

[self.view.window performClose:nil];

Upvotes: 1

Related Questions