Re: Getting a splash screen to show
Re: Getting a splash screen to show
- Subject: Re: Getting a splash screen to show
- From: Seth Willits <email@hidden>
- Date: Wed, 15 May 2013 09:56:42 -0700
On May 15, 2013, at 8:59 AM, Steve Mills wrote:
> [splashWindow setLevel:NSFloatingWindowLevel];
> [splashWindow setBackgroundColor:[NSColor clearColor]];
> [splashWindow setOpaque:NO];
> [splashWindow setHasShadow:NO];
> [splashWindow invalidateShadow];
> [splashWindow flushWindow];
> [splashWindow display];
> [splashWindow makeKeyAndOrderFront:nil];
Looks fine, but ditch the invalidate/flush/display is unnecessary.
> SetPortWindowPort((WindowRef)[splashWindow windowRef]);
Why is this here? Burn it with fire.
> The strange part is that it does NOT show if Cocoa is going to restore documents. Why would that matter?
Possibly because window restoration (which happens after applicationWillFinishLaunching) is hiding it? Possibly because wherever the splash window is being created, isn't being called so splashWindow is nil? Maybe it is visible, but the content is not drawing (and since the Guessing.
> Why is this so hard to do?
Not much to go on here, unfortunately. It must have something to do with what else is in your project or ordering. Showing a window at launch is as trivial as it should be, so something else must be interfering.
--
Seth Willits
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden