Reputation: 1203
I would like to hide a window before the app has loaded. Now I know to hide a window you can use this;
[window2 orderOut:nil];
which works fine when you click on a button but what if I wont it to be hidden before or whilst the application has loaded?
So sorta need an IBAction on when the application loads
Upvotes: 0
Views: 411
Reputation: 410562
In Interface Builder, you can uncheck the box (in the window's attributes pane) that says to show the window at startup.
Or you can put that line of code in your app delegate's applicationWillFinishLaunching
(or perhaps applicationDidFinishLaunching
) method. (Might not work in the first one, I'm not sure.)
But I'd go with the first option, personally.
Upvotes: 1