I'm not sure where you put the code, but it worked for me.
- Subclass
NSWindow
- Paste the following code:
-
- (id)initWithContentRect:(NSRect)contentRect
styleMask:(NSUInteger)aStyle
backing:(NSBackingStoreType)bufferingType
defer:(BOOL)flag {
self = [super initWithContentRect:contentRect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO];
if (self != nil) {
[self setAlphaValue:1.0];
self.backgroundColor = NSColor.clearColor;
[self setOpaque:NO];
}
return self;
}
This code is on the apple sample page - Round Transparent Window
You used NSBackingStoreNonretained
as window support. According to the docs:
. Classic Blue Box. , - .. , . , .
.