Sfoglia il codice sorgente

pad 横屏隐藏状态栏

Steven 1 anno fa
parent
commit
bbc80f4903

+ 6 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/KSBaseWKWebViewController.m

@@ -112,11 +112,17 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
 - (void)changeOrientation:(BOOL)isLandScape {
     if (isLandScape) {
         // 切换到横屏
+        if (IS_IPAD) {
+            self.zh_statusBarHidden = YES;
+        }
         AppDelegate* delegate = (AppDelegate*)[UIApplication sharedApplication].delegate;
         delegate.allowAutoRotate = YES;
         [UIDevice switchNewOrientation:UIInterfaceOrientationLandscapeRight inController:self];
     }
     else {
+        if (IS_IPAD) {
+            self.zh_statusBarHidden = NO;
+        }
         AppDelegate* delegate = (AppDelegate*)[UIApplication sharedApplication].delegate;
         delegate.allowAutoRotate = NO;
         [UIDevice switchNewOrientation:UIInterfaceOrientationPortrait inController:self];

+ 6 - 1
KulexiuForStudent/KulexiuForStudent/Module/Mine/Works/Controller/KSVideoCropViewController.m

@@ -42,12 +42,17 @@
 - (void)changeOrientation:(BOOL)isLandScape {
     if (isLandScape) {
         // 切换到横屏
+        if (IS_IPAD) {
+            self.zh_statusBarHidden = YES;
+        }
         AppDelegate* delegate = (AppDelegate*)[UIApplication sharedApplication].delegate;
         delegate.allowAutoRotate = YES;
         [UIDevice switchNewOrientation:UIInterfaceOrientationLandscapeRight inController:self];
     }
     else {
-        
+        if (IS_IPAD) {
+            self.zh_statusBarHidden = NO;
+        }
         AppDelegate* delegate = (AppDelegate*)[UIApplication sharedApplication].delegate;
         delegate.allowAutoRotate = NO;
         [UIDevice switchNewOrientation:UIInterfaceOrientationPortrait inController:self];

+ 2 - 1
KulexiuForStudent/KulexiuForStudent/Module/TXClassRoom/Controller/TXClassroomViewController.m

@@ -136,7 +136,8 @@
                 self.zh_statusBarHidden = NO;
             }
             [UIDevice switchNewOrientation:UIInterfaceOrientationPortrait inController:self];
-        });    }
+        });
+    }
 }
 
 #pragma mark - Life cycle

+ 6 - 0
KulexiuForStudent/KulexiuForStudent/Module/TXLive/Controller/TXLiveRoomViewController.m

@@ -958,12 +958,18 @@ static int clickPraiseBtnTimes  = 0;
 - (void)changeOrientation:(BOOL)isLandScape {
     self.landScape = isLandScape;
     if (isLandScape) {
+        if (IS_IPAD) {
+            self.zh_statusBarHidden = YES;
+        }
         // 切换到横屏
         AppDelegate* delegate = (AppDelegate*)[UIApplication sharedApplication].delegate;
         delegate.allowAutoRotate = YES;
         [UIDevice switchNewOrientation:UIInterfaceOrientationLandscapeRight inController:self];
     }
     else {
+        if (IS_IPAD) {
+            self.zh_statusBarHidden = NO;
+        }
         AppDelegate* delegate = (AppDelegate*)[UIApplication sharedApplication].delegate;
         delegate.allowAutoRotate = NO;
         [UIDevice switchNewOrientation:UIInterfaceOrientationPortrait inController:self];