Bläddra i källkod

1.重启云手机弹框添加关闭按钮

huangxiaodong 3 månader sedan
förälder
incheckning
b4344d296b

+ 1 - 1
创维盒子/code/Class/ComontAlretViewController.m

@@ -60,7 +60,7 @@
     UIView *bgView = [[UIView alloc] init];
     [bgView setBackgroundColor:[UIColor whiteColor]];
     [bgView.layer setCornerRadius:8.f];
-    
+    bgView.tag = 999;
     [self.view addSubview:bgView];
         
     [bgView mas_makeConstraints:^(MASConstraintMaker *make) {

+ 54 - 28
创维盒子/code/NAS/BoxHeartbeatAlertTool/BoxHeartbeatAlertTool.m

@@ -75,50 +75,52 @@ static BoxHeartbeatAlertTool *shareInstance = nil;
     
     NSString* linkErrTitle = NSLocalizedString(@"Heartbeat_box_all_fail_title",nil);
     NSString* linkErrTip = NSLocalizedString(@"Heartbeat_box_all_fail_tip",nil);
-    NSString* buttonTitle = NSLocalizedString(@"common_I_know",nil);
+    NSString* buttonOKTitle = nil;
+    NSString* buttonCloseTitle = NSLocalizedString(@"common_I_know",nil);
+    BOOL isOkBtnHighlight = NO;
     
     if(type != 1){
         linkErrTitle = NSLocalizedString(@"Heartbeat_box_part_fail_title",nil);
         linkErrTip = NSLocalizedString(@"Heartbeat_box_part_fail_tip",nil);
-        buttonTitle = NSLocalizedString(@"Heartbeat_box_restart_phone",nil);
+        buttonOKTitle = NSLocalizedString(@"Heartbeat_box_restart_phone",nil);
+        buttonCloseTitle = NSLocalizedString(@"common_close",nil);
+        isOkBtnHighlight = YES;
     }
     
-
         KWeakSelf
         linkFailAlretVC= [[ComontAlretViewController alloc] initWithTiTle:linkErrTitle
                                                                                           msg:linkErrTip
                                                                                      imageStr:@""
-                                                                                  cancelTitle:buttonTitle
-                                                                                      okTitle:@""
-                                                                            isOkBtnHighlight:NO
+                                                                                  cancelTitle:buttonCloseTitle
+                                                                                      okTitle:buttonOKTitle
+                                                                            isOkBtnHighlight:isOkBtnHighlight
                                                                                    didClickOk:^{
            
+            if(self->curDidClickButFun){
+                self->curDidClickButFun(1);
+            }
             
+            if(type != 1){
+                [weakSelf needToRebootFun];
+                
+                ksharedAppDelegate.needToShowReStratSucType = YES;
+                
+                dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+                    BoxHeartbeatReStartView *view = [[BoxHeartbeatReStartView alloc] init];
+                    [ksharedAppDelegate.window addSubview:view];
+                    
+                    [view mas_makeConstraints:^(MASConstraintMaker *make) {
+                        make.left.mas_equalTo(0.f);
+                        make.bottom.mas_equalTo(0.f);
+                        make.right.mas_equalTo(0.f);
+                        make.top.mas_equalTo(0.f);
+                    }];
+                    
+                });
+            }
             
          } didClickCancel:^{
              
-             if(self->curDidClickButFun){
-                 self->curDidClickButFun(1);
-             }
-             
-             if(type != 1){
-                 [weakSelf needToRebootFun];
-                 
-                 ksharedAppDelegate.needToShowReStratSucType = YES;
-                 
-                 dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
-                     BoxHeartbeatReStartView *view = [[BoxHeartbeatReStartView alloc] init];
-                     [ksharedAppDelegate.window addSubview:view];
-                     
-                     [view mas_makeConstraints:^(MASConstraintMaker *make) {
-                         make.left.mas_equalTo(0.f);
-                         make.bottom.mas_equalTo(0.f);
-                         make.right.mas_equalTo(0.f);
-                         make.top.mas_equalTo(0.f);
-                     }];
-                     
-                 });
-             }
             
          }];
         
@@ -130,8 +132,32 @@ static BoxHeartbeatAlertTool *shareInstance = nil;
     
    
     linkFailAlretVC.view.tag = type;
+    
+    
+    //添加一个删除按钮
+//    UIView *whiteBgView = [linkFailAlretVC.view viewWithTag:999];
+//    HLog(@"%@",whiteBgView);
+//    
+//    UIButton* delBut = [[UIButton alloc] init];
+//    [delBut setImage:[UIImage imageNamed:@"common_del"] forState:UIControlStateNormal];
+//    [delBut addTarget:self action:@selector(delViewFun) forControlEvents:UIControlEventTouchUpInside];
+//    [whiteBgView addSubview:delBut];
+//    
+//    [delBut mas_makeConstraints:^(MASConstraintMaker *make) {
+//        make.top.mas_equalTo(0);
+//        make.right.mas_equalTo(0);
+//        make.width.mas_equalTo(40);
+//        make.height.mas_equalTo(40.0);
+//    }];
 }
 
+//#pragma mark 用户点击关闭
+//- (void)delViewFun{
+//    [linkFailAlretVC dismissViewControllerAnimated:YES completion:^{
+//            
+//    }];
+//}
+
 
 #pragma mark 重启云机
 - (void)needToRebootFun

+ 4 - 4
创维盒子/双子星云手机.xcodeproj/project.pbxproj

@@ -6052,7 +6052,7 @@
 				CODE_SIGN_ENTITLEMENTS = "隐私保护.entitlements";
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 40;
+				CURRENT_PROJECT_VERSION = 1;
 				DEVELOPMENT_TEAM = 6SV76WTUUR;
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
@@ -6109,7 +6109,7 @@
 					"$(PROJECT_DIR)/code/Vendor/UDP/RayProxy",
 					"$(PROJECT_DIR)/RayProxy",
 				);
-				MARKETING_VERSION = 1.4.4;
+				MARKETING_VERSION = 1.4.4.1;
 				PRODUCT_BUNDLE_IDENTIFIER = com.armcloud.privacy.x.box;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				PROVISIONING_PROFILE_SPECIFIER = "";
@@ -6131,7 +6131,7 @@
 				CODE_SIGN_ENTITLEMENTS = "隐私保护.entitlements";
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 40;
+				CURRENT_PROJECT_VERSION = 1;
 				DEVELOPMENT_TEAM = 6SV76WTUUR;
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
@@ -6188,7 +6188,7 @@
 					"$(PROJECT_DIR)/code/Vendor/UDP/RayProxy",
 					"$(PROJECT_DIR)/RayProxy",
 				);
-				MARKETING_VERSION = 1.4.4;
+				MARKETING_VERSION = 1.4.4.1;
 				PRODUCT_BUNDLE_IDENTIFIER = com.armcloud.privacy.x.box;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				PROVISIONING_PROFILE_SPECIFIER = "";