objective c - Changing backgroundcolor of a view seems hard? -


i want change background color of view within view controller. selecting view , opening attributes inspector isn't showing much. should have option here background.

enter image description here

tried coding within (void)viewdidload{} with: self.view.backgroundcolor = [nscolor bluecolor]; isn't working either, no object of nsview.

what doing wrong? read coding problem has newer version of xcode. coding issue

this questioned , answered in best way change background color nsview

here code os x

[self.view setwantslayer:yes]; [self.view.layer setbackgroundcolor:[[nscolor whitecolor] cgcolor]]; 

Comments

Popular posts from this blog

html - Difficulties with background-image property -

visual studio code - What does the isShellCommand property actually do and how should you use it? -

ios - Segue not passing data between ViewControllers -