On Oct 5, 2010, at 12:25 PM, Trygve Inda wrote:
> Is there a way to have a window with a 50% opaque background, but several
> odd-shaped views that are 100% opaque? The dock does this but seems be one
> window per icon. Can I do it all as one window?
Look into NSBorderlessWindowMask. You may also
Yes, but you should leave the window's alpha at 1.0.
Off top of my head, it goes something like this:
Create a subclass of NSView and set that class as the class for the contentView
of the window (in IB)
Change that class's drawRect to :
- (void)drawRect:(NSRect)rect {
// Clear the drawin
Is there a way to have a window with a 50% opaque background, but several
odd-shaped views that are 100% opaque? The dock does this but seems be one
window per icon. Can I do it all as one window?
My NSWindow subclass looks like:
[self setOpaque:NO];
[self setHasShadow: YES];
[self setLevel:NSFlo