How to remove a UIWindow?

G33kz0r picture G33kz0r · Dec 28, 2010 · Viewed 37k times · Source

I thought it was easy as [myWindow resignKeyWindow] and [self.window makeKeyAndVisible] but I guess not… Would you guys know what to do?

Thanks :)

Answer

Nikolai Ruhe picture Nikolai Ruhe · Jan 18, 2013

The correct way to hide a window is to set the hidden property to YES. To remove it from UIApplication's windows property you just release the window (in ARC you set all references to nil).

Of course you would want to have another window in place at this time.