Created
November 25, 2011 08:36
-
-
Save cbess/1393058 to your computer and use it in GitHub Desktop.
Set NSView layer background image
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Sets the view's background to the given image | |
// prior to call, you may need to execute: `view.wantsLayer = YES` | |
void SetBackgroundImage(NSView *view, NSString *imageName) | |
{ | |
view.layer.contents = (id)[NSImage imageNamed:imageName]; | |
} |
thank you so much
thank you so much
thank you so much
thank you so much
it works perfect, thank you so much
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thank you so much