• 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
Setting NSWindow to be transparent
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Setting NSWindow to be transparent


  • Subject: Setting NSWindow to be transparent
  • From: Pax <email@hidden>
  • Date: Sun, 16 Jun 2013 09:22:18 +0100

I am trying to set NSWindow (borderless, with no controls) to be transparent before I display it (so that I can fade it onto the screen).  Unfortunately, I don't seem to be able to - it loads, visibly, then sets the opacity to 0 (resulting in the window flickering at full opacity, before disappearing and then fading into view.  Sure, it's a fast flick - but it's ugly, and not the effect that I'm looking for.  Does anyone have any idea how to set opacity to 0 before displaying the window?

Before we have the discussion about splash screens by the way, I'd just like to say 'I agree - I hate them too'.  To justify my actions, this is because the app loads into the menu bar, not the dock, and so (in testing) I discovered that users thought it hadn't loaded at all.  So, on first load only (unless specifically requested otherwise in preferences) a splash is displayed informing the user that the app has loaded - and to look up to the menu bar, not down to the dock.

- (id)initSplash
{
    if (self = [super initWithWindowNibName:@"SplashScreen"])
    {
        (void) [splashWindow window];
        [splashWindow setAlphaValue:0.0];
        return self;
    }

    return nil;
}

_______________________________________________

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


  • Follow-Ups:
    • Re: Setting NSWindow to be transparent
      • From: Michael Starke <email@hidden>
  • Prev by Date: Re: IB keeps changing my constraints when I resize the cell
  • Next by Date: Re: Setting NSWindow to be transparent
  • Previous by thread: Re: IB keeps changing my constraints when I resize the cell
  • Next by thread: Re: Setting NSWindow to be transparent
  • Index(es):
    • Date
    • Thread