Browse Source

1.修复MySetViewController 内存泄漏

huangxiaodong 1 year ago
parent
commit
08f09c6f27

+ 1 - 0
创维盒子/双子星云手机/Class/Set/ChangeDevice/QRCodeScanForChangeDeviceViewController.m

@@ -310,6 +310,7 @@ bool isDownType22 = YES;
                 [dict setObject:resStr forKey:Const_Have_Add_Device_SN];
                 [HWDataManager setObjectWithKey:Const_Have_Add_Device value:dict];
                 
+                [self.navigationController popToRootViewControllerAnimated:NO];
                 [[NSNotificationCenter defaultCenter] postNotificationName:GuideOkNotification object:nil];
             }else{
                 [[iToast makeText:NSLocalizedString(@"guide_qrcoede_tips_get_SdnID_fail",nil)] show];

+ 1 - 1
创维盒子/双子星云手机/Class/Set/MySetViewController.h

@@ -13,7 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
 /**
  * @brief  云机状态( 0:不存在 1:有效时间 2:有效时间不足 3:过期未回收 )   1、2为VIP状态  0、3 非VIP状态
  */
-@property(nonatomic, assign)NSInteger whetherPhoneStatus;
+//@property(nonatomic, assign)NSInteger whetherPhoneStatus;
 
 //重启盒子
 @property (nonatomic,copy) void (^needToReboot)(void);

+ 28 - 22
创维盒子/双子星云手机/Class/Set/MySetViewController.m

@@ -92,35 +92,41 @@
         make.bottom.mas_equalTo(-15);
     }];
     
+    KWeakSelf
 #pragma mark 上传文件相关处理
     headView.didClickBut = ^(NSInteger tag) {
-        
-        if(tag ==2 || tag ==3){
-            
-            if(self->_getBaseInfo){
-                self->_getBaseInfo();
-            }
-            
-            uploadImageOrVideoViewController *vc = [uploadImageOrVideoViewController new];
-            if(tag ==2){
-                vc.isPhotoType = YES;
-            }
-            else{
-                vc.isPhotoType = NO;
-            }
-            [self.navigationController pushViewController:vc animated:YES];
-            
-        }
-        else if(tag == 1){
-            uploadFileRecordViewController *vc = [uploadFileRecordViewController new];
-            vc.isNotUploadingType = YES;
-            [self.navigationController pushViewController:vc animated:YES];
-        }
+        [weakSelf didClickUploadFileByTag:tag];
     };
     
     return bgView;
 }
 
+#pragma mark 点击文件上传相关
+- (void)didClickUploadFileByTag:(NSInteger)tag
+{
+    if(tag ==2 || tag ==3){
+        
+        if(self->_getBaseInfo){
+            self->_getBaseInfo();
+        }
+        
+        uploadImageOrVideoViewController *vc = [uploadImageOrVideoViewController new];
+        if(tag ==2){
+            vc.isPhotoType = YES;
+        }
+        else{
+            vc.isPhotoType = NO;
+        }
+        [self.navigationController pushViewController:vc animated:YES];
+        
+    }
+    else if(tag == 1){
+        uploadFileRecordViewController *vc = [uploadFileRecordViewController new];
+        vc.isNotUploadingType = YES;
+        [self.navigationController pushViewController:vc animated:YES];
+    }
+}
+
 - (UIView *)tableFoorView{
     UIView *bgView = [[UIView alloc] initWithFrame:(CGRectMake(0, 0, SCREEN_W, 68.f))];
     [bgView setBackgroundColor:[UIColor clearColor]];

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

@@ -1440,7 +1440,7 @@ NSDate *lastVideoTome;/*上一帧数据时间*/
     HLog(@"__________%s__________",__func__);
     [[UIApplication sharedApplication] setStatusBarHidden:NO];
     MySetViewController *nextVC = [[MySetViewController alloc] init];
-    nextVC.whetherPhoneStatus = phoneTimeInfoDataModel.data.whetherPhoneStatus;
+    //nextVC.whetherPhoneStatus = phoneTimeInfoDataModel.data.whetherPhoneStatus;
     [self.navigationController pushViewController:nextVC animated:YES];
     self.isNeedRecyclResource = NO;