Reputation: 558
I have tried to change the background color of NSView like this in iOS,
self.titleview.backgroundcolor = [UIColor redColor];
But no property like that exists so after it, I tried,
self.titleBarView.layer.backgroundColor = [[NSColor redColor]set];
But it shows some error.
Upvotes: 0
Views: 767
Reputation: 1716
self.titleBarView.layer.backgroundColor = [NSColor redColor].CGColor;
If you do not want to use view.layer. You can use NSBox (with custom style) over NSView. NSBox has fillColor property.
Upvotes: 2