Sfoglia il codice sorgente

1.同步日志 --1.扫码相关

huangxiaodong 1 anno fa
parent
commit
b94c87b88b

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

@@ -1,8 +1,8 @@
 //
 //  playerSetView.m
-//  双子星云手机
 //
-//  Created by xd h on 2024/6/24.
+//
+//  Created David on 2024/6/24.
 //
 
 #import "playerSetView.h"
@@ -71,29 +71,29 @@
     CGFloat laberH = 16.0;
     
     //延迟
-    UILabel * delayedTipLabel =  [[UILabel alloc] init];
-    delayedTipLabel.font = [UIFont systemFontOfSize:12.0];
-    delayedTipLabel.textColor = [UIColor whiteColor];
-    delayedTipLabel.text = NSLocalizedString(@"webrtc_msg_delayed",nil);
-    [blackBgView addSubview:delayedTipLabel];
-    //delayedTipLabel.backgroundColor = [UIColor redColor];
-    
-    [delayedTipLabel mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.left.mas_equalTo(15);
-        make.width.mas_equalTo(laberW);
-        make.height.mas_equalTo(laberH);
-        make.top.mas_equalTo(laberTop);
-    }];
+//    UILabel * delayedTipLabel =  [[UILabel alloc] init];
+//    delayedTipLabel.font = [UIFont systemFontOfSize:12.0];
+//    delayedTipLabel.textColor = [UIColor whiteColor];
+//    delayedTipLabel.text = NSLocalizedString(@"webrtc_msg_delayed",nil);
+//    [blackBgView addSubview:delayedTipLabel];
+//    //delayedTipLabel.backgroundColor = [UIColor redColor];
+//
+//    [delayedTipLabel mas_makeConstraints:^(MASConstraintMaker *make) {
+//        make.left.mas_equalTo(15);
+//        make.width.mas_equalTo(laberW);
+//        make.height.mas_equalTo(laberH);
+//        make.top.mas_equalTo(laberTop);
+//    }];
     
     _delayedLabel =  [[UILabel alloc] init];
     _delayedLabel.font = [UIFont systemFontOfSize:12.0];
     //_delayedLabel.textColor = [UIColor whiteColor];
-    //_delayedLabel.text = NSLocalizedString(@"webrtc_msg_delayed",nil);
+    _delayedLabel.text = NSLocalizedString(@"webrtc_msg_delayed",nil);
     [blackBgView addSubview:_delayedLabel];
     //_delayedLabel.backgroundColor = [UIColor redColor];
     
     [_delayedLabel mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.left.mas_equalTo(delayedTipLabel.mas_right).offset(0);
+        make.left.mas_equalTo(15);
         //make.width.mas_equalTo(laberW+5);
         make.height.mas_equalTo(laberH);
         make.top.mas_equalTo(laberTop);
@@ -106,21 +106,21 @@
 //    PacketLossTipLabel.text = NSLocalizedString(@"webrtc_msg_PacketLoss",nil);
 //    [blackBgView addSubview:PacketLossTipLabel];
 //    //delayedTipLabel.backgroundColor = [UIColor redColor];
-//    
+//
 //    [PacketLossTipLabel mas_makeConstraints:^(MASConstraintMaker *make) {
 //        make.centerX.mas_equalTo(- 1.5*laberW -10);
 //        make.width.mas_equalTo(laberW);
 //        make.height.mas_equalTo(laberH);
 //        make.top.mas_equalTo(laberTop);
 //    }];
-//    
+//
 //    _PacketLossLabel =  [[UILabel alloc] init];
 //    _PacketLossLabel.font = [UIFont systemFontOfSize:12.0];
 //    _PacketLossLabel.textColor = [UIColor hwColor:@"#FF2855"];
 //    //_PacketLossLabel.text = NSLocalizedString(@"webrtc_msg_delayed",nil);
 //    [blackBgView addSubview:_PacketLossLabel];
 //    //_PacketLossLabel.backgroundColor = [UIColor redColor];
-//    
+//
 //    [_PacketLossLabel mas_makeConstraints:^(MASConstraintMaker *make) {
 //        make.left.mas_equalTo(PacketLossTipLabel.mas_right).offset(0);
 //        make.width.mas_equalTo(laberW+5);
@@ -154,7 +154,7 @@
     [_speedLabel mas_makeConstraints:^(MASConstraintMaker *make) {
         //make.centerX.mas_equalTo(1.5*laberW);
         make.centerX.mas_equalTo(self.mas_centerX);
-        make.width.mas_equalTo(laberW*3.0);
+        //make.width.mas_equalTo(laberW*3.0);
         make.height.mas_equalTo(laberH);
         make.top.mas_equalTo(laberTop);
     }];
@@ -233,7 +233,7 @@
     
     //底部导航栏开关
     _bottomNavSwitch = [[SYJUISwitch alloc] initWithFrame:CGRectMake(0, 0, 44, 22)];
-    _bottomNavSwitch.onTintColor = HW13B2EBColor;
+    _bottomNavSwitch.onTintColor = HWFFD315Color;
     _bottomNavSwitch.offTintColor = [UIColor hwColor:@"#E3E8F1"];
     [_bottomNavSwitch addTarget:self action:@selector(maskSwitchPressed:) forControlEvents:UIControlEventValueChanged];
     [bgBottomNavView addSubview:_bottomNavSwitch];
@@ -273,7 +273,7 @@
     }];
     
     _fullScreenSwitch = [[SYJUISwitch alloc] initWithFrame:CGRectMake(0, 0, 44, 22)];
-    _fullScreenSwitch.onTintColor = HW13B2EBColor;
+    _fullScreenSwitch.onTintColor = HWFFD315Color;
     _fullScreenSwitch.offTintColor = [UIColor hwColor:@"#E3E8F1"];
     [_fullScreenSwitch addTarget:self action:@selector(maskSwitchPressed:) forControlEvents:UIControlEventValueChanged];
     [bgFullScreenView addSubview:_fullScreenSwitch];
@@ -308,13 +308,13 @@
     
     
     NSArray *titleArr = @[NSLocalizedString(@"cloudPhone_set_screenshot_tip",nil),
-                          NSLocalizedString(@"my_set_no_TV_p2p",nil),//my_set_no_close_TV_p2p
+                          //NSLocalizedString(@"my_set_no_TV_p2p",nil),//my_set_no_close_TV_p2p
                           NSLocalizedString(@"my_set_no_restart_phone",nil),
                           //NSLocalizedString(@"cloudPhone_set_exit_tip",nil),
     ];
     
     NSArray *imageArr = @[@"cloudPhone_set_screenshot",
-                          @"cloudPhone_set_TV",
+                          //@"cloudPhone_set_TV",
                           @"cloudPhone_set_restart",
                           //@"cloudPhone_set_exit",
     ];
@@ -324,7 +324,7 @@
     CGFloat imageWH = 24.0;
     
     CGFloat butHeight = imageWH +20 +5;
-    CGFloat butWidth = (320 -15*2)/3.0;  //70.0;
+    CGFloat butWidth = (320 -15*2)/2.0;  //70.0;
     //CGFloat butWidth = (245 -12*2)/2.0;  //70.0;
     CGFloat butSpace = 0.0; //(245  - butWidth*3)/3.0;
     
@@ -370,12 +370,12 @@
             make.top.equalTo(imageV.mas_bottom).offset(0);
         }];
         
-        if(i==1){
-            _TVButton = but;
-            _TVShowLabel = textLabel;
-            
-            [self getCouldPhoneTvStatusFun:nil];
-        }
+//        if(i==1){
+//            _TVButton = but;
+//            _TVShowLabel = textLabel;
+//
+//            [self getCouldPhoneTvStatusFun:nil];
+//        }
         
     }
     
@@ -461,9 +461,9 @@
         return;
     }
     
-    if(tag == 201 && but.selected){
-        tag = 301;
-    }
+//    if(tag == 201 && but.selected){
+//        tag = 301;
+//    }
     
     if(_didClickButtonFun){
         _didClickButtonFun(tag);
@@ -477,14 +477,14 @@
 
 - (void)getCouldPhoneTvStatusFun:(NSNotification*)not
 {
-    if(ksharedAppDelegate.TvStatusMod.isTVShowType){
-        _TVButton.selected = YES;
-        _TVShowLabel.text = NSLocalizedString(@"my_set_no_close_TV_p2p",nil);
-    }
-    else{
-        _TVButton.selected = NO;
-        _TVShowLabel.text = NSLocalizedString(@"my_set_no_TV_p2p",nil);
-    }
+//    if(ksharedAppDelegate.TvStatusMod.isTVShowType){
+//        _TVButton.selected = YES;
+//        _TVShowLabel.text = NSLocalizedString(@"my_set_no_close_TV_p2p",nil);
+//    }
+//    else{
+//        _TVButton.selected = NO;
+//        _TVShowLabel.text = NSLocalizedString(@"my_set_no_TV_p2p",nil);
+//    }
 }
 
 - (void)setWebRctMsgBydelayed:(NSInteger)delayedMS withPacketLoss:(NSString*)PacketLossStr withSpeed:(NSString*)speedStr withFPS:(NSString*)fpsStr
@@ -501,13 +501,26 @@
         _delayedLabel.textColor = [UIColor hwColor:@"#FF2855"];
     }
     
+    NSString * delayedStr = @"";
     if(delayedMS >= 1000){
-        _delayedLabel.text = [[NSString alloc] initWithFormat:@"%lds",delayedMS/1000];
+        delayedStr = [[NSString alloc] initWithFormat:@"%lds",delayedMS/1000];
     }
     else{
-        _delayedLabel.text = [[NSString alloc] initWithFormat:@"%ldms",delayedMS];
+        delayedStr = [[NSString alloc] initWithFormat:@"%ldms",delayedMS];
     }
     
+    NSString*leftStr = NSLocalizedString(@"webrtc_msg_delayed",nil);
+    
+    NSString *fullTitle = [[NSString alloc] initWithFormat:@"%@%@",leftStr,delayedStr];
+    NSMutableAttributedString *attrStr = [[NSMutableAttributedString alloc] initWithString:fullTitle];
+
+    NSRange leftRange = NSMakeRange([fullTitle rangeOfString:leftStr].location, [fullTitle rangeOfString:leftStr].length);
+    [attrStr addAttribute:NSForegroundColorAttributeName value:[UIColor whiteColor] range:leftRange];
+
+    _delayedLabel.attributedText = attrStr;
+    
+
+    
     //_PacketLossLabel.text = PacketLossStr;
     _speedLabel.text = [[NSString alloc] initWithFormat:@"%@%@",NSLocalizedString(@"webrtc_msg_speed",nil),speedStr];
     _fpsLabel.text = [[NSString alloc] initWithFormat:@"FPS:%@",fpsStr];