Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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];
like image 311
Zigglzworth Avatar asked Oct 06 '11 10:10

Zigglzworth


1 Answers

I think in your case this should work:

[textScroll setDrawsBackground:NO];
like image 158
Devarshi Avatar answered Oct 17 '22 17:10

Devarshi