Rafael Rafael - 8 months ago 76
iOS Question

change the background color with code

I wanna change the background color of my app with code, not in IB... can someone help-me ?

Answer Source

You can set the backgroundColor property of whatever view it is you have on screen.

self.view.backgroundColor = [UIColor redColor];

or if it's the main window you're after,

self.window.backgroundColor = [UIColor redColor];