Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change background color in App delegate

I cant seem to change the color of the background of all views in the app delegate.

In ios6 this worked:

window.backgroundColor =[UIColor blueColor];

and be setting the background to clear in each UIView.

But this doesnt work in iOS7 for some reason. I can set the color of the background in each view no problem but this is a lot of work, there must be an easier way? Any advice?

like image 924
DevC Avatar asked Dec 02 '25 04:12

DevC


1 Answers

That's a terrible way to change the background color! If anything is moving, the animations will slow down from all the transparency. Change the view's backgroundColor in each view controller:

- (void)viewDidLoad
{
    [super viewDidLoad];
    [[self view] setBackgroundColor:[UIColor redColor]];
}
like image 90
nevan king Avatar answered Dec 04 '25 20:12

nevan king



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!