• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Splash screen
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Splash screen


  • Subject: Re: Splash screen
  • From: Raphael Sebbe <email@hidden>
  • Date: Thu, 3 May 2001 08:27:27 +0200

On Thursday, May 3, 2001, at 05:00 AM, email@hidden wrote:

Testing. Testing. Is this thing on. One two three four.

Ahem. Hello everyone. Here is my problem.

I'm trying to display a splash screen from my app. Here's what I did:

- In the applicationWillFinishLaunching: method of my NSApplication's delegate I send a runModalForWindow: message to my app.


Try -applicationDidFinishLaunching: . I got some weird behavior in the past using the Will version, especially when trying to load bundles... (the app isn't probably totatlly set up at that point)


The (unsatisfactory) result:
- My splash window does come up, but it is not key. The user can make it key by clicking on it. The only way I could find to make it key is to have a runModalSession loop instead of runModalForWindow and send the makeKeyAndOrderFront: message to my window inside the loop. That seems a bit brute force and the documentation says I'm not supposed to call makeKeyAndOrderFront: on the window.
How can I ensure that my window is key?


It should be.

- After dismissing the splash screen, the document window behind never becomes key. Switching app, clicking on the window, etc has no effect. Very unfortunate.

- An untitled document still gets created in the back of my splash screen (or a document gets opened if a user launched the app by double-clicking on one).
How can I delay this till after the user has dismissed the splash screen?


1) You implement that in your application delegate

- (BOOL)applicationShouldOpenUntitledFile:(NSApplication *)sender
{
return NO;
}

2) You add a delegate to the Splash window that will create the document when closed.



- I couldn't find a way to create a window that looks like a splash screen (i.e. no title bar). What's the trick?


I believe this is in NSWindow's doc

- The Size panel of the inspector in IB shows that my window is springy on all four sides, yet it is not centered on the screen.
How can I make sure that it is centered?


This means the window is movable. To center it, [window center], before it is on screen, so that it does not visually move...

Raphael


References: 
 >Splash screen (From: email@hidden)

  • Prev by Date: Splash screen
  • Next by Date: Hide/Show Views
  • Previous by thread: Splash screen
  • Next by thread: Re: Splash screen
  • Index(es):
    • Date
    • Thread