OSX/Cocoa - NSScrollView with transparent background
I can't seem to create a NSScrollView with a transparent background. Does anyone know why? here is my code:
开发者_如何学编程NSScrollView *textScroll = [[NSScrollView alloc] initWithFrame:CGRectMake(212, 203, 381, 55)];
[textScroll setBackgroundColor:[NSColor clearColor]];
[view addSubview:textScroll];
I think in your case this should work:
[textScroll setDrawsBackground:NO];
精彩评论