Here my line
NSView *myview
[self.myview.layer setBackgroundColor:[NSColor colorWithPatternImage:[NSImage imageNamed:@"myImageName.png"]].CGColor];
How to write these lines in swift language
.
Thanks
I don't understand beginning of your code (why self.myview.layer
if myview
is declared one line above), but rest should be something like this:
self.myview.layer?.backgroundColor = NSColor(patternImage:NSImage(named: "myImageName.png")!).CGColor
Let me know if it works.