Is there a way to check if the window is hidden and unhide the NSWindow programatically?
I have tried [self showWindow:nil] and [self.window makeKeyAndOrderFront:self] but they cause wierd behaviors like, two windows etc.
Use - (BOOL) isVisible
(so BOOL visible = [self.window isVisible] to dertimine whether a window is hidden or not, and if you want to hide or unhide a window use this:
[self.window setHidden:YES]
And, obviously, you pass NO to unhide it.
Edit
Sorry, instead of the setHidden
method use the - (void) setIsVisible:(BOOL) yourBOOL
method.
Hope I helped.