PDA

View Full Version : Bringing window to front at launch.




adcx64
Jun 2, 2011, 08:16 PM
Hi,
I have a window in my application. I want it to pop up in front of my main app, like a welcome screen. there is nothing in the Inspector that lets me have the window in front. How do I go about doing this?



kainjow
Jun 2, 2011, 09:01 PM
[window makeKeyAndOrderFront:nil];

adcx64
Jun 2, 2011, 09:12 PM
thanks

but where do I implement this code? i do not see my window in the Xcode viewer.

jiminaus
Jun 2, 2011, 09:20 PM
thanks

but where do I implement this code? i do not see my window in the Xcode viewer.

Try doing it from applicationDidFinishLaunching: in your app delegate.

kainjow
Jun 2, 2011, 09:21 PM
You need to learn Objective-C.

Read this: http://guides.macrumors.com/Cocoa_FAQ