فهرست منبع

1.修改上传列表Clear后视图更新。
2.调整Mode视图提示文字。

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

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


+ 5 - 5
RA Image/RA Image/Mode.storyboard

@@ -134,8 +134,8 @@
                                 <constraints>
                                 <constraints>
                                     <constraint firstAttribute="height" constant="20" id="mgg-Dx-4kA"/>
                                     <constraint firstAttribute="height" constant="20" id="mgg-Dx-4kA"/>
                                 </constraints>
                                 </constraints>
-                                <fontDescription key="fontDescription" type="system" pointSize="14"/>
-                                <color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="16"/>
+                                <color key="textColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="calibratedRGB"/>
                                 <nil key="highlightedColor"/>
                                 <nil key="highlightedColor"/>
                             </label>
                             </label>
                         </subviews>
                         </subviews>
@@ -466,8 +466,8 @@
                                 <constraints>
                                 <constraints>
                                     <constraint firstAttribute="height" constant="20" id="gr4-N2-NFP"/>
                                     <constraint firstAttribute="height" constant="20" id="gr4-N2-NFP"/>
                                 </constraints>
                                 </constraints>
-                                <fontDescription key="fontDescription" type="system" pointSize="14"/>
-                                <color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="16"/>
+                                <color key="textColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="calibratedRGB"/>
                                 <nil key="highlightedColor"/>
                                 <nil key="highlightedColor"/>
                             </label>
                             </label>
                         </subviews>
                         </subviews>
@@ -741,7 +741,7 @@
                                         <rect key="frame" x="0.0" y="28" width="375" height="44"/>
                                         <rect key="frame" x="0.0" y="28" width="375" height="44"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Scm-6H-13W" id="WlG-lg-3va">
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Scm-6H-13W" id="WlG-lg-3va">
-                                            <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                             <subviews>
                                                 <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" enabled="NO" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="Manufacturer" borderStyle="roundedRect" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="NYL-AQ-1Xx">
                                                 <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" enabled="NO" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="Manufacturer" borderStyle="roundedRect" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="NYL-AQ-1Xx">

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

@@ -89,7 +89,7 @@
 - (IBAction)uploadBtnClick:(id)sender {
 - (IBAction)uploadBtnClick:(id)sender {
     if(self.barcode.length ==0)
     if(self.barcode.length ==0)
     {
     {
-        [RAUtils message_alert:@"Barcode cann't be blank" title:@"Warning" controller:self];
+        [RAUtils message_alert:[NSString stringWithFormat:@"%@ cann't be blank",self.barcodeTitle] title:@"Warning" controller:self];
         return;
         return;
     }
     }
     if(self.photos.count ==0)
     if(self.photos.count ==0)

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

@@ -66,7 +66,7 @@
     // check piid, photo...
     // check piid, photo...
     if(self.barcode.length ==0)
     if(self.barcode.length ==0)
     {
     {
-    [RAUtils message_alert:@"Barcode cann't be blank" title:@"Warning" controller:self];
+    [RAUtils message_alert:[NSString stringWithFormat:@"%@ cann't be blank",self.barcodeTitle] title:@"Warning" controller:self];
     return;
     return;
     }
     }
     if(self.photos.count ==0)
     if(self.photos.count ==0)

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

@@ -40,7 +40,7 @@
 
 
 - (void)setProgress:(float)progress {
 - (void)setProgress:(float)progress {
     
     
-    DebugLog(@"cell %p setProgress %f",self,progress);
+//    DebugLog(@"cell %p setProgress %f",self,progress);
     if (progress < 0) {
     if (progress < 0) {
         progress = 0.0f;
         progress = 0.0f;
     }
     }

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

@@ -123,10 +123,10 @@
         UploadCell * cell= [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
         UploadCell * cell= [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
         
         
         NSDictionary * item_json = Appdelegate.uploadManager.arr_queue[indexPath.row];
         NSDictionary * item_json = Appdelegate.uploadManager.arr_queue[indexPath.row];
-        
-        if (cell.operation) {
-            cell.operation.updateUI = nil;
-        }
+//        
+//        if (cell.operation) {
+//            cell.operation.updateUI = nil;
+//        }
         
         
         NSString* status =nil;
         NSString* status =nil;
         switch ([item_json[@"status"] intValue]) {
         switch ([item_json[@"status"] intValue]) {
@@ -161,15 +161,15 @@
         
         
         RAUploadOperation* op = item_json[@"operation"];
         RAUploadOperation* op = item_json[@"operation"];
         
         
-        __block RAUploadOperation* block_op = op;
-        __block UploadCell* block_cell = cell;
-        __block NSIndexPath* block_index = indexPath;
-        long idx = indexPath.row;
-        __weak typeof(self) weakself = self;
+//        __block RAUploadOperation* block_op = op;
+//        __block UploadCell* block_cell = cell;
+//        __block NSIndexPath* block_index = indexPath;
+//        long idx = indexPath.row;
+//        __weak typeof(self) weakself = self;
         op.updateUI=^(){
         op.updateUI=^(){
             
             
             
             
-            blockDebugLog(@"updateUI @ row%ld %p \n operation %p",idx,block_cell,block_op);
+//            blockDebugLog(@"updateUI @ row%ld %p \n operation %p",idx,block_cell,block_op);
             
             
             NSString* status =nil;
             NSString* status =nil;
             switch ([item_json[@"status"] intValue]) {
             switch ([item_json[@"status"] intValue]) {
@@ -200,6 +200,7 @@
             cell.errorMsg = item_json[@"msg"];
             cell.errorMsg = item_json[@"msg"];
             
             
         };
         };
+        DebugLog(@"%@ set update ui",item_json[@"file"]);
         cell.operation = op;
         cell.operation = op;
         //
         //
         return cell;
         return cell;
@@ -311,21 +312,21 @@
 //    
 //    
 //}
 //}
 //
 //
-//- (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;
-//    
+- (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;
+    upCell.operation.updateUI = nil;
 //    AppDelegate* Appdelegate=(AppDelegate*)[UIApplication sharedApplication].delegate;
 //    AppDelegate* Appdelegate=(AppDelegate*)[UIApplication sharedApplication].delegate;
 //    if (indexPath.row < Appdelegate.uploadManager.arr_queue.count) {// Clear List先调用此方法,再调用numberOfRowsInSection,所以先判断避免Crash
 //    if (indexPath.row < Appdelegate.uploadManager.arr_queue.count) {// Clear List先调用此方法,再调用numberOfRowsInSection,所以先判断避免Crash
 //        NSDictionary * item_json = Appdelegate.uploadManager.arr_queue[indexPath.row];
 //        NSDictionary * item_json = Appdelegate.uploadManager.arr_queue[indexPath.row];
 //        RAUploadOperation* op = item_json[@"operation"];
 //        RAUploadOperation* op = item_json[@"operation"];
 //        op.updateUI = nil;
 //        op.updateUI = nil;
 //    }
 //    }
-//    
-//}
+    
+}
 /*
 /*
 #pragma mark - UploadManager Delegate
 #pragma mark - UploadManager Delegate