开发者

OSX/Cocoa - NSScrollView with transparent background

开发者 https://www.devze.com 2023-04-11 07:56 出处:网络
I can\'t seem to create a NSScrollView with a transparent background. Does anyone know why? here is my code:

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];
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号