瀏覽代碼

1.推流页导航栏功能

huangxiaodong 1 年之前
父節點
當前提交
0735eba069

+ 3 - 0
创维盒子/双子星云手机/AppDelegate/Config/Const.h

@@ -145,6 +145,9 @@ UIKIT_EXTERN NSString *const Const_did_show_Notice_ID;
 
 /*版本更新提示点击稍后再试*/
 UIKIT_EXTERN NSString *const Const_did_show_version_and_click_wait;
+
+/*推流页导航栏是否隐藏 YES:隐藏  其他显示*/
+UIKIT_EXTERN NSString *const Consn_player_Nav_hide;
 @end
 
 NS_ASSUME_NONNULL_END

+ 3 - 0
创维盒子/双子星云手机/AppDelegate/Config/Const.m

@@ -141,4 +141,7 @@ NSString *const Const_did_show_Notice_ID = @"did_show_Notice_ID";
 
 /*版本更新提示点击稍后再试*/
 NSString *const Const_did_show_version_and_click_wait = @"show_version_and_click_wait";
+
+/*推流页导航栏是否隐藏 YES:隐藏  其他显示*/
+NSString *const Consn_player_Nav_hide = @"player_Nav_hide";
 @end

+ 3 - 0
创维盒子/双子星云手机/AppDelegate/Config/Notification.h

@@ -140,4 +140,7 @@
 /* nas下载完成 通知*/
 #define nasDownloadTaskFinishedNotification                 @"nasDownloadTaskFinishedNot"
 
+/*获取推流页导航栏变化通知*/
+#define getPlayerBottomNavNotification                 @"getPlayerBottomNavNot"
+
 #endif /* Notification_h */

+ 16 - 0
创维盒子/双子星云手机/CloudPlayer/View/PlayerView.m

@@ -49,6 +49,8 @@ ShowImageViewDelegate>{
         [self initOpenGL];
         
         [self drawView:frame];
+        
+        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(getPlayerBottomNavShowOrHidefun)  name:getPlayerBottomNavNotification  object:nil];
     }
     
     return self;
@@ -336,6 +338,8 @@ ShowImageViewDelegate>{
         make.width.and.height.mas_equalTo(40.f);
         make.top.mas_equalTo(0);
     }];
+    
+    [self getPlayerBottomNavShowOrHidefun];
 }
 
 /**
@@ -576,4 +580,16 @@ static CGRect startFrame;
     }
     [self setShowOrHideBottomButtonsFunBy:YES];
 }
+
+- (void)getPlayerBottomNavShowOrHidefun
+{
+    BOOL haveShowBottonNavType = ![HWDataManager getBoolWithKey:Consn_player_Nav_hide];
+    
+    if(haveShowBottonNavType){
+        bottomContrView.hidden = NO;
+    }
+    else{
+        bottomContrView.hidden = YES;
+    }
+}
 @end

+ 24 - 16
创维盒子/双子星云手机/CloudPlayer/View/playerSetView.m

@@ -80,8 +80,7 @@
         make.height.mas_equalTo(22.f);
     }];
     
-//    BOOL haveOpenMask = [HWDataManager getBoolWithKey:Consn_Fanzhuan_Exit_app_Open];
-//    [_bottomNavSwitch setOn:haveOpenMask];
+
     
     UILabel *navSwitchTipLabel = [[UILabel alloc] init];
     navSwitchTipLabel.text = NSLocalizedString(@"cloudPhone_nav_show_tip",nil);
@@ -109,9 +108,6 @@
         make.height.mas_equalTo(22.f);
     }];
     
-//    BOOL haveOpenMask = [HWDataManager getBoolWithKey:Consn_Fanzhuan_Exit_app_Open];
-//    [_bottomNavSwitch setOn:haveOpenMask];
-    
     UILabel *fullScreenTipLabel = [[UILabel alloc] init];
     fullScreenTipLabel.text = NSLocalizedString(@"cloudPhone_fullScreen_show_tip",nil);
     fullScreenTipLabel.textAlignment = NSTextAlignmentCenter;
@@ -125,7 +121,10 @@
         make.top.equalTo(_bottomNavSwitch.mas_bottom).offset(6);
     }];
     
-    
+    KWeakSelf
+    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.05 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+        [weakSelf setAllSwitchFun];
+    });
     
     /**********************************************************************************/
     UIView *bg2View = [UIView new];
@@ -226,17 +225,26 @@
     }];
 }
 
+- (void)setAllSwitchFun
+{
+    BOOL haveShowBottonNavType = ![HWDataManager getBoolWithKey:Consn_player_Nav_hide];
+    [_bottomNavSwitch setOn:haveShowBottonNavType];
+}
 
-- (void)maskSwitchPressed:(UISwitch *)maskSwitch{
-    HLog(@"11111");
-//    [HWDataManager setBoolWithKey:Consn_Fanzhuan_Exit_app_Open value:maskSwitch.on];
-//    
-//    if (maskSwitch.on) {
-//        [[iToast makeText:NSLocalizedString(@"my_set_no_fanzhuan_exit_open",nil)] show];
-//    }
-//    else{
-//        [[iToast makeText:NSLocalizedString(@"my_set_no_fanzhuan_exit_close",nil)] show];
-//    }
+- (void)maskSwitchPressed:(SYJUISwitch *)maskSwitch{
+   
+    if(_bottomNavSwitch == maskSwitch){
+        if (maskSwitch.on) {
+            [HWDataManager setBoolWithKey:Consn_player_Nav_hide value:NO];
+        }
+        else{
+            [HWDataManager setBoolWithKey:Consn_player_Nav_hide value:YES];
+        }
+        
+        [[NSNotificationCenter defaultCenter] postNotificationName:getPlayerBottomNavNotification object:nil];
+    }
+    
+    
 }
 
 #pragma mark 按钮事件