Rafael Rafael - 1 year ago 100
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];
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download