Changing NSImageView's default background fill color
Changing NSImageView's default background fill color
- Subject: Changing NSImageView's default background fill color
- From: Carl Hoefs <email@hidden>
- Date: Mon, 22 Jun 2015 16:25:36 -0700
I have a (subclassed) NSImageView in an NSWindow, and when it displays an image that doesn’t fit proportionally it will show a mid-gray background fill color around the image, apparently by default.
Is there any way I can change that background fill color? To either 0 alpha or black?
The following line does nothing:
_singleImageView.layer.backgroundColor = [[NSColor blackColor] CGColor];
…even though the layer object is <_NSViewBackingLayer: 0x600000045ac0>.
Cocoa, OS X 10.10.3, Xcode 6.3.2
-Carl
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden