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 using this to sho and hide my app

Code:
[mainwindow orderOut:nil]; // to hide it
		  
[mainwindow makeKeyAndOrderFront:nil]; // to show it

now please tell at running time how can identify the app is show or hide?

please help me for this.

thanks in advance.
 

newformac

macrumors regular
Original poster
May 24, 2011
107
0
i m using [controlPanel orderOut:nil]; in awakeFromNib but still the window is show.
 

jiminaus

macrumors 65816
Dec 16, 2010
1,449
1
Sydney
Try unticking visible at launch in the window property inspector in interface builder. This will stop the window from appearing automatically. Then order the window on screen when you want it to be shown.
 

newformac

macrumors regular
Original poster
May 24, 2011
107
0
thanks its done from awakeFromNib .
i am automatically start my application using LoginWindow whenever Mac machine is on or whenever any user logged in.

at this time if i place some alert message in awakeFromNib than app is display otherwise its run in hidden mode,i want to detect the automatically start position to avoid this alert message.

Code:
[[NSAlert alertWithMessageText:@"Alert Message"
			defaultButton:@"OK" alternateButton:nil otherButton:nil
			informativeTextWithFormat:@"Alert Message"] runModal];

and please also tell me how can i identify the app is show or hide from other class that is derived from NSObject.
 
Last edited by a moderator:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.