Browse Source

1.修改RA Image发现上传Restart时界面刷新不正确。
2.修改RA Image避免连续多次点击拍照按钮,多次呈现图片编辑视图。
3.修改RA Image服务器地址设置。

Pen Li 9 years ago
parent
commit
d88f153ccf

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


+ 27 - 11
RA Image/RA Image.xcodeproj/xcuserdata/macmini1.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -16,32 +16,48 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            shouldBeEnabled = "Yes"
+            shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "../common/upload/RAUploadManager.m"
-            timestampString = "516704766.310527"
+            filePath = "../common/upload/RAUploadOperation.m"
+            timestampString = "516760817.992184"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "270"
-            endingLineNumber = "270"
-            landmarkName = "-saveTasks"
+            startingLineNumber = "178"
+            endingLineNumber = "178"
+            landmarkName = "-filePath:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            shouldBeEnabled = "Yes"
+            shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "../common/upload/RAUploadOperation.m"
-            timestampString = "516705917.843587"
+            timestampString = "516761228.725439"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "178"
-            endingLineNumber = "178"
-            landmarkName = "-filePath:"
+            startingLineNumber = "151"
+            endingLineNumber = "151"
+            landmarkName = "-start"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../common/upload/RAUploadManager.m"
+            timestampString = "516784754.799264"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "349"
+            endingLineNumber = "349"
+            landmarkName = "-startTask:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>

+ 7 - 0
RA Image/RA Image/AppDelegate.m

@@ -80,6 +80,13 @@
     
 }
 
+- (NSString *)address {
+    if (_address) {
+        return [_address stringByAppendingString:@"/wm_postgresql/index.php?_action=handset_new"];
+    }
+    return nil;
+}
+
 #pragma mark - Exception
 
 void UncaughtExceptionHandler(NSException *exception) {

+ 1 - 1
RA Image/RA Image/BasicModeViewController.m

@@ -412,7 +412,7 @@
 {
     UIImage *image = nil;
     if (picker.sourceType == UIImagePickerControllerSourceTypeCamera) {
-        
+        if (self.imgPicker.viewControllers.count > 1) return;// 避免连续多次拍照,后多次present
         image = [info objectForKey:UIImagePickerControllerOriginalImage];
 //        [picker dismissViewControllerAnimated:YES completion:nil];
         __weak typeof(self) weakself = self;

+ 2 - 0
RA Image/RA Image/UploadCell.h

@@ -7,6 +7,7 @@
 //
 
 #import <UIKit/UIKit.h>
+#import "RAUploadOperation.h"
 
 @interface UploadCell : UITableViewCell
 
@@ -14,5 +15,6 @@
 @property (nonatomic,assign) float progress;
 @property (nonatomic,copy) NSString *state;
 @property (nonatomic,copy) NSString *errorMsg;
+@property (nonatomic,weak) RAUploadOperation *operation;
 
 @end

+ 2 - 2
RA Image/RA Image/UploadSettingController.m

@@ -89,8 +89,8 @@ NSString *const kUploadSetting = @"UploadSettingKey";
     AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
     appDelegate.uploadManager.maxRetry = retryCount;
     appDelegate.uploadManager.autoStart = autoUpload;
-    appDelegate.uploadManager.removeFinish = YES;
-    appDelegate.uploadManager.removeError = NO;
+    appDelegate.uploadManager.removeFinish = autoRmFinish;
+    appDelegate.uploadManager.removeError = autoRmErr;
     
     [self.navigationController popViewControllerAnimated:YES];
 }

+ 20 - 22
RA Image/RA Image/UploadViewController.m

@@ -122,7 +122,9 @@
         UploadCell * cell= [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
         NSDictionary * item_json = Appdelegate.uploadManager.arr_queue[indexPath.row];
         
-        
+        if (cell.operation) {
+            cell.operation.updateUI = nil;
+        }
         
         NSString* status =nil;
         switch ([item_json[@"status"] intValue]) {
@@ -185,6 +187,7 @@
             cell.errorMsg = item_json[@"msg"];
             
         };
+        cell.operation = op;
         //
         return cell;
     }
@@ -292,29 +295,24 @@
 
 //- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
 //    UploadCell *upCell = (UploadCell *)cell;
-//    upCell.name = @"QS-WPS00889-OPQ-WQER";
-//    upCell.progress = indexPath.row / 10.0;
-//    upCell.state = @"Uploading...";
-//    if (indexPath.row > 5) {
-//        upCell.state = @"Waiting...";
-//    }
+//    
 //}
 //
-- (void)tableView:(UITableView *)tableView didEndDisplayingCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
-    UploadCell *upCell = (UploadCell *)cell;
-    upCell.name = nil;
-    upCell.progress = 0;
-    upCell.state = nil;
-    upCell.errorMsg = nil;
-    
-    AppDelegate* Appdelegate=(AppDelegate*)[UIApplication sharedApplication].delegate;
-    if (indexPath.row < Appdelegate.uploadManager.arr_queue.count) {// Clear List先调用此方法,再调用numberOfRowsInSection,所以先判断避免Crash
-        NSDictionary * item_json = Appdelegate.uploadManager.arr_queue[indexPath.row];
-        RAUploadOperation* op = item_json[@"operation"];
-        op.updateUI = nil;
-    }
-    
-}
+//- (void)tableView:(UITableView *)tableView didEndDisplayingCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
+//    UploadCell *upCell = (UploadCell *)cell;
+//    upCell.name = nil;
+//    upCell.progress = 0;
+//    upCell.state = nil;
+//    upCell.errorMsg = nil;
+//    
+//    AppDelegate* Appdelegate=(AppDelegate*)[UIApplication sharedApplication].delegate;
+//    if (indexPath.row < Appdelegate.uploadManager.arr_queue.count) {// Clear List先调用此方法,再调用numberOfRowsInSection,所以先判断避免Crash
+//        NSDictionary * item_json = Appdelegate.uploadManager.arr_queue[indexPath.row];
+//        RAUploadOperation* op = item_json[@"operation"];
+//        op.updateUI = nil;
+//    }
+//    
+//}
 /*
 #pragma mark - UploadManager Delegate