Re: NSButton disappears when I turn on "Wants Core Animation Layer" in IB
Re: NSButton disappears when I turn on "Wants Core Animation Layer" in IB
- Subject: Re: NSButton disappears when I turn on "Wants Core Animation Layer" in IB
- From: Michael Crawford <email@hidden>
- Date: Fri, 04 Mar 2011 15:57:41 -0500
Marking the containing window for these view as visible-at-launch in IB seems to make all the difference. I previously had this option turned off because I did not want to display the main window until after app startup. I will try to figure exactly why this makes the difference but, again, if anyone has a clue, please chime in.
-Michael
On Mar 3, 2011, at 3:28 PM, Michael Crawford wrote:
> I have a view with a few textured NSButton objects placed on top of a contentView. Since a couple of the buttons overlap and one uses transparency and requires a shadow, I turned on the wants-layer feature for that button. The button still looks a little funky in the corner where it overlaps another button, so I turn on wants-layer for the entire view by setting wants-layer for the contentView containing the buttons. When I run the application, the button with the shadow is invisible. It is there, I can click on it with the mouse or press the key bound to the button and the app responds appropriately. If I turn off wants-layer for the contentView and run the app again, I can now see the button, though it looks wrong because of the missing Core Animation features with transparency and shadow.
>
> The other half of the puzzle is that this view used to work fine. It broke when I added a second window to the app, which also uses Core Animation.
>
> Anyone seen anything remotely like this?
>
> http://dl.dropbox.com/u/4920112/Screenshots/Screen shot 2011-03-03 at 3.17.57 PM.PNG
> http://dl.dropbox.com/u/4920112/Screenshots/Screen shot 2011-03-03 at 3.18.26 PM.PNG
> http://dl.dropbox.com/u/4920112/Screenshots/Screen shot 2011-03-03 at 3.19.13 PM.PNG
>
> -Michael
> _______________________________________________
>
> 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
_______________________________________________
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