Browse Source

1.loading 换个方法加载

huangxiaodong 1 year ago
parent
commit
a876658358

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

@@ -10,6 +10,8 @@
 //#import "couldPhoneBaseInfoModel.h"
 @interface AppDelegate : UIResponder <UIApplicationDelegate>
 
+@property (nonatomic, strong) UIWindow *window;
+
 //进入云手机后拿到的云手机分辨率  h264课指定 720.0 1280.0
 @property (nonatomic, assign)CGFloat couldPhone_W_PHONE;
 @property (nonatomic, assign)CGFloat couldPhone_H_PHONE;

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

@@ -94,6 +94,7 @@
     [Bugly startWithAppId:@"179559a521"];
 #endif
     
+    [SVProgressHUD setDefaultStyle:(SVProgressHUDStyleDark)];
     
     [[UIDevice currentDevice] setBatteryMonitoringEnabled:YES];
     [[UIDevice currentDevice] batteryLevel];

+ 1 - 0
创维盒子/双子星云手机/AppDelegate/PrefixHeader.pch

@@ -25,6 +25,7 @@
 #import "Masonry.h"
 #import "UIView+HWCategory.h"
 #import "UIScrollView+EmptyDataSet.h"
+#import "SVProgressHUD.h"
 
 /**工具类*/
 #import "iToast.h"

+ 2 - 0
创维盒子/双子星云手机/AppDelegate/SceneDelegate.m

@@ -74,6 +74,8 @@
         [self getNetWorkPopViewFun];
         
         [self.window makeKeyAndVisible];
+        
+        ksharedAppDelegate.window = self.window;
     }
 }
 

+ 3 - 3
创维盒子/双子星云手机/Class/Set/uploadFile/uploadFileRecordViewController.m

@@ -86,7 +86,7 @@
 #pragma mark 获取数据
 - (void)getAllDataFun
 {
-    [self showNewIndicatorWithCanBack:YES canTouch:NO];
+    [SVProgressHUD show];;
     
     if(!_isUploadingType){
         [self getUploadDataInDatabaseFun];
@@ -110,8 +110,8 @@
     if(_didGetUploadDataType
        && _didGetDownloadDataType
        && _didGetbackupsloadDataType){
-        mainBlock(^{
-            [self removeNewIndicator];
+        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+            [SVProgressHUD dismiss];
         });
     }
    

+ 16 - 8
创维盒子/双子星云手机/Class/Set/uploadFile/uploadImageOrVideoViewController.m

@@ -168,7 +168,7 @@
     if(but.selected){
         [self.indexPathsForSelectedItems removeAllObjects];
         
-        [self showNewIndicatorWithCanBack:YES canTouch:NO];
+        [SVProgressHUD show];
         
         for (int i= 0; i<self.assets.count; i++) {
             TZAssetModel *model = self.assets[i];
@@ -515,7 +515,7 @@
             
             if(isLast){
                 mainBlock(^{
-                    [self removeNewIndicator];
+                    [SVProgressHUD dismiss];
                 });
             }
         }];
@@ -539,18 +539,26 @@
                     //model.totalBytes = [videoData length];
                     model.totalBytes = size.longLongValue;
                     [self setDataToBottomViewFun];
-                    
-                    if(isLast){
-                        mainBlock(^{
-                            [self removeNewIndicator];
-                        });
-                    }
              }
+                
+                if(isLast){
+                    mainBlock(^{
+                        [SVProgressHUD dismiss];
+                    });
+                }
+                
             }];
 
         }
 
     }
+    else{
+        if(isLast){
+            dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+                [SVProgressHUD dismiss];
+            });
+        }
+    }
 }
 
 #pragma mark 同步数据到底部