فهرست منبع

1.修改RA Image程序退到后台后被Kill时能保存数据。

Pen Li 9 سال پیش
والد
کامیت
db11cc8126

BIN
RA Image/RA Image.xcodeproj/project.xcworkspace/xcuserdata/macmini1.xcuserdatad/UserInterfaceState.xcuserstate


+ 0 - 16
RA Image/RA Image.xcodeproj/xcuserdata/macmini1.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -13,21 +13,5 @@
             stopOnStyle = "0">
          </BreakpointContent>
       </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "RA Image/AppDelegate.m"
-            timestampString = "516252786.483861"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "102"
-            endingLineNumber = "102"
-            landmarkName = "-saveUploadTasks"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
    </Breakpoints>
 </Bucket>

+ 4 - 3
RA Image/RA Image/AppDelegate.m

@@ -158,9 +158,8 @@ void UncaughtExceptionHandler(NSException *exception) {
 - (void)applicationDidEnterBackground:(UIApplication *)application {
     // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
     // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
-    __weak typeof(self) weakself = self;
     [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:^{
-        [weakself saveUploadTasks];
+        
     }];
 }
 
@@ -175,7 +174,9 @@ void UncaughtExceptionHandler(NSException *exception) {
     if (!self.bLogin) {
         [self showLoginVC];
     }
-    self.uploadManager=[[RAUploadManager alloc] init];
+    if (!self.uploadManager) {
+        self.uploadManager=[[RAUploadManager alloc] init];
+    }
 }