1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

How to show a Splash UI before App run?

Discussion in 'Mac Programming' started by xiaohuli170, Mar 26, 2009.

  1. macrumors newbie

    Now I want to show a splash Ui before App run , but I didn't know how to do with cocoa, somebody can give me some code about it , Thanks very much! The splash ui I think it is a pucture , but how to show it before app running?
  2. Moderator emeritus


    Make a borderless window (google NSBorderlessWindowMask) and add an NSImageView to it, then show at startup.
  3. macrumors 6502a


    Would you do this through a custom awakeFromNib? or is there a better strategy?
  4. Moderator emeritus


    Usually it's at awakeFromNib or applicationDidFinishLaunching. awakeFromNib should probably be reserved for setting up UI stuff specific to that nib, while applicationDidFinishLaunching is better for general launch tasks. But it's still up to how the app was written.
  5. macrumors newbie

    First Thank you very much. And I show the window in applicationWillFinishLaunching method use orderFront,then hide it in applicationDidFinishLaunching: use orderOut,Now I found that the mainWindow not to show and the app terminate ,why ? How to do to resolute this question? Thanks!
  6. Moderator emeritus


    If your app is quitting without you quitting it yourself, then it's probably crashing.

Share This Page