Rafael Rafael - 4 months ago 40
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 ?


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];