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.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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
setHiddenmethod use the- (void) setIsVisible:(BOOL) yourBOOLmethod.Hope I helped.