|
|
@@ -7,27 +7,38 @@
|
|
|
|
|
|
#import "playerSetView.h"
|
|
|
#import "SYJUISwitch.h"
|
|
|
+#import "customSwitchButton.h"
|
|
|
|
|
|
@interface playerSetView ()
|
|
|
@property(nonatomic, strong)UIView* blackBgView;
|
|
|
|
|
|
-@property(nonatomic, strong)UIView *bg0View;//1.4.4 新加分辨率
|
|
|
-@property(nonatomic, strong) UIButton *resolution720Button;
|
|
|
-@property(nonatomic, strong) UIButton *resolution1080Button;
|
|
|
-@property(nonatomic,strong) CAGradientLayer *glayer;
|
|
|
+@property(nonatomic, strong) UILabel *delayedLabel;//延时
|
|
|
+@property(nonatomic, strong) UILabel *PacketLossLabel;//丢包
|
|
|
+@property(nonatomic, strong) UILabel *speedLabel;//速度(带宽)
|
|
|
+@property(nonatomic, strong) UILabel *fpsLabel;
|
|
|
+
|
|
|
+//@property(nonatomic, strong)UIView *bg0View;//1.4.4 新加分辨率
|
|
|
+//@property(nonatomic, strong) UIButton *resolution720Button;
|
|
|
+//@property(nonatomic, strong) UIButton *resolution1080Button;
|
|
|
+//@property(nonatomic,strong) CAGradientLayer *glayer;
|
|
|
+
|
|
|
+//1.4.6 UI
|
|
|
+@property(nonatomic, strong)UIView *bg1ViewL;//第一行 左边
|
|
|
+@property(nonatomic, strong) customSwitchButton * resolutionSwitch;//分辨率切换开关
|
|
|
+
|
|
|
+@property(nonatomic, strong)UIView *bg1ViewR;//第一行 右边
|
|
|
+@property(nonatomic, strong) customSwitchButton * bottomNavSwitch;//底部导航栏开关
|
|
|
+
|
|
|
+@property(nonatomic, strong)UIView *bg2ViewL;//第二行 左边
|
|
|
+@property(nonatomic, strong) customSwitchButton * fullScreenSwitch;//全面屏开关
|
|
|
|
|
|
@property(nonatomic, strong) UIView *bg1View;
|
|
|
-@property(nonatomic, strong) SYJUISwitch * bottomNavSwitch;//底部导航栏开关
|
|
|
-@property(nonatomic, strong) SYJUISwitch * fullScreenSwitch;//全面屏开关
|
|
|
+//@property(nonatomic, strong) customSwitchButton * bottomNavSwitch;//底部导航栏开关
|
|
|
+//@property(nonatomic, strong) SYJUISwitch * fullScreenSwitch;//全面屏开关
|
|
|
@property(nonatomic, strong) UIButton *TVButton;
|
|
|
@property(nonatomic, strong) UILabel *TVShowLabel;
|
|
|
@property(nonatomic, strong) UIButton *exitPhoneButton;
|
|
|
|
|
|
-@property(nonatomic, strong) UILabel *delayedLabel;//延时
|
|
|
-@property(nonatomic, strong) UILabel *PacketLossLabel;//丢包
|
|
|
-@property(nonatomic, strong) UILabel *speedLabel;//速度(带宽)
|
|
|
-@property(nonatomic, strong) UILabel *fpsLabel;
|
|
|
-
|
|
|
@end
|
|
|
|
|
|
@implementation playerSetView
|
|
|
@@ -65,7 +76,7 @@
|
|
|
[self addSubview:_blackBgView];
|
|
|
|
|
|
[_blackBgView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
- make.height.mas_equalTo(260 + 50);//(256);
|
|
|
+ make.height.mas_equalTo(340);//(256);
|
|
|
make.width.mas_equalTo(320);//(245);
|
|
|
make.centerX.mas_equalTo(0.f);
|
|
|
make.centerY.mas_equalTo(0.f);
|
|
|
@@ -78,21 +89,6 @@
|
|
|
CGFloat laberW = 30.0;
|
|
|
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);
|
|
|
-// }];
|
|
|
-
|
|
|
CGFloat fontSize = 12.0;
|
|
|
|
|
|
///获取设备当前地区的代码和APP语言环境
|
|
|
@@ -125,21 +121,7 @@
|
|
|
make.top.mas_equalTo(laberTop);
|
|
|
}];
|
|
|
|
|
|
- //丢包
|
|
|
-// UILabel * PacketLossTipLabel = [[UILabel alloc] init];
|
|
|
-// PacketLossTipLabel.font = [UIFont systemFontOfSize:12.0];
|
|
|
-// PacketLossTipLabel.textColor = [UIColor whiteColor];
|
|
|
-// 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:fontSize];
|
|
|
_PacketLossLabel.textAlignment = NSTextAlignmentCenter;
|
|
|
@@ -156,20 +138,6 @@
|
|
|
make.top.mas_equalTo(laberTop);
|
|
|
}];
|
|
|
|
|
|
- //带宽
|
|
|
-// UILabel * speedLossTipLabel = [[UILabel alloc] init];
|
|
|
-// speedLossTipLabel.font = [UIFont systemFontOfSize:12.0];
|
|
|
-// speedLossTipLabel.textColor = [UIColor whiteColor];
|
|
|
-// speedLossTipLabel.text = NSLocalizedString(@"webrtc_msg_speed",nil);
|
|
|
-// [blackBgView addSubview:speedLossTipLabel];
|
|
|
-// //speedLossTipLabel.backgroundColor = [UIColor redColor];
|
|
|
-//
|
|
|
-// [speedLossTipLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
-// make.centerX.mas_equalTo(1.5*laberW -10);
|
|
|
-// make.width.mas_equalTo(laberW +10 );
|
|
|
-// make.height.mas_equalTo(laberH);
|
|
|
-// make.top.mas_equalTo(laberTop);
|
|
|
-// }];
|
|
|
|
|
|
_speedLabel = [[UILabel alloc] init];
|
|
|
_speedLabel.font = [UIFont systemFontOfSize:fontSize];
|
|
|
@@ -188,176 +156,203 @@
|
|
|
make.top.mas_equalTo(laberTop);
|
|
|
}];
|
|
|
|
|
|
- //fps
|
|
|
-// UILabel * fpsTipLabel = [[UILabel alloc] init];
|
|
|
-// fpsTipLabel.font = [UIFont systemFontOfSize:12.0];
|
|
|
-// fpsTipLabel.textColor = [UIColor whiteColor];
|
|
|
-// fpsTipLabel.text = @"FPS:";
|
|
|
-// [blackBgView addSubview:fpsTipLabel];
|
|
|
-// //speedLossTipLabel.backgroundColor = [UIColor redColor];
|
|
|
-//
|
|
|
-// [fpsTipLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
-// make.right.mas_equalTo(- 15 - 0.5*laberW);
|
|
|
-// make.width.mas_equalTo(laberW);
|
|
|
-// make.height.mas_equalTo(laberH);
|
|
|
-// make.top.mas_equalTo(laberTop);
|
|
|
-// }];
|
|
|
-
|
|
|
- //_fpsLabel = [[UILabel alloc] init];
|
|
|
-// _fpsLabel.textAlignment = NSTextAlignmentRight;
|
|
|
-// _fpsLabel.font = [UIFont systemFontOfSize:12.0];
|
|
|
-// _fpsLabel.textColor = [UIColor whiteColor];
|
|
|
-// //_fpsLabel.text = NSLocalizedString(@"webrtc_msg_delayed",nil);
|
|
|
-// [_blackBgView addSubview:_fpsLabel];
|
|
|
-// //_fpsLabel.backgroundColor = [UIColor redColor];
|
|
|
-//
|
|
|
-// [_fpsLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
-// make.right.mas_equalTo(-15);
|
|
|
-// make.width.mas_equalTo(laberW*2);
|
|
|
-// make.height.mas_equalTo(laberH);
|
|
|
-// make.top.mas_equalTo(laberTop);
|
|
|
-// }];
|
|
|
+
|
|
|
|
|
|
[self setWebRctMsgBydelayed:0 withPacketLoss:0.0 withSpeed:@"-" withFPS:@"-"];
|
|
|
|
|
|
/***************************分辨率*******************************************************/
|
|
|
|
|
|
- _bg0View = [UIView new];
|
|
|
- _bg0View.layer.cornerRadius = 8;
|
|
|
- _bg0View.backgroundColor = [UIColor hwColor:@"#29313D"];
|
|
|
- [_blackBgView addSubview:_bg0View];
|
|
|
+// _bg0View = [UIView new];
|
|
|
+// _bg0View.layer.cornerRadius = 8;
|
|
|
+// _bg0View.backgroundColor = [UIColor hwColor:@"#29313D"];
|
|
|
+// [_blackBgView addSubview:_bg0View];
|
|
|
+//
|
|
|
+// [_bg0View mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
+// make.height.mas_equalTo(36);
|
|
|
+// make.left.mas_equalTo(12);
|
|
|
+// make.right.mas_equalTo(-12);
|
|
|
+// //make.top.mas_equalTo(16.f);
|
|
|
+// make.top.mas_equalTo(62.f);
|
|
|
+// }];
|
|
|
+//
|
|
|
+// //分辨率
|
|
|
+// UILabel *resolutionTipLabel = [[UILabel alloc] init];
|
|
|
+// resolutionTipLabel.text = NSLocalizedString(@"cloudPhone_player_set_resolution",nil);
|
|
|
+// resolutionTipLabel.textColor = [UIColor whiteColor];
|
|
|
+// resolutionTipLabel.font = [UIFont systemFontOfSize:12.0];
|
|
|
+// [_bg0View addSubview:resolutionTipLabel];
|
|
|
+//
|
|
|
+// [resolutionTipLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
+// make.left.mas_equalTo(15);
|
|
|
+// make.top.equalTo(_bg0View.mas_top).offset(0);
|
|
|
+// make.bottom.equalTo(_bg0View.mas_bottom).offset(0);
|
|
|
+// }];
|
|
|
+//
|
|
|
+// _resolution720Button = [[UIButton alloc] init];
|
|
|
+// _resolution720Button.layer.cornerRadius = 5;
|
|
|
+// _resolution720Button.backgroundColor = [UIColor hwColor:@"#D8D8D8" alpha:0.09];
|
|
|
+// [_resolution720Button setTitle:@"720*1280" forState:UIControlStateNormal];
|
|
|
+// [_resolution720Button setTitleColor:[UIColor hwColor:@"#FFFFFF"] forState:UIControlStateNormal];
|
|
|
+// _resolution720Button.titleLabel.font = [UIFont systemFontOfSize:12.0];
|
|
|
+// _resolution720Button.layer.masksToBounds = YES;
|
|
|
+// [_resolution720Button addTarget:self action:@selector(didClickResolution720ButFun) forControlEvents:UIControlEventTouchUpInside];
|
|
|
+// [_bg0View addSubview:_resolution720Button];
|
|
|
+//
|
|
|
+// [_resolution720Button mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
+// make.left.mas_equalTo(80);
|
|
|
+// make.width.mas_equalTo(93);
|
|
|
+// make.height.mas_equalTo(26);
|
|
|
+// make.centerY.mas_equalTo(0);
|
|
|
+// }];
|
|
|
+//
|
|
|
+// _resolution1080Button = [[UIButton alloc] init];
|
|
|
+// _resolution1080Button.layer.cornerRadius = 5;
|
|
|
+// _resolution1080Button.backgroundColor = [UIColor hwColor:@"#D8D8D8" alpha:0.09];
|
|
|
+// [_resolution1080Button setTitle:@"1080*1920" forState:UIControlStateNormal];
|
|
|
+// [_resolution1080Button setTitleColor:[UIColor hwColor:@"#FFFFFF"] forState:UIControlStateNormal];
|
|
|
+// _resolution1080Button.titleLabel.font = [UIFont systemFontOfSize:12.0];
|
|
|
+// _resolution1080Button.layer.masksToBounds = YES;
|
|
|
+// [_resolution1080Button addTarget:self action:@selector(didClickResolution1080ButFun) forControlEvents:UIControlEventTouchUpInside];
|
|
|
+// [_bg0View addSubview:_resolution1080Button];
|
|
|
+//
|
|
|
+// [_resolution1080Button mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
+// make.right.mas_equalTo(-12);
|
|
|
+// make.width.mas_equalTo(93);
|
|
|
+// make.height.mas_equalTo(26);
|
|
|
+// make.centerY.mas_equalTo(0);
|
|
|
+// }];
|
|
|
+//
|
|
|
+// // gradient
|
|
|
+// _glayer = [CAGradientLayer layer];
|
|
|
+// _glayer.frame = CGRectMake(0, 0, 93, 26);
|
|
|
+// _glayer.startPoint = CGPointMake(0, 0.5);
|
|
|
+// _glayer.endPoint = CGPointMake(0.97, 0.5);
|
|
|
+// _glayer.colors = @[(__bridge id)[UIColor hwColor:@"#0CDEFD" alpha:1.0].CGColor, (__bridge id)[UIColor hwColor:@"#058DFB" alpha:1.0].CGColor];
|
|
|
+// _glayer.locations = @[@(0), @(1.0f)];
|
|
|
+//
|
|
|
+// [self firstSetResolutionFun];
|
|
|
+//
|
|
|
|
|
|
- [_bg0View mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
- make.height.mas_equalTo(36);
|
|
|
- make.left.mas_equalTo(12);
|
|
|
- make.right.mas_equalTo(-12);
|
|
|
- //make.top.mas_equalTo(16.f);
|
|
|
- make.top.mas_equalTo(62.f);
|
|
|
- }];
|
|
|
+ /***************************1.4.6新UI*******************************************************/
|
|
|
|
|
|
- //分辨率
|
|
|
- UILabel *resolutionTipLabel = [[UILabel alloc] init];
|
|
|
- resolutionTipLabel.text = NSLocalizedString(@"cloudPhone_player_set_resolution",nil);
|
|
|
- resolutionTipLabel.textColor = [UIColor whiteColor];
|
|
|
- resolutionTipLabel.font = [UIFont systemFontOfSize:12.0];
|
|
|
- [_bg0View addSubview:resolutionTipLabel];
|
|
|
+
|
|
|
|
|
|
- [resolutionTipLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
- make.left.mas_equalTo(15);
|
|
|
- make.top.equalTo(_bg0View.mas_top).offset(0);
|
|
|
- make.bottom.equalTo(_bg0View.mas_bottom).offset(0);
|
|
|
- }];
|
|
|
+ /***************************分辨率*******************************************************/
|
|
|
|
|
|
- _resolution720Button = [[UIButton alloc] init];
|
|
|
- _resolution720Button.layer.cornerRadius = 5;
|
|
|
- _resolution720Button.backgroundColor = [UIColor hwColor:@"#D8D8D8" alpha:0.09];
|
|
|
- [_resolution720Button setTitle:@"720*1280" forState:UIControlStateNormal];
|
|
|
- [_resolution720Button setTitleColor:[UIColor hwColor:@"#FFFFFF"] forState:UIControlStateNormal];
|
|
|
- _resolution720Button.titleLabel.font = [UIFont systemFontOfSize:12.0];
|
|
|
- _resolution720Button.layer.masksToBounds = YES;
|
|
|
- [_resolution720Button addTarget:self action:@selector(didClickResolution720ButFun) forControlEvents:UIControlEventTouchUpInside];
|
|
|
- [_bg0View addSubview:_resolution720Button];
|
|
|
-
|
|
|
- [_resolution720Button mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
- make.left.mas_equalTo(80);
|
|
|
- make.width.mas_equalTo(93);
|
|
|
- make.height.mas_equalTo(26);
|
|
|
- make.centerY.mas_equalTo(0);
|
|
|
- }];
|
|
|
+ _bg1ViewL = [UIView new];
|
|
|
+ _bg1ViewL.layer.cornerRadius = 8;
|
|
|
+ _bg1ViewL.backgroundColor = [UIColor hwColor:@"#29313D"];
|
|
|
+ [_blackBgView addSubview:_bg1ViewL];
|
|
|
|
|
|
- _resolution1080Button = [[UIButton alloc] init];
|
|
|
- _resolution1080Button.layer.cornerRadius = 5;
|
|
|
- _resolution1080Button.backgroundColor = [UIColor hwColor:@"#D8D8D8" alpha:0.09];
|
|
|
- [_resolution1080Button setTitle:@"1080*1920" forState:UIControlStateNormal];
|
|
|
- [_resolution1080Button setTitleColor:[UIColor hwColor:@"#FFFFFF"] forState:UIControlStateNormal];
|
|
|
- _resolution1080Button.titleLabel.font = [UIFont systemFontOfSize:12.0];
|
|
|
- _resolution1080Button.layer.masksToBounds = YES;
|
|
|
- [_resolution1080Button addTarget:self action:@selector(didClickResolution1080ButFun) forControlEvents:UIControlEventTouchUpInside];
|
|
|
- [_bg0View addSubview:_resolution1080Button];
|
|
|
-
|
|
|
- [_resolution1080Button mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
- make.right.mas_equalTo(-12);
|
|
|
- make.width.mas_equalTo(93);
|
|
|
- make.height.mas_equalTo(26);
|
|
|
- make.centerY.mas_equalTo(0);
|
|
|
+ [_bg1ViewL mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
+ make.height.mas_equalTo(42);
|
|
|
+ make.left.mas_equalTo(15);
|
|
|
+ make.right.equalTo(self.mas_centerX).offset(-6);
|
|
|
+ make.top.mas_equalTo(56.f);
|
|
|
}];
|
|
|
|
|
|
- // gradient
|
|
|
- _glayer = [CAGradientLayer layer];
|
|
|
- _glayer.frame = CGRectMake(0, 0, 93, 26);
|
|
|
- _glayer.startPoint = CGPointMake(0, 0.5);
|
|
|
- _glayer.endPoint = CGPointMake(0.97, 0.5);
|
|
|
- _glayer.colors = @[(__bridge id)[UIColor hwColor:@"#0CDEFD" alpha:1.0].CGColor, (__bridge id)[UIColor hwColor:@"#058DFB" alpha:1.0].CGColor];
|
|
|
- _glayer.locations = @[@(0), @(1.0f)];
|
|
|
|
|
|
- [self firstSetResolutionFun];
|
|
|
+ UILabel *bg1ViewLeftTipLab = [[UILabel alloc] init];
|
|
|
+ bg1ViewLeftTipLab.text = NSLocalizedString(@"cloudPhone_player_set_resolution",nil);
|
|
|
+ //bg1ViewLeftTipLab.textAlignment = NSTextAlignmentCenter;
|
|
|
+ bg1ViewLeftTipLab.textColor = [UIColor whiteColor];
|
|
|
+ bg1ViewLeftTipLab.font = [UIFont systemFontOfSize:12.0];
|
|
|
+ [_bg1ViewL addSubview:bg1ViewLeftTipLab];
|
|
|
+
|
|
|
+ [bg1ViewLeftTipLab mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
+ make.left.mas_equalTo(8);
|
|
|
+ make.top.mas_equalTo(0);
|
|
|
+ make.bottom.mas_equalTo(0);;
|
|
|
+ }];
|
|
|
|
|
|
- /***************************全面屏相关*******************************************************/
|
|
|
- _bg1View = [UIView new];
|
|
|
-// bg1View.layer.cornerRadius = 12;
|
|
|
-// bg1View.backgroundColor = [UIColor hwColor:@"#29313D"];
|
|
|
- [_blackBgView addSubview:_bg1View];
|
|
|
+ //开启和关闭多国语言
|
|
|
+ NSString *onStr = NSLocalizedString(@"UISwitch_open_title",nil);
|
|
|
+ NSString *offStr = NSLocalizedString(@"UISwitch_close_title",nil);
|
|
|
|
|
|
- [_bg1View mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
+ _resolutionSwitch = [[customSwitchButton alloc] initWithFrame:CGRectMake(0, 0,80, 26)
|
|
|
+ onText:@"720"
|
|
|
+ offText:@"1080"];
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ [_bg1ViewL addSubview:_resolutionSwitch];
|
|
|
+
|
|
|
+ [_resolutionSwitch mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
+ make.right.mas_equalTo(-8.f);
|
|
|
+ make.centerY.mas_equalTo(0.f);
|
|
|
+ make.width.mas_equalTo(80.f);
|
|
|
+ make.height.mas_equalTo(26.f);
|
|
|
+ }];
|
|
|
+
|
|
|
+ KWeakSelf
|
|
|
+ _resolutionSwitch.didClickSwitchButtonFun = ^(BOOL isOn) {
|
|
|
+ [weakSelf maskSwitchPressed:weakSelf.resolutionSwitch];
|
|
|
+ };
|
|
|
+
|
|
|
+ /***************************导航栏*******************************************************/
|
|
|
+ _bg1ViewR = [UIView new];
|
|
|
+ _bg1ViewR.layer.cornerRadius = 8;
|
|
|
+ _bg1ViewR.backgroundColor = [UIColor hwColor:@"#29313D"];
|
|
|
+ [_blackBgView addSubview:_bg1ViewR];
|
|
|
+ [_bg1ViewR mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
make.height.mas_equalTo(42);
|
|
|
- make.left.mas_equalTo(12);
|
|
|
- make.right.mas_equalTo(-12);
|
|
|
- make.top.mas_equalTo(112.f);
|
|
|
- //make.top.mas_equalTo(54.f);
|
|
|
+ make.right.mas_equalTo(-15);
|
|
|
+ make.left.equalTo(self.mas_centerX).offset(6);
|
|
|
+ make.top.mas_equalTo(56.f);
|
|
|
}];
|
|
|
|
|
|
- UIView *bgBottomNavView = [UIView new];
|
|
|
- bgBottomNavView.layer.cornerRadius = 8;
|
|
|
- bgBottomNavView.backgroundColor = [UIColor hwColor:@"#29313D"];
|
|
|
- [_blackBgView addSubview:bgBottomNavView];
|
|
|
|
|
|
- [bgBottomNavView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
- make.bottom.mas_equalTo(_bg1View.mas_bottom);
|
|
|
- make.left.mas_equalTo(12);
|
|
|
- make.right.equalTo(self.mas_centerX).offset(-6);
|
|
|
- //make.top.mas_equalTo(16.f);
|
|
|
- make.top.mas_equalTo(_bg1View.mas_top);
|
|
|
+ UILabel *bg1ViewRightTipLab = [[UILabel alloc] init];
|
|
|
+ bg1ViewRightTipLab.text = NSLocalizedString(@"cloudPhone_nav_show_tip",nil);
|
|
|
+ //bg1ViewRightTipLab.textAlignment = NSTextAlignmentCenter;
|
|
|
+ bg1ViewRightTipLab.textColor = [UIColor whiteColor];
|
|
|
+ bg1ViewRightTipLab.font = [UIFont systemFontOfSize:12.0];
|
|
|
+ [_bg1ViewR addSubview:bg1ViewRightTipLab];
|
|
|
+
|
|
|
+ [bg1ViewRightTipLab mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
+ make.left.mas_equalTo(8);
|
|
|
+ make.top.mas_equalTo(0);
|
|
|
+ make.bottom.mas_equalTo(0);;
|
|
|
}];
|
|
|
|
|
|
- UILabel *navSwitchTipLabel = [[UILabel alloc] init];
|
|
|
- navSwitchTipLabel.text = NSLocalizedString(@"cloudPhone_nav_show_tip",nil);
|
|
|
- //navSwitchTipLabel.textAlignment = NSTextAlignmentCenter;
|
|
|
- navSwitchTipLabel.textColor = [UIColor whiteColor];
|
|
|
- navSwitchTipLabel.font = [UIFont systemFontOfSize:12.0];
|
|
|
- [bgBottomNavView addSubview:navSwitchTipLabel];
|
|
|
-
|
|
|
- [navSwitchTipLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
- make.left.mas_equalTo(15);
|
|
|
- make.top.equalTo(bgBottomNavView.mas_top).offset(0);
|
|
|
- make.bottom.equalTo(bgBottomNavView.mas_bottom).offset(0);
|
|
|
- }];
|
|
|
+ //开启和关闭多国语言
|
|
|
+ //NSString *onStr = NSLocalizedString(@"UISwitch_open_title",nil);
|
|
|
+ //NSString *offStr = NSLocalizedString(@"UISwitch_close_title",nil);
|
|
|
|
|
|
- //底部导航栏开关
|
|
|
- _bottomNavSwitch = [[SYJUISwitch alloc] initWithFrame:CGRectMake(0, 0, 44, 22)];
|
|
|
- _bottomNavSwitch.onTintColor = HW13B2EBColor;
|
|
|
- _bottomNavSwitch.offTintColor = [UIColor hwColor:@"#E3E8F1"];
|
|
|
- [_bottomNavSwitch addTarget:self action:@selector(maskSwitchPressed:) forControlEvents:UIControlEventValueChanged];
|
|
|
- [bgBottomNavView addSubview:_bottomNavSwitch];
|
|
|
+ _bottomNavSwitch = [[customSwitchButton alloc] initWithFrame:CGRectMake(0, 0,80, 26)
|
|
|
+ onText:onStr
|
|
|
+ offText:offStr];
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ [_bg1ViewR addSubview:_bottomNavSwitch];
|
|
|
+
|
|
|
[_bottomNavSwitch mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
- make.right.mas_equalTo(-15.f);
|
|
|
- make.centerY.mas_equalTo(0.f);
|
|
|
- make.width.mas_equalTo(44.f);
|
|
|
- make.height.mas_equalTo(22.f);
|
|
|
+ make.right.mas_equalTo(-8.f);
|
|
|
+ make.centerY.mas_equalTo(0.f);
|
|
|
+ make.width.mas_equalTo(80.f);
|
|
|
+ make.height.mas_equalTo(26.f);
|
|
|
}];
|
|
|
+
|
|
|
+ _bottomNavSwitch.didClickSwitchButtonFun = ^(BOOL isOn) {
|
|
|
+ [weakSelf maskSwitchPressed:weakSelf.bottomNavSwitch];
|
|
|
+ };
|
|
|
|
|
|
|
|
|
+ /***************************全面屏相关*******************************************************/
|
|
|
+
|
|
|
+
|
|
|
//全面屏开关
|
|
|
- UIView *bgFullScreenView = [UIView new];
|
|
|
- bgFullScreenView.layer.cornerRadius = 8;
|
|
|
- bgFullScreenView.backgroundColor = [UIColor hwColor:@"#29313D"];
|
|
|
- [_blackBgView addSubview:bgFullScreenView];
|
|
|
+ _bg2ViewL = [UIView new];
|
|
|
+ _bg2ViewL.layer.cornerRadius = 8;
|
|
|
+ _bg2ViewL.backgroundColor = [UIColor hwColor:@"#29313D"];
|
|
|
+ [_blackBgView addSubview:_bg2ViewL];
|
|
|
|
|
|
- [bgFullScreenView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
- make.bottom.mas_equalTo(_bg1View.mas_bottom);
|
|
|
- make.right.mas_equalTo(-12);
|
|
|
- make.left.equalTo(self.mas_centerX).offset(6);
|
|
|
- //make.top.mas_equalTo(16.f);
|
|
|
- make.top.mas_equalTo(_bg1View.mas_top);
|
|
|
+ [_bg2ViewL mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
+ make.height.mas_equalTo(42);
|
|
|
+ make.left.mas_equalTo(15);
|
|
|
+ make.right.equalTo(self.mas_centerX).offset(-6);
|
|
|
+ make.top.equalTo(_bg1ViewL.mas_bottom).offset(14);
|
|
|
}];
|
|
|
|
|
|
UILabel *fullScreenTipLabel = [[UILabel alloc] init];
|
|
|
@@ -365,85 +360,111 @@
|
|
|
//fullScreenTipLabel.textAlignment = NSTextAlignmentCenter;
|
|
|
fullScreenTipLabel.textColor = [UIColor whiteColor];
|
|
|
fullScreenTipLabel.font = [UIFont systemFontOfSize:12.0];
|
|
|
- [bgFullScreenView addSubview:fullScreenTipLabel];
|
|
|
+ [_bg2ViewL addSubview:fullScreenTipLabel];
|
|
|
|
|
|
[fullScreenTipLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
- make.left.mas_equalTo(15);
|
|
|
- make.top.equalTo(bgFullScreenView.mas_top).offset(0);
|
|
|
- make.bottom.equalTo(bgFullScreenView.mas_bottom).offset(0);
|
|
|
+ make.left.mas_equalTo(8);
|
|
|
+ make.top.mas_equalTo(0);
|
|
|
+ make.bottom.mas_equalTo(0);;
|
|
|
}];
|
|
|
|
|
|
- _fullScreenSwitch = [[SYJUISwitch alloc] initWithFrame:CGRectMake(0, 0, 44, 22)];
|
|
|
- _fullScreenSwitch.onTintColor = HW13B2EBColor;
|
|
|
- _fullScreenSwitch.offTintColor = [UIColor hwColor:@"#E3E8F1"];
|
|
|
- [_fullScreenSwitch addTarget:self action:@selector(maskSwitchPressed:) forControlEvents:UIControlEventValueChanged];
|
|
|
- [bgFullScreenView addSubview:_fullScreenSwitch];
|
|
|
+ //开启和关闭多国语言
|
|
|
+ //NSString *onStr = NSLocalizedString(@"UISwitch_open_title",nil);
|
|
|
+ //NSString *offStr = NSLocalizedString(@"UISwitch_close_title",nil);
|
|
|
+
|
|
|
+ _fullScreenSwitch = [[customSwitchButton alloc] initWithFrame:CGRectMake(0, 0,80, 26)
|
|
|
+ onText:onStr
|
|
|
+ offText:offStr];
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ [_bg2ViewL addSubview:_fullScreenSwitch];
|
|
|
+
|
|
|
[_fullScreenSwitch mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
- make.right.mas_equalTo(-15.f);
|
|
|
- make.centerY.mas_equalTo(0.f);
|
|
|
- make.width.mas_equalTo(44.f);
|
|
|
- make.height.mas_equalTo(22.f);
|
|
|
+ make.right.mas_equalTo(-8.f);
|
|
|
+ make.centerY.mas_equalTo(0.f);
|
|
|
+ make.width.mas_equalTo(80.f);
|
|
|
+ make.height.mas_equalTo(26.f);
|
|
|
}];
|
|
|
+
|
|
|
+ _fullScreenSwitch.didClickSwitchButtonFun = ^(BOOL isOn) {
|
|
|
+ [weakSelf maskSwitchPressed:weakSelf.fullScreenSwitch];
|
|
|
+ };
|
|
|
|
|
|
|
|
|
-
|
|
|
- KWeakSelf
|
|
|
+ //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];
|
|
|
- bg2View.layer.cornerRadius = 12;
|
|
|
- bg2View.backgroundColor = [UIColor hwColor:@"#29313D"];
|
|
|
- [_blackBgView addSubview:bg2View];
|
|
|
-
|
|
|
- [bg2View mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
- make.height.mas_equalTo(72);
|
|
|
- make.left.mas_equalTo(15);
|
|
|
- make.right.mas_equalTo(-15);
|
|
|
- make.top.equalTo(_bg1View.mas_bottom).offset(12);
|
|
|
- //make.top.mas_equalTo(52);
|
|
|
- }];
|
|
|
+// UIView *bg2View = [UIView new];
|
|
|
+// bg2View.layer.cornerRadius = 12;
|
|
|
+// bg2View.backgroundColor = [UIColor hwColor:@"#29313D"];
|
|
|
+// [_blackBgView addSubview:bg2View];
|
|
|
+//
|
|
|
+// [bg2View mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
+// make.height.mas_equalTo(72);
|
|
|
+// make.left.mas_equalTo(15);
|
|
|
+// make.right.mas_equalTo(-15);
|
|
|
+// make.top.equalTo(_bg1View.mas_bottom).offset(12);
|
|
|
+// //make.top.mas_equalTo(52);
|
|
|
+// }];
|
|
|
|
|
|
|
|
|
- NSArray *titleArr = @[NSLocalizedString(@"cloudPhone_set_screenshot_tip",nil),
|
|
|
+ NSArray *titleArr = @[NSLocalizedString(@"cloudPhone_set_app_upload_tip",nil),
|
|
|
NSLocalizedString(@"my_set_no_TV_p2p",nil),
|
|
|
- //NSLocalizedString(@"my_set_no_close_TV_p2p",nil),
|
|
|
+ NSLocalizedString(@"cloudPhone_set_copy_tip",nil),
|
|
|
+ NSLocalizedString(@"cloudPhone_set_screenshot_tip",nil),
|
|
|
NSLocalizedString(@"my_set_no_restart_phone",nil),
|
|
|
- //NSLocalizedString(@"cloudPhone_set_exit_tip",nil),
|
|
|
];
|
|
|
|
|
|
- NSArray *imageArr = @[@"cloudPhone_set_screenshot",
|
|
|
+ NSArray *imageArr = @[@"cloudPhone_set_app_upload",
|
|
|
@"cloudPhone_set_TV",
|
|
|
+ @"cloudPhone_set_copy",
|
|
|
+ @"cloudPhone_set_screenshot",
|
|
|
@"cloudPhone_set_restart",
|
|
|
- //@"cloudPhone_set_exit",
|
|
|
];
|
|
|
|
|
|
|
|
|
- CGFloat butTopY = 15.0;
|
|
|
+ //CGFloat butTopY = 15.0;
|
|
|
CGFloat imageWH = 24.0;
|
|
|
|
|
|
- CGFloat butHeight = imageWH +20 +5;
|
|
|
- CGFloat butWidth = (320 -15*2)/3.0; //70.0;
|
|
|
- //CGFloat butWidth = (245 -12*2)/2.0; //70.0;
|
|
|
- CGFloat butSpace = 0.0; //(245 - butWidth*3)/3.0;
|
|
|
+// CGFloat butHeight = imageWH +20 +5;
|
|
|
+// CGFloat butWidth = (320 -15*2)/3.0; //70.0;
|
|
|
+// //CGFloat butWidth = (245 -12*2)/2.0; //70.0;
|
|
|
+// CGFloat butSpace = 0.0; //(245 - butWidth*3)/3.0;
|
|
|
|
|
|
for (int i=0; i<titleArr.count; i++) {
|
|
|
|
|
|
UIButton *but = [[UIButton alloc] init];
|
|
|
//but.tag = 10+i;
|
|
|
but.tag = 200+i;
|
|
|
+ but.layer.cornerRadius = 8;
|
|
|
+ but.backgroundColor = [UIColor hwColor:@"#29313D"];
|
|
|
[but addTarget:self action:@selector(didClickButtonFun:) forControlEvents:UIControlEventTouchUpInside];
|
|
|
- [bg2View addSubview:but];
|
|
|
+ [_blackBgView addSubview:but];
|
|
|
//but.backgroundColor = [UIColor greenColor];
|
|
|
|
|
|
[but mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
- make.left.mas_equalTo(butSpace + (butWidth+butSpace)*(i%4));
|
|
|
- make.width.mas_equalTo(butWidth);
|
|
|
- make.height.mas_equalTo(butHeight);
|
|
|
- make.top.mas_equalTo(butTopY + (i/4)* (butHeight + 25) );
|
|
|
+// make.left.mas_equalTo(butSpace + (butWidth+butSpace)*(i%4));
|
|
|
+// make.width.mas_equalTo(butWidth);
|
|
|
+// make.height.mas_equalTo(butHeight);
|
|
|
+// make.top.mas_equalTo(butTopY + (i/4)* (butHeight + 25) );
|
|
|
+
|
|
|
+ make.height.mas_equalTo(42);
|
|
|
+ if(i%2 == 0){
|
|
|
+ make.right.mas_equalTo(-15);
|
|
|
+ make.left.equalTo(self.mas_centerX).offset(6);
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ make.left.mas_equalTo(15);
|
|
|
+ make.right.equalTo(self.mas_centerX).offset(-6);
|
|
|
+ }
|
|
|
+
|
|
|
+ make.top.equalTo(_bg2ViewL.mas_top).offset((ceil(i/2.0)) *(42 + 14));
|
|
|
+
|
|
|
}];
|
|
|
|
|
|
UIImageView *imageV = [[UIImageView alloc] init];
|
|
|
@@ -451,10 +472,15 @@
|
|
|
[but addSubview:imageV];
|
|
|
|
|
|
[imageV mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
- make.centerX.mas_equalTo(0);
|
|
|
+// make.centerX.mas_equalTo(0);
|
|
|
+// make.width.mas_equalTo(imageWH);
|
|
|
+// make.height.mas_equalTo(imageWH);
|
|
|
+// make.top.mas_equalTo(0);
|
|
|
+
|
|
|
+ make.centerY.mas_equalTo(0);
|
|
|
make.width.mas_equalTo(imageWH);
|
|
|
make.height.mas_equalTo(imageWH);
|
|
|
- make.top.mas_equalTo(0);
|
|
|
+ make.left.mas_equalTo(16);
|
|
|
}];
|
|
|
|
|
|
NSString *curText = titleArr[i];
|
|
|
@@ -471,13 +497,23 @@
|
|
|
//textLabel.backgroundColor = [UIColor redColor];
|
|
|
|
|
|
[textLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
- make.centerX.mas_equalTo(0);
|
|
|
- make.width.mas_equalTo(butWidth);
|
|
|
+// make.centerX.mas_equalTo(0);
|
|
|
+// make.width.mas_equalTo(butWidth);
|
|
|
+// make.height.mas_equalTo(20);
|
|
|
+// make.top.equalTo(imageV.mas_bottom).offset(0);
|
|
|
+
|
|
|
+ make.centerY.mas_equalTo(0);
|
|
|
+ //make.width.mas_equalTo(butWidth);
|
|
|
make.height.mas_equalTo(20);
|
|
|
- make.top.equalTo(imageV.mas_bottom).offset(0);
|
|
|
+ make.left.equalTo(imageV.mas_right).offset(8);
|
|
|
}];
|
|
|
|
|
|
- if(i==1){
|
|
|
+ if(i==0){
|
|
|
+ but.alpha = 0.5;
|
|
|
+ but.enabled = NO;
|
|
|
+ but.userInteractionEnabled = NO;
|
|
|
+ }
|
|
|
+ else if(i==1){
|
|
|
_TVButton = but;
|
|
|
_TVShowLabel = textLabel;
|
|
|
|
|
|
@@ -498,7 +534,6 @@
|
|
|
[_exitPhoneButton.titleLabel setFont:[UIFont systemFontOfSize:12.f]];
|
|
|
_exitPhoneButton.backgroundColor = [UIColor hwColor:@"#29313D"];
|
|
|
[_blackBgView addSubview:_exitPhoneButton];
|
|
|
-
|
|
|
// if(ksharedAppDelegate.TvStatusMod.isTVShowType){
|
|
|
// _TVButton.selected = YES;
|
|
|
// }
|
|
|
@@ -507,7 +542,8 @@
|
|
|
make.height.mas_equalTo(42);
|
|
|
make.left.mas_equalTo(12);
|
|
|
make.right.mas_equalTo(-12);
|
|
|
- make.top.equalTo(bg2View.mas_bottom).offset(12);
|
|
|
+ //make.top.equalTo(bg2View.mas_bottom).offset(12);
|
|
|
+ make.bottom.mas_equalTo(-18);
|
|
|
}];
|
|
|
|
|
|
[self handleResolutionUIFun];
|
|
|
@@ -520,9 +556,17 @@
|
|
|
|
|
|
BOOL fullscreenType = [HWDataManager getBoolWithKey:Consn_player_full_screen_show];
|
|
|
[_fullScreenSwitch setOn:fullscreenType];
|
|
|
+
|
|
|
+ NSInteger curResolution = [HWDataManager getIntegerWithKey:Const_cloudPhone_cur_resolution];
|
|
|
+ if(curResolution == 0 || curResolution == 1){
|
|
|
+ _resolutionSwitch.on = YES;
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ _resolutionSwitch.on = NO;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
-- (void)maskSwitchPressed:(SYJUISwitch *)maskSwitch{
|
|
|
+- (void)maskSwitchPressed:(customSwitchButton *)maskSwitch{
|
|
|
if(_bottomNavSwitch == maskSwitch){
|
|
|
if (maskSwitch.on) {
|
|
|
[HWDataManager setBoolWithKey:Consn_player_Nav_hide value:NO];
|
|
|
@@ -556,7 +600,16 @@
|
|
|
[self handleResolutionUIFun];
|
|
|
[[NSNotificationCenter defaultCenter] postNotificationName:setPlayerFullScreenNotification object:nil];
|
|
|
}
|
|
|
-
|
|
|
+ else if (_resolutionSwitch == maskSwitch){
|
|
|
+
|
|
|
+ if (maskSwitch.on) {
|
|
|
+ [self didClickResolution720ButFun];
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ [self didClickResolution1080ButFun];
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
//[self removeFun];
|
|
|
}
|
|
|
|
|
|
@@ -660,14 +713,14 @@
|
|
|
- (void)firstSetResolutionFun
|
|
|
{
|
|
|
NSInteger curResolution = [HWDataManager getIntegerWithKey:Const_cloudPhone_cur_resolution];
|
|
|
- if(curResolution == 0 || curResolution == 1){
|
|
|
- _resolution720Button.selected = YES;
|
|
|
- [_resolution720Button.layer insertSublayer:_glayer atIndex:0];
|
|
|
- }
|
|
|
- else{
|
|
|
- _resolution1080Button.selected = YES;
|
|
|
- [_resolution1080Button.layer insertSublayer:_glayer atIndex:0];
|
|
|
- }
|
|
|
+// if(curResolution == 0 || curResolution == 1){
|
|
|
+// _resolution720Button.selected = YES;
|
|
|
+// [_resolution720Button.layer insertSublayer:_glayer atIndex:0];
|
|
|
+// }
|
|
|
+// else{
|
|
|
+// _resolution1080Button.selected = YES;
|
|
|
+// [_resolution1080Button.layer insertSublayer:_glayer atIndex:0];
|
|
|
+// }
|
|
|
}
|
|
|
|
|
|
#pragma mark 是否要显示设置分辨率(全面屏要隐藏)
|
|
|
@@ -675,41 +728,45 @@
|
|
|
{
|
|
|
BOOL isHide = [HWDataManager getBoolWithKey:Consn_player_full_screen_show];
|
|
|
if (isHide) {
|
|
|
- [_blackBgView mas_updateConstraints:^(MASConstraintMaker *make) {
|
|
|
- make.height.mas_equalTo(260);//(256);
|
|
|
- }];
|
|
|
+// [_blackBgView mas_updateConstraints:^(MASConstraintMaker *make) {
|
|
|
+// make.height.mas_equalTo(260);//(256);
|
|
|
+// }];
|
|
|
+//
|
|
|
+// _bg0View.hidden = YES;
|
|
|
+//
|
|
|
+// [_bg1View mas_updateConstraints:^(MASConstraintMaker *make) {
|
|
|
+// make.top.mas_equalTo(62);
|
|
|
+// }];
|
|
|
|
|
|
- _bg0View.hidden = YES;
|
|
|
-
|
|
|
- [_bg1View mas_updateConstraints:^(MASConstraintMaker *make) {
|
|
|
- make.top.mas_equalTo(62);
|
|
|
- }];
|
|
|
-
|
|
|
+ _bg1ViewL.alpha = 0.5;
|
|
|
+ _resolutionSwitch.enabled = NO;
|
|
|
}
|
|
|
else{
|
|
|
+ _bg1ViewL.alpha = 1.0;
|
|
|
+ _resolutionSwitch.enabled = YES;
|
|
|
|
|
|
- [_blackBgView mas_updateConstraints:^(MASConstraintMaker *make) {
|
|
|
- make.height.mas_equalTo(260 + 50);//(256);
|
|
|
- }];
|
|
|
-
|
|
|
- _bg0View.hidden = NO;
|
|
|
-
|
|
|
- [_bg1View mas_updateConstraints:^(MASConstraintMaker *make) {
|
|
|
- make.top.mas_equalTo(112);
|
|
|
- }];
|
|
|
+// [_blackBgView mas_updateConstraints:^(MASConstraintMaker *make) {
|
|
|
+// make.height.mas_equalTo(260 + 50);//(256);
|
|
|
+// }];
|
|
|
+//
|
|
|
+// _bg0View.hidden = NO;
|
|
|
+//
|
|
|
+// [_bg1View mas_updateConstraints:^(MASConstraintMaker *make) {
|
|
|
+// make.top.mas_equalTo(112);
|
|
|
+// }];
|
|
|
}
|
|
|
}
|
|
|
|
|
|
#pragma mark 点击了分辨率720
|
|
|
- (void)didClickResolution720ButFun
|
|
|
{
|
|
|
- if(_resolution720Button.selected){
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- _resolution1080Button.selected = NO;
|
|
|
- _resolution720Button.selected = YES;
|
|
|
- [_resolution720Button.layer insertSublayer:_glayer atIndex:0];
|
|
|
+// if(_resolution720Button.selected){
|
|
|
+// return;
|
|
|
+// }
|
|
|
+//
|
|
|
+// _resolution1080Button.selected = NO;
|
|
|
+// _resolution720Button.selected = YES;
|
|
|
+// [_resolution720Button.layer insertSublayer:_glayer atIndex:0];
|
|
|
|
|
|
if(_didClickButtonFun){
|
|
|
_didClickButtonFun(1);
|
|
|
@@ -721,12 +778,12 @@
|
|
|
#pragma mark 点击了分辨率1080
|
|
|
- (void)didClickResolution1080ButFun
|
|
|
{
|
|
|
- if(_resolution1080Button.selected){
|
|
|
- return;
|
|
|
- }
|
|
|
- _resolution720Button.selected = NO;
|
|
|
- _resolution1080Button.selected = YES;
|
|
|
- [_resolution1080Button.layer insertSublayer:_glayer atIndex:0];
|
|
|
+// if(_resolution1080Button.selected){
|
|
|
+// return;
|
|
|
+// }
|
|
|
+// _resolution720Button.selected = NO;
|
|
|
+// _resolution1080Button.selected = YES;
|
|
|
+// [_resolution1080Button.layer insertSublayer:_glayer atIndex:0];
|
|
|
|
|
|
if(_didClickButtonFun){
|
|
|
_didClickButtonFun(2);
|