views:

224

answers:

3

how to set backgroundcolor of UIViewController in iphone ?

+2  A: 
myViewController.view.backgroundColor = [UIColor redColor];
Jasarien
+1  A: 

In IB, select the View in the view controller and click on the Background color selector or to do it in code:

self.view.backgroundColor = [UIColor redColor];
DyingCactus
Is it strange that we both picked redColor for our code examples? Heh...
Jasarien
Yeah, maybe it's because UIColor ends in 'r' and that's the color that pops up when you press r again.
DyingCactus
A: 

when i set the Background Color i see for 2 seconds the old Background ?

Ralf
This should be asked as a new question instead of an answer. It depends on when and where you are setting the new color. If you set the color in the xib itself, there should be no delay.
DyingCactus