Przeglądaj źródła

1.悬浮按钮无操作指引图

huangxiaodong 1 rok temu
rodzic
commit
d872c25443

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

@@ -73,6 +73,9 @@ UIKIT_EXTERN NSString *const Const_Have_No_VaildTime;
 UIKIT_EXTERN NSString *const Const_haveVersion;
 
 UIKIT_EXTERN NSString *const Const_AirpayOrWXorderNum;
+
+/*标记是否展示浮标提示*/
+UIKIT_EXTERN NSString *const Const_did_Show_playView_controlBtn_Tip;
 @end
 
 NS_ASSUME_NONNULL_END

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

@@ -69,4 +69,7 @@ NSString *const Const_Have_No_VaildTime  = @"Const_Have_No_VaildTime";
 NSString *const Const_haveVersion = @"Const_haveVersion";
 
 NSString *const Const_AirpayOrWXorderNum = @"AirpayOrWXorderNum";
+
+/*标记是否展示浮标提示*/
+NSString *const Const_did_Show_playView_controlBtn_Tip  = @"Const_did_Show_playView_controlBtn_Tip";
 @end

+ 4 - 1
创维盒子/双子星云手机/CloudPlayer/PlayerViewController.h

@@ -11,7 +11,8 @@
 #import "PlayerView.h"
 #import <RCCloudPhoneSDK/RCAudioPlayer.h>
 #import <RCCloudPhoneSDK/RCCommandChannel.h>
-
+#import "PlayerControlButTipView.h"
+#import "Const.h"
 @protocol PlayerViewControllerDelegate <NSObject>
 
 @optional
@@ -48,6 +49,8 @@
 @property(copy,nonatomic)NSString *ip;
 @property(copy,nonatomic)NSString *deviceId;
 @property(nonatomic,assign)BOOL canControl;/*是否可以控制设备*/
+
+@property(strong,nonatomic)PlayerControlButTipView *PlayerControlButTipV;
 /**
 * @brief vpnStatus 1:开启    0:关闭
 */

+ 23 - 0
创维盒子/双子星云手机/CloudPlayer/PlayerViewController.mm

@@ -954,6 +954,29 @@ ComontAlretViewControllerDelegate>
     }
     
     HLog(@"云手机推流界面 控制按钮中点%@",NSStringFromCGPoint(mPlayerView.controlBtn.center));
+    
+    BOOL didShowControlBtnTip = [HWDataManager getBoolWithKey:Const_did_Show_playView_controlBtn_Tip];
+
+    if(!didShowControlBtnTip && !_PlayerControlButTipV){
+        mPlayerView.controlBtn.hidden = YES;
+        
+        _PlayerControlButTipV = [[PlayerControlButTipView alloc] init];
+        _PlayerControlButTipV.backgroundColor = [UIColor hwColor:@"000000" alpha:0.6];
+        [self.view addSubview:_PlayerControlButTipV];
+        [self.view bringSubviewToFront:_PlayerControlButTipV];
+        
+        [_PlayerControlButTipV mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.right.mas_equalTo(0);
+            make.top.mas_equalTo(0.f);
+            make.left.mas_equalTo(0.f);
+            make.bottom.mas_equalTo(0.f);
+        }];
+        
+        
+        _PlayerControlButTipV.didKnowPlayerControlButTip = ^{
+            self->mPlayerView.controlBtn.hidden = NO;
+        };
+    }
 }
 
 #pragma mark - 手势权限控制处理

+ 1 - 1
创维盒子/双子星云手机/CloudPlayer/View/PlayerControlButTipView.h

@@ -10,7 +10,7 @@
 NS_ASSUME_NONNULL_BEGIN
 
 @interface PlayerControlButTipView : UIView
-
+@property (nonatomic,copy) void (^didKnowPlayerControlButTip)(void);
 @end
 
 NS_ASSUME_NONNULL_END

+ 94 - 3
创维盒子/双子星云手机/CloudPlayer/View/PlayerControlButTipView.m

@@ -9,13 +9,13 @@
 @interface PlayerControlButTipView()
 
 @property(nonatomic,strong)UIImageView *ControlButTipLineImageView;
-
+@property(nonatomic,strong)UIImageView *ControlImageView;
 @end
 @implementation PlayerControlButTipView
 
 - (id)initWithFrame:(CGRect)frame{
     self = [super initWithFrame:frame];
-    
+    self.backgroundColor = [UIColor hwColor:@"000000" alpha:0.6];
     [self drawAnyView];
     
     return self;
@@ -29,10 +29,101 @@
     
     CGFloat curCenterY = SCREEN_H/2.0 + 30;
     [_ControlButTipLineImageView mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.left.mas_equalTo(10.f);
+        make.left.mas_equalTo(40.f);
         make.height.mas_equalTo(56);
         make.width.mas_equalTo(16.f);
         make.bottom.mas_equalTo(-curCenterY);
     }];
+    
+    _ControlImageView = [[UIImageView alloc] init];
+    _ControlImageView.image = [UIImage imageNamed:@"you_icon"];
+    [self addSubview:_ControlImageView];
+    
+    [_ControlImageView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.centerX.equalTo(_ControlButTipLineImageView.mas_centerX).offset(0.f);
+        make.height.mas_equalTo(60.f);
+        make.width.mas_equalTo(60.f);
+        make.top.equalTo(_ControlButTipLineImageView.mas_bottom).offset(0.f);
+    }];
+    
+    /*确认按钮*/
+    UIButton* okBtn = [[UIButton alloc] init];
+    CGFloat okBtn_W= 250;
+    // gradient
+    CAGradientLayer *gl = [CAGradientLayer layer];
+    gl.frame = CGRectMake(0,0,okBtn_W,48);
+    gl.startPoint = CGPointMake(0, 0.5);
+    gl.endPoint = CGPointMake(1, 0.5);
+    gl.colors = @[(__bridge id)HW0CDEFDColor.CGColor, (__bridge id)HW058DFBColor.CGColor];
+    gl.locations = @[@(0), @(1.0f)];
+    okBtn.layer.cornerRadius = 24;
+    okBtn.clipsToBounds = YES;
+    [okBtn.layer addSublayer:gl];
+    [okBtn setTitle:NSLocalizedString(@"player_ControlButton_Tip",nil) forState:(UIControlStateNormal)];
+    [okBtn setTitleColor:[UIColor whiteColor] forState:(UIControlStateNormal)];
+    [okBtn.titleLabel setFont:[UIFont systemFontOfSize:16.f]];
+    [self addSubview:okBtn];
+    [okBtn mas_makeConstraints:^(MASConstraintMaker *make) {
+        //make.top.equalTo(pwdAgainTextField.mas_bottom).offset(16.f);
+        make.bottom.equalTo(_ControlButTipLineImageView.mas_top).offset(0.f);
+        make.left.mas_equalTo(15.f);
+        make.width.mas_equalTo(okBtn_W);
+        make.height.mas_equalTo(48);
+    }];
+    
+    [okBtn setEnabled:NO];
+    
+    
+    /*知道了按钮*/
+    UIButton* knowBtn = [[UIButton alloc] init];
+    knowBtn.layer.borderWidth = 1;
+    knowBtn.layer.borderColor = [UIColor whiteColor].CGColor;
+    knowBtn.layer.cornerRadius = 20;
+    knowBtn.clipsToBounds = YES;
+    [knowBtn setTitleColor:[UIColor whiteColor] forState:(UIControlStateNormal)];
+    [knowBtn.titleLabel setFont:[UIFont systemFontOfSize:16.f]];
+    [knowBtn setTitle:NSLocalizedString(@"guide_set_pwd_guide_know",nil) forState:(UIControlStateNormal)];
+    knowBtn.backgroundColor = [UIColor hwColor:@"ffffff" alpha:0.1];
+    [self addSubview:knowBtn];
+    [knowBtn addTarget:self
+               action:@selector(didClickButFun)
+     forControlEvents:(UIControlEventTouchUpInside)];
+    
+    [knowBtn mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.equalTo(okBtn.mas_bottom).offset(30.f);
+        make.right.equalTo(okBtn.mas_right).offset(0.f);
+        make.width.mas_equalTo(120.f);
+        make.height.mas_equalTo(40.f);
+    }];
+    
+    UIButton* nullBtn = [[UIButton alloc] init];
+    //nullBtn.backgroundColor = [UIColor redColor];
+    [self addSubview:nullBtn];
+    [nullBtn addTarget:self
+               action:@selector(didClickNullButFun)
+     forControlEvents:(UIControlEventTouchUpInside)];
+    
+    [nullBtn mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.centerY.mas_equalTo(_ControlImageView.mas_centerY).offset(0.f);
+        make.left.mas_equalTo(0.f);
+        make.width.mas_equalTo(100.f);
+        make.height.mas_equalTo(100.f);
+    }];
+}
+
+- (void)didClickButFun{
+    
+    if(_didKnowPlayerControlButTip){
+        _didKnowPlayerControlButTip();
+    }
+    
+    [HWDataManager setBoolWithKey:Const_did_Show_playView_controlBtn_Tip value:YES];
+    
+    [self removeFromSuperview];
+}
+
+- (void)didClickNullButFun
+{
+    //HLog(@"4444");
 }
 @end

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

@@ -8,7 +8,7 @@
 
 #import "PlayerView.h"
 #import "UIView+View.h"
-#import "PlayerControlButTipView.h"
+
 
 @interface PlayerView ()
 <UIGestureRecognizerDelegate,
@@ -154,17 +154,7 @@ ShowImageViewDelegate>{
     
     [self setPoMas_makeWithImageRate:frame.size.width/frame.size.height isOpenVirtual:NO isUsageMode:NO];
     
-//    PlayerControlButTipView *PlayerControlButTipV = [[PlayerControlButTipView alloc] init];
-//    PlayerControlButTipV.backgroundColor = [UIColor hwColor:@"000000" alpha:0.6];
-//    [self addSubview:PlayerControlButTipV];
-//
-//
-//    [PlayerControlButTipV mas_makeConstraints:^(MASConstraintMaker *make) {
-//        make.right.mas_equalTo(0);
-//        make.top.mas_equalTo(0.f);
-//        make.left.mas_equalTo(0.f);
-//        make.bottom.mas_equalTo(0.f);
-//    }];
+    
 }
 
 - (void)initAddSubViewForBottomContrView{

+ 5 - 1
创维盒子/双子星云手机/zh-Hans.lproj/Localizable.strings

@@ -66,7 +66,7 @@
 
 
 "logo_select_logo" = "请选择图标";
-"logo_change_logo_tip" = "此APP在手机桌面的图标会更换为你选择的图标及名称";
+"logo_change_logo_tip" = "此APP在手机桌面的图标会更换为你选择的图标";
 "logo_calculator" = "计算器";
 "logo_bowser" = "浏览器";
 "logo_did_change_logo" = "设置已成功,如图标未更新,请重启手机";
@@ -217,6 +217,10 @@
 "single_sign_on_exit" = "退出";
 "single_sign_on_login_again" = "重新登录";
 
+
+"player_ControlButton_Tip" = "前往“设置”探索更多功能";
+
+
 //guide_middle_0_icon
 //NSLocalizedString(@"my_set_no_reset_pwd_title",nil)
 //NSLocalizedString(@"my_set_no_invite_friend_get_vip",nil)