Search code examples
iosiphonestatusbaruiinterfaceorientationios8.1

Status bar behave weird in landscape mode on iOS 8.1 and work fine with iOS 7.1


I am having very uncommon problem. Im my application the status bar does not show in landscape mode. This issue happen only for iOS 8. It work fine in iOS 7. Please see the attached screen shots for both iOS 7 and iOS 8.

iOS7.1 portrait iOS7.1 landscape iOS8.1 portrait iOS8.1_landscape


Solution

  • This may help you

    In Plist set View controller-based status bar appearance: NO

    and add the code in your view Controller

    -(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
    {
        [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationNone];
    }