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

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -