Bringing window to front at launch.

Discussion in 'Mac Programming' started by adcx64, Jun 2, 2011.

  1. macrumors 65816

    adcx64

    Joined:
    Nov 17, 2008
    Location:
    Cudi Zone
    #1
    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?
     
  2. Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #2
    Code:
    [window makeKeyAndOrderFront:nil];
     
  3. thread starter macrumors 65816

    adcx64

    Joined:
    Nov 17, 2008
    Location:
    Cudi Zone
    #3
    thanks

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

    jiminaus

    Joined:
    Dec 16, 2010
    Location:
    Sydney
    #4
    Try doing it from applicationDidFinishLaunching: in your app delegate.
     
  5. Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #5

Share This Page