Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

newformac

macrumors regular
Original poster
May 24, 2011
107
0
Hi all,

i m hiding my app using "orderOut" from main window class where i m using "awakeFromNib",

and using other NSObject derived class to to some function here in NSObject derived class how can i identify the app is running in hidden mode.

please help me for this.

thanks in advance.
 
Code:
    BOOL appHidden = [NSApp isHidden];
    if (appHidden == TRUE) {
        NSLog(@"The app is hidden");
    } else {
        NSLog(@"The app is not hidden");
    }

1.Create a BOOL (value is true or false) and set it equal to the value of [NSApp isHidden]
2.Create an if statement and simply test the value
 
Code:
    BOOL appHidden = [NSApp isHidden];
    if (appHidden == TRUE) {
        NSLog(@"The app is hidden");
    } else {
        NSLog(@"The app is not hidden");
    }

1.Create a BOOL (value is true or false) and set it equal to the value of [NSApp isHidden]
2.Create an if statement and simply test the value

this BOOL appHidden = [NSApp isHidden]; alwaz return NO whether the application is visible of hidden.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.