Search code examples
ios7statusbar

ios7 statusbar not behaving correctly


I'am using a UITabbar for my app. Each tab have a navigation controller inside.

When i touch a tab in the tab bar, this happens:

Weird navigation controller

First time the statusbar is black (ios7) Second time the statusbar shows info (ios7)

But, for both example the navigation navbar does not expand below the statusbar.

What is going on ?


Solution

  • By removing this from app delegate:

        UIImage *topbarImage = [UIImage imageNamed:@"topbar"];
        UIImage *topbarStrechable = [topbarImage stretchableImageWithLeftCapWidth:0 topCapHeight:0];
        [[UINavigationBar appearance] setBackgroundImage:topbarStrechable forBarMetrics:UIBarMetricsDefault];
        [[UINavigationBar appearance] setTintColor:[UIColor navigationBarColor]];
    

    everything started working like a charm. ;-)