I am still trying to make an application icon image look non-vibrant in the 
middle of a window with vibrant background colors surrounding the icon -- 
exactly like Apple's Command-Tab application switcher in Yosemite.

I have implemented this as a borderless window with two independent subview 
hierarchies in the window's contentView, following David Duncan's advice, but 
it still doesn't work. The first hierarchy, filling the window's contentView 
spatially, is an NSVisualEffectView with behind-window blending containing a 
vibrant subview that consists only of grayish background colors. The second 
subview hierarchy, placed in front of the first, is an NSImageView filling only 
the center area of the window and containing an application icon image. The 
icon imageView is not a subview of NSVisualEffectView.

The icon image appears vibrant no matter what I do. When I drag the window from 
white to dark areas of the screen, both the window's background colors and the 
icon image itself alter their darkness to reveal the blurred boundary on screen 
behind the window. The icon imageView appears vibrant even though 
[effectiveAppearance allowsVibrancy] returns NO.

I have tried putting the icon image behind the vibrant view, but then the icon 
is invisible because it is blocked by the background colors of the view in 
front (and by the material of the NSVisualEffectView in front). I have tried 
putting the icon image in its own NSVisualEffectView and setting its state to 
NSVisualEffectInactive, as recommended in the NSVisualEffectView reference 
document, but it has no effect. I have tried the various "opt-out" mechanisms 
suggested in the WWDC 2014 session 220, but none of them work (and the 
discussion was just a little inarticulate, if I may say so, so I'm not sure 
exactly what was being recommended). The discussion in the Yosemite AppKit 
Release Note also contains some suggestions that I couldn't make work. I have 
the impression that NSVisualEffectView changed quite a bit between WWDC and 
final release, and the documentation that exists is not very helpful.

Can anyone outline a strategy for reproducing Apple's application switcher?

-- 

Bill Cheeseman - b...@cheeseman.name

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to