Xcode 6.x/iOS 8 Hides Status Bar in Landscape Orientation

后端 未结 3 1995
臣服心动
臣服心动 2021-02-13 18:36

Application build with Xcode 6.x automatically hides the status bar in Landscape orientation (iPhone). The same application when compiled with Xcode 5.x doesn\'t do that.

<
3条回答
  •  被撕碎了的回忆
    2021-02-13 19:23

    I'm using

    #define IS_IOS8 SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0")
    
    -(void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration{
        [super willAnimateRotationToInterfaceOrientation:toInterfaceOrientation duration:duration];
    
        if (IS_IOS8){
                [[UIApplication sharedApplication] setStatusBarHidden:NO];
        }
    }
    

提交回复
热议问题