Quantcast
Channel: Best way to change the background color for an NSView - Stack Overflow
Viewing all articles
Browse latest Browse all 19

Best way to change the background color for an NSView

$
0
0

I'm looking for the best way to change the backgroundColor of an NSView. I'd also like to be able to set the appropriate alpha mask for the NSView. Something like:

myView.backgroundColor = [NSColor colorWithCalibratedRed:0.227f                                                    green:0.251f                                                     blue:0.337                                                    alpha:0.8];

I notice that NSWindow has this method, and I'm not a big fan of the NSColorWheel, or NSImage background options, but if they are the best, willing to use.


Viewing all articles
Browse latest Browse all 19

Latest Images

Trending Articles





Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>