|
@@ -11,6 +11,7 @@
|
|
|
@interface playerSetView ()
|
|
|
@property(nonatomic, strong) SYJUISwitch * bottomNavSwitch;//底部导航栏开关
|
|
|
@property(nonatomic, strong) SYJUISwitch * fullScreenSwitch;//全面屏开关
|
|
|
+@property(nonatomic, strong) UIButton *TVButton;
|
|
|
@end
|
|
|
|
|
|
@implementation playerSetView
|
|
@@ -18,6 +19,9 @@
|
|
|
- (id)initWithFrame:(CGRect)frame{
|
|
|
self = [super initWithFrame:frame];
|
|
|
self.backgroundColor = [UIColor hwColor:@"000000" alpha:0.6];
|
|
|
+
|
|
|
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(getCouldPhoneTvStatusFun:) name:getCouldPhoneTvStatusNotification object:nil];
|
|
|
+
|
|
|
[self drawAnyView];
|
|
|
|
|
|
return self;
|
|
@@ -137,12 +141,12 @@
|
|
|
}];
|
|
|
|
|
|
|
|
|
- NSArray *titleArr = @[NSLocalizedString(@"cloudPhone_set_screenshot_tip",nil),
|
|
|
+ NSArray *titleArr = @[//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_screenshot",
|
|
|
@"cloudPhone_set_restart",
|
|
|
@"cloudPhone_set_exit",
|
|
|
];
|
|
@@ -151,13 +155,15 @@
|
|
|
CGFloat imageWH = 24.0;
|
|
|
|
|
|
CGFloat butHeight = imageWH +20 +5;
|
|
|
- CGFloat butWidth = (245 -12*2)/3.0; //70.0;
|
|
|
+ //CGFloat butWidth = (245 -12*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 = 10+i;
|
|
|
+ but.tag = 11+i;
|
|
|
[but addTarget:self action:@selector(didClickButtonFun:) forControlEvents:UIControlEventTouchUpInside];
|
|
|
[bg2View addSubview:but];
|
|
|
//but.backgroundColor = [UIColor greenColor];
|
|
@@ -198,18 +204,21 @@
|
|
|
}
|
|
|
|
|
|
/**********************************************************************************/
|
|
|
- UIButton *TVButton = [[UIButton alloc] init];
|
|
|
- TVButton.tag = 100;
|
|
|
- [TVButton addTarget:self action:@selector(didClickButtonFun:) forControlEvents:UIControlEventTouchUpInside];
|
|
|
- [TVButton setTitle:NSLocalizedString(@"my_set_no_TV_p2p",nil) forState:(UIControlStateNormal)];
|
|
|
- [TVButton setTitle:NSLocalizedString(@"my_set_no_close_TV_p2p",nil) forState:(UIControlStateSelected)];
|
|
|
- TVButton.layer.cornerRadius = 12;
|
|
|
- [TVButton.titleLabel setFont:[UIFont boldSystemFontOfSize:14.f]];
|
|
|
- TVButton.backgroundColor = [UIColor hwColor:@"#29313D"];
|
|
|
- [blackBgView addSubview:TVButton];
|
|
|
+ _TVButton = [[UIButton alloc] init];
|
|
|
+ _TVButton.tag = 100;
|
|
|
+ [_TVButton addTarget:self action:@selector(didClickButtonFun:) forControlEvents:UIControlEventTouchUpInside];
|
|
|
+ [_TVButton setTitle:NSLocalizedString(@"my_set_no_TV_p2p",nil) forState:(UIControlStateNormal)];
|
|
|
+ [_TVButton setTitle:NSLocalizedString(@"my_set_no_close_TV_p2p",nil) forState:(UIControlStateSelected)];
|
|
|
+ _TVButton.layer.cornerRadius = 12;
|
|
|
+ [_TVButton.titleLabel setFont:[UIFont boldSystemFontOfSize:14.f]];
|
|
|
+ _TVButton.backgroundColor = [UIColor hwColor:@"#29313D"];
|
|
|
+ [blackBgView addSubview:_TVButton];
|
|
|
|
|
|
+ if(ksharedAppDelegate.TvStatusMod.isTVShowType){
|
|
|
+ _TVButton.selected = YES;
|
|
|
+ }
|
|
|
|
|
|
- [TVButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
+ [_TVButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
make.height.mas_equalTo(50);
|
|
|
make.left.mas_equalTo(12);
|
|
|
make.right.mas_equalTo(-12);
|
|
@@ -254,4 +263,14 @@
|
|
|
{
|
|
|
[self removeFromSuperview];
|
|
|
}
|
|
|
+
|
|
|
+- (void)getCouldPhoneTvStatusFun:(NSNotification*)not
|
|
|
+{
|
|
|
+ if(ksharedAppDelegate.TvStatusMod.isTVShowType){
|
|
|
+ _TVButton.selected = YES;
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ _TVButton.selected = NO;
|
|
|
+ }
|
|
|
+}
|
|
|
@end
|