Rafael Rafael - 2 days ago 3
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

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