Take the 2-minute tour ×

I have a mainViewController which is the "home" of my app. this mainViewController has a status bar which it loads from a separate nib. It does work fine except for the fact that the background of the subView is not displayed.

This is my loading code:

- (void)viewDidLoad {
[super viewDidLoad];

// set title and tab representation
self.navigationItem.title = @"News";

// load status bar (level display etc.)
[[NSBundle mainBundle] loadNibNamed:@"MainStatusBar" owner:self options:nil];
[self.view addSubview:self.statusBar];
[self refreshLevelDisplays]; ...

It looks like that: As you see the background is missing

share|improve this question
Are you adjusting the view anywhere else in you code?, Maybe where it updates the view? –  Amit Shah Dec 1 '11 at 22:21
And how do you adjust the background in the subview? –  Teofilo Israel Vizcaino Rodrig Dec 2 '11 at 15:27
The background is configured through the Interface Builder as you can see in the screenshot. –  Alexander Dec 3 '11 at 1:21

Your Answer



Browse other questions tagged or ask your own question.