Explorar el Código

1.修复照片重复选择后数据重复。
2.修改POP模式和Model模式在竖屏时布局。
3.修改RA Image登录设置,保存前一次选择的Address索引,并根据索引初始化界面。
4.修改RA Image上传初始化以及保存,使程序退到后台后被Kill时能保存数据。

Pen Li hace 9 años
padre
commit
2338e0534d

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


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

@@ -13,5 +13,21 @@
             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>

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

@@ -142,8 +142,8 @@ void UncaughtExceptionHandler(NSException *exception) {
     self.build =[infoDict objectForKey:@"CFBundleVersion"];
     self.rootVC = self.window.rootViewController;
     
-    self.uploadManager=[[RAUploadManager alloc] init];
-    self.uploadManager.maxRetry = 2;
+    
+//    self.uploadManager.maxRetry = 2;
     
     return YES;
 }
@@ -158,6 +158,10 @@ 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];
+    }];
 }
 
 
@@ -171,6 +175,7 @@ void UncaughtExceptionHandler(NSException *exception) {
     if (!self.bLogin) {
         [self showLoginVC];
     }
+    self.uploadManager=[[RAUploadManager alloc] init];
 }
 
 

+ 15 - 10
RA Image/RA Image/Base.lproj/Main.storyboard

@@ -46,7 +46,7 @@
                                         <rect key="frame" x="0.0" y="28" width="375" height="40"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="a3Z-Pv-WAq" id="KU3-qN-JgJ">
-                                            <rect key="frame" x="0.0" y="0.0" width="375" height="39.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="40"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Mode" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wdD-Sc-rpM">
@@ -270,13 +270,13 @@
                                     <outlet property="delegate" destination="l61-Sy-3V2" id="tqE-wd-DVH"/>
                                 </connections>
                             </tableView>
-                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Qgm-gt-QHB">
-                                <rect key="frame" x="10" y="617" width="40" height="40"/>
+                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Qgm-gt-QHB">
+                                <rect key="frame" x="10" y="627" width="30" height="30"/>
                                 <constraints>
-                                    <constraint firstAttribute="width" constant="40" id="Zih-se-HAO"/>
-                                    <constraint firstAttribute="height" constant="40" id="jjZ-vh-Hjh"/>
+                                    <constraint firstAttribute="width" constant="30" id="Zih-se-HAO"/>
+                                    <constraint firstAttribute="height" constant="30" id="jjZ-vh-Hjh"/>
                                 </constraints>
-                                <state key="normal" title="S"/>
+                                <state key="normal" image="setting"/>
                                 <connections>
                                     <action selector="settingBtnClick:" destination="l61-Sy-3V2" eventType="touchUpInside" id="ojR-rF-7SJ"/>
                                 </connections>
@@ -336,10 +336,10 @@
                                     <constraint firstAttribute="width" constant="40" id="cUn-d9-05T"/>
                                     <constraint firstAttribute="height" constant="40" id="pKp-9z-wKu"/>
                                 </constraints>
-                                <state key="normal" title="O">
+                                <state key="normal" image="checkbox">
                                     <color key="titleColor" red="0.25435081980000002" green="0.75957768849999996" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                 </state>
-                                <state key="selected" title="Y"/>
+                                <state key="selected" image="checkbox_check"/>
                                 <connections>
                                     <action selector="internalCheckBtnClick:" destination="r7u-Ls-Lza" eventType="touchUpInside" id="GIU-oB-sNH"/>
                                 </connections>
@@ -377,10 +377,10 @@
                                     <constraint firstAttribute="height" constant="40" id="CLg-nr-pUz"/>
                                     <constraint firstAttribute="width" constant="40" id="ZyL-b3-rIU"/>
                                 </constraints>
-                                <state key="normal" title="O">
+                                <state key="normal" image="checkbox">
                                     <color key="titleColor" red="0.25435081980000002" green="0.75957768849999996" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                 </state>
-                                <state key="selected" title="Y"/>
+                                <state key="selected" image="checkbox_check"/>
                                 <connections>
                                     <action selector="externalCheckBtnClick:" destination="r7u-Ls-Lza" eventType="touchUpInside" id="BhV-eZ-ONE"/>
                                 </connections>
@@ -481,4 +481,9 @@
             <point key="canvasLocation" x="2593" y="106"/>
         </scene>
     </scenes>
+    <resources>
+        <image name="checkbox" width="16" height="16"/>
+        <image name="checkbox_check" width="16" height="16"/>
+        <image name="setting" width="60" height="60"/>
+    </resources>
 </document>

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

@@ -15,7 +15,7 @@
 @property (nonatomic,copy) NSString *barcode;
 @property (nonatomic,copy) NSString *barcodeTitle;
 @property (nonatomic,assign) NSUInteger photoCount;
-@property (nonatomic,strong) NSMutableArray *photos;
+@property (nonatomic,strong) NSMutableArray <NSMutableDictionary *> *photos;
 
 - (void)showPhotoList;
 - (void)showScanner;

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

@@ -266,13 +266,13 @@
     if (path) {// 保存成功
         [self receiveImage:image];
         NSString *md5 = [RAUtils md5WithFile:path];
-        NSDictionary *photoDic = @{
+        NSMutableDictionary *photoDic = @{
                                    @"photo" : image,
                                    @"check" : @(NO),
                                    @"file"  : [path lastPathComponent],
                                    @"md5"   : md5,
                                    @"path"  : path
-                                   };
+                                   }.mutableCopy;
         [self.photos addObject:photoDic];
         self.photoCount++;
     } else {

+ 27 - 4
RA Image/RA Image/LoginSettingViewController.m

@@ -36,7 +36,6 @@ static NSString *kScanAddress = @"ScanAddress";
     [self loadAddress];
     [self registListenKeyboard];
     
-    [self internalCheckBtnClick:self.internalCheckBtn];
 }
 
 
@@ -51,7 +50,22 @@ static NSString *kScanAddress = @"ScanAddress";
         self.internalTextField.text = [addressDic objectForKey:@"internalAddress"];
         self.externalTextField.text = [addressDic objectForKey:@"externalAddress"];
         self.nameTextField.text = [addressDic objectForKey:@"name"];
-    }
+        NSUInteger selectedIndex = [[addressDic objectForKey:@"selectedIndex"] integerValue];
+        switch (selectedIndex) {
+            case 0:
+            case 1: {
+                [self internalCheckBtnClick:self.internalCheckBtn];
+            }
+                break;
+            case 2: {
+                [self externalCheckBtnClick:self.externalCheckBtn];
+            }
+                break;
+                
+            default:
+                break;
+        }
+    } 
 }
 
 
@@ -59,8 +73,16 @@ static NSString *kScanAddress = @"ScanAddress";
 
 - (void)doneItemClick:(UIBarButtonItem *)sender {
     self.checkedAddress = nil;
-    if (self.externalCheckBtn.selected) self.checkedAddress = self.externalTextField.text;
-    if (self.internalCheckBtn.selected) self.checkedAddress = self.internalTextField.text;
+    NSUInteger selectedIndex = 0;
+    if (self.internalCheckBtn.selected) {
+        self.checkedAddress = self.internalTextField.text;
+        selectedIndex = 1;
+    }
+    if (self.externalCheckBtn.selected) {
+        self.checkedAddress = self.externalTextField.text;
+        selectedIndex = 2;
+    }
+    
     if (self.checkedAddress && self.returnValue) {
         self.returnValue(self.checkedAddress);
     }
@@ -80,6 +102,7 @@ static NSString *kScanAddress = @"ScanAddress";
         if (name.length) {
             [addressDic setObject:name forKey:@"name"];
         }
+        [addressDic setObject:@(selectedIndex) forKey:@"selectedIndex"];
         [weakself setUserDefaultsValue:addressDic forKey:kScanAddress];
     }];
 }

+ 53 - 56
RA Image/RA Image/Mode.storyboard

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12120" systemVersion="16A323" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
-    <device id="retina4_7" orientation="landscape">
+    <device id="retina5_5" orientation="portrait">
         <adaptation id="fullscreen"/>
     </device>
     <dependencies>
@@ -21,12 +21,12 @@
                         <viewControllerLayoutGuide type="bottom" id="8eX-wZ-j58"/>
                     </layoutGuides>
                     <view key="view" contentMode="scaleToFill" id="QEg-TT-jt8">
-                        <rect key="frame" x="0.0" y="0.0" width="667" height="375"/>
+                        <rect key="frame" x="0.0" y="0.0" width="414" height="736"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="tx6-Jq-V78">
-                                <rect key="frame" x="50" y="87.5" width="200" height="200"/>
-                                <color key="backgroundColor" red="1" green="0.36503490374616099" blue="0.7594767167726002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                <rect key="frame" x="67" y="50" width="280" height="280"/>
+                                <color key="backgroundColor" red="1" green="0.36503490370000002" blue="0.75947671679999995" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                 <constraints>
                                     <constraint firstAttribute="height" constant="280" id="0HU-zi-itA"/>
                                     <constraint firstAttribute="width" constant="200" id="CRQ-nA-AMT"/>
@@ -70,12 +70,11 @@
                                 </connections>
                             </button>
                             <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="6jr-Xw-2tL">
-                                <rect key="frame" x="280" y="227.5" width="60" height="60"/>
-                                <color key="backgroundColor" red="1" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
+                                <rect key="frame" x="67" y="629" width="60" height="60"/>
                                 <constraints>
                                     <constraint firstAttribute="width" constant="60" id="K6W-Tz-wcn"/>
                                 </constraints>
-                                <state key="normal" title="Scan"/>
+                                <state key="normal" backgroundImage="scan"/>
                                 <variation key="default">
                                     <mask key="constraints">
                                         <exclude reference="K6W-Tz-wcn"/>
@@ -96,32 +95,23 @@
                                 </connections>
                             </button>
                             <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="NAz-nK-Hgz">
-                                <rect key="frame" x="433.5" y="227.5" width="60" height="60"/>
-                                <color key="backgroundColor" red="0.45257410590000002" green="1" blue="0.65812935640000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                <rect key="frame" x="177" y="629" width="60" height="60"/>
                                 <constraints>
                                     <constraint firstAttribute="height" constant="60" id="o6H-g4-n4a"/>
                                 </constraints>
-                                <state key="normal" title="Camera"/>
+                                <state key="normal" backgroundImage="camera"/>
                                 <connections>
                                     <action selector="cameraBtnClick:" destination="K9i-vs-efO" eventType="touchUpInside" id="h3G-rL-P7U"/>
                                 </connections>
                             </button>
                             <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="PIID:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7rM-i2-eHr">
-                                <rect key="frame" x="280" y="87.5" width="367" height="27"/>
+                                <rect key="frame" x="67" y="353" width="280" height="27"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                 <nil key="textColor"/>
                                 <nil key="highlightedColor"/>
                             </label>
-                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="jte-R6-noU">
-                                <rect key="frame" x="587" y="227.5" width="60" height="60"/>
-                                <color key="backgroundColor" red="0.25435081980000002" green="0.75957768849999996" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                                <state key="normal" title="Upload"/>
-                                <connections>
-                                    <action selector="uploadBtnClick:" destination="K9i-vs-efO" eventType="touchUpInside" id="raC-cp-9OQ"/>
-                                </connections>
-                            </button>
                             <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Rvg-OG-bQ0">
-                                <rect key="frame" x="617" y="87.5" width="30" height="27"/>
+                                <rect key="frame" x="317" y="353" width="30" height="27"/>
                                 <constraints>
                                     <constraint firstAttribute="width" constant="30" id="ART-XN-Nuf"/>
                                 </constraints>
@@ -134,7 +124,7 @@
                                 </connections>
                             </button>
                             <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="5 Photos" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="m3e-vD-xep">
-                                <rect key="frame" x="50" y="87.5" width="200" height="20"/>
+                                <rect key="frame" x="67" y="50" width="280" height="20"/>
                                 <constraints>
                                     <constraint firstAttribute="height" constant="20" id="mgg-Dx-4kA"/>
                                 </constraints>
@@ -142,6 +132,13 @@
                                 <color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
                                 <nil key="highlightedColor"/>
                             </label>
+                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="jte-R6-noU">
+                                <rect key="frame" x="287" y="629" width="60" height="60"/>
+                                <state key="normal" backgroundImage="upload"/>
+                                <connections>
+                                    <action selector="uploadBtnClick:" destination="K9i-vs-efO" eventType="touchUpInside" id="raC-cp-9OQ"/>
+                                </connections>
+                            </button>
                         </subviews>
                         <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                         <constraints>
@@ -173,6 +170,7 @@
                             <constraint firstItem="tx6-Jq-V78" firstAttribute="leading" secondItem="QEg-TT-jt8" secondAttribute="leadingMargin" constant="30" id="T4x-ql-gYS"/>
                             <constraint firstItem="8eX-wZ-j58" firstAttribute="top" secondItem="NAz-nK-Hgz" secondAttribute="bottom" constant="47" id="UFG-NX-fXs"/>
                             <constraint firstItem="jte-R6-noU" firstAttribute="bottom" secondItem="NAz-nK-Hgz" secondAttribute="bottom" id="VPW-J1-8kq"/>
+                            <constraint firstItem="jte-R6-noU" firstAttribute="centerY" secondItem="NAz-nK-Hgz" secondAttribute="centerY" id="XZo-5O-I9V"/>
                             <constraint firstItem="Rvg-OG-bQ0" firstAttribute="top" secondItem="7rM-i2-eHr" secondAttribute="top" id="Ylg-57-RDu"/>
                             <constraint firstItem="jte-R6-noU" firstAttribute="trailing" secondItem="tx6-Jq-V78" secondAttribute="trailing" id="aEa-b6-mFx"/>
                             <constraint firstAttribute="trailingMargin" secondItem="7rM-i2-eHr" secondAttribute="trailing" id="aWv-n7-eAS"/>
@@ -242,6 +240,7 @@
                                 <exclude reference="G9A-SK-NbZ"/>
                                 <exclude reference="PWK-eA-gMJ"/>
                                 <exclude reference="VPW-J1-8kq"/>
+                                <exclude reference="XZo-5O-I9V"/>
                                 <exclude reference="aEa-b6-mFx"/>
                                 <exclude reference="bYg-yw-F3b"/>
                                 <exclude reference="fPr-5K-jIw"/>
@@ -304,6 +303,7 @@
                                 <include reference="jQL-1o-us5"/>
                                 <include reference="nDa-Fe-yJJ"/>
                                 <include reference="pNG-k3-IPR"/>
+                                <include reference="XZo-5O-I9V"/>
                                 <include reference="aEa-b6-mFx"/>
                                 <include reference="fPr-5K-jIw"/>
                                 <include reference="xNj-Z3-CKd"/>
@@ -334,11 +334,11 @@
                         <viewControllerLayoutGuide type="bottom" id="H4g-H8-jhv"/>
                     </layoutGuides>
                     <view key="view" contentMode="scaleToFill" id="o96-bU-q7q">
-                        <rect key="frame" x="0.0" y="0.0" width="667" height="375"/>
+                        <rect key="frame" x="0.0" y="0.0" width="414" height="736"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="i3W-S0-nip">
-                                <rect key="frame" x="50" y="107.5" width="200" height="200"/>
+                                <rect key="frame" x="67" y="70" width="280" height="280"/>
                                 <color key="backgroundColor" red="1" green="0.36503490370000002" blue="0.75947671679999995" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                 <constraints>
                                     <constraint firstAttribute="height" constant="200" id="P4F-3c-O90"/>
@@ -382,13 +382,13 @@
                                     <action selector="imgBtnClick:" destination="7Iz-ry-1hB" eventType="touchUpInside" id="GBm-oz-mfv"/>
                                 </connections>
                             </button>
-                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="8cw-MJ-Ahc">
-                                <rect key="frame" x="280" y="247.5" width="60" height="60"/>
-                                <color key="backgroundColor" red="1" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
+                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="8cw-MJ-Ahc">
+                                <rect key="frame" x="67" y="656" width="60" height="60"/>
                                 <constraints>
+                                    <constraint firstAttribute="height" constant="60" id="D8b-hb-4M4"/>
                                     <constraint firstAttribute="width" constant="60" id="qWl-ce-tQ1"/>
                                 </constraints>
-                                <state key="normal" title="Scan"/>
+                                <state key="normal" backgroundImage="scan"/>
                                 <variation key="default">
                                     <mask key="constraints">
                                         <exclude reference="qWl-ce-tQ1"/>
@@ -408,27 +408,25 @@
                                     <action selector="scanBtnClick:" destination="7Iz-ry-1hB" eventType="touchUpInside" id="Oeb-HU-8hn"/>
                                 </connections>
                             </button>
-                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="951-qi-5kI">
-                                <rect key="frame" x="433.5" y="247.5" width="60" height="60"/>
-                                <color key="backgroundColor" red="0.45257410590000002" green="1" blue="0.65812935640000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="951-qi-5kI">
+                                <rect key="frame" x="177" y="656" width="60" height="60"/>
                                 <constraints>
                                     <constraint firstAttribute="height" constant="60" id="Vly-i4-6f7"/>
                                 </constraints>
-                                <state key="normal" title="Camera"/>
+                                <state key="normal" backgroundImage="camera"/>
                                 <connections>
                                     <action selector="cameraBtnClick:" destination="7Iz-ry-1hB" eventType="touchUpInside" id="oYV-I4-zg3"/>
                                 </connections>
                             </button>
-                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="xAA-t1-vMd">
-                                <rect key="frame" x="587" y="247.5" width="60" height="60"/>
-                                <color key="backgroundColor" red="0.25435081980000002" green="0.75957768849999996" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                                <state key="normal" title="Upload"/>
+                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="xAA-t1-vMd">
+                                <rect key="frame" x="287" y="656" width="60" height="60"/>
+                                <state key="normal" backgroundImage="upload"/>
                                 <connections>
                                     <action selector="uploadBtnClick:" destination="7Iz-ry-1hB" eventType="touchUpInside" id="Iqc-0G-ztp"/>
                                 </connections>
                             </button>
                             <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="tailTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="gY5-Tk-ev9">
-                                <rect key="frame" x="49.5" y="72.5" width="200" height="30"/>
+                                <rect key="frame" x="66.666666666666686" y="32" width="280" height="30"/>
                                 <color key="backgroundColor" red="0.63798287620000005" green="0.61995456810000005" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                 <constraints>
                                     <constraint firstAttribute="height" constant="30" id="swK-1l-5tG"/>
@@ -439,7 +437,7 @@
                                 </connections>
                             </button>
                             <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" keyboardDismissMode="interactive" text="Note:" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="ZS1-pc-kXu">
-                                <rect key="frame" x="280" y="154" width="367" height="83.5"/>
+                                <rect key="frame" x="67" y="396" width="280" height="250"/>
                                 <color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                 <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
@@ -448,13 +446,13 @@
                                 </connections>
                             </textView>
                             <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Model:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="RZK-hh-toU">
-                                <rect key="frame" x="280" y="107.5" width="367" height="27"/>
+                                <rect key="frame" x="67" y="360" width="280" height="27"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                 <nil key="textColor"/>
                                 <nil key="highlightedColor"/>
                             </label>
                             <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="A3O-9b-0D7">
-                                <rect key="frame" x="617" y="107.5" width="30" height="27"/>
+                                <rect key="frame" x="317" y="360" width="30" height="27"/>
                                 <constraints>
                                     <constraint firstAttribute="width" constant="30" id="gjf-JE-DIU"/>
                                 </constraints>
@@ -467,7 +465,7 @@
                                 </connections>
                             </button>
                             <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="5 Photos" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JAw-ik-fYD">
-                                <rect key="frame" x="50" y="107.5" width="200" height="20"/>
+                                <rect key="frame" x="67" y="70" width="280" height="20"/>
                                 <constraints>
                                     <constraint firstAttribute="height" constant="20" id="gr4-N2-NFP"/>
                                 </constraints>
@@ -551,9 +549,7 @@
                             <constraint firstItem="951-qi-5kI" firstAttribute="top" secondItem="ZS1-pc-kXu" secondAttribute="bottom" constant="10" id="ukF-93-xfZ"/>
                             <constraint firstItem="8cw-MJ-Ahc" firstAttribute="bottom" secondItem="i3W-S0-nip" secondAttribute="bottom" id="vZx-LD-eJX"/>
                             <constraint firstItem="JAw-ik-fYD" firstAttribute="leading" secondItem="i3W-S0-nip" secondAttribute="leading" id="va5-0V-pUF"/>
-                            <constraint firstItem="951-qi-5kI" firstAttribute="baseline" secondItem="8cw-MJ-Ahc" secondAttribute="firstBaseline" id="vkf-vf-2IX"/>
                             <constraint firstItem="i3W-S0-nip" firstAttribute="leading" secondItem="o96-bU-q7q" secondAttribute="leadingMargin" constant="30" id="w45-Qc-74D"/>
-                            <constraint firstItem="951-qi-5kI" firstAttribute="firstBaseline" secondItem="8cw-MJ-Ahc" secondAttribute="baseline" id="waZ-2w-RW1"/>
                             <constraint firstItem="xAA-t1-vMd" firstAttribute="trailing" secondItem="i3W-S0-nip" secondAttribute="trailing" id="xbY-aK-MNO"/>
                             <constraint firstItem="951-qi-5kI" firstAttribute="top" secondItem="ZS1-pc-kXu" secondAttribute="bottom" constant="10" id="xdL-hU-8Np"/>
                         </constraints>
@@ -595,8 +591,6 @@
                                 <exclude reference="gUk-GU-v1u"/>
                                 <exclude reference="hbN-Zu-Pll"/>
                                 <exclude reference="sMx-RK-bdo"/>
-                                <exclude reference="5QC-IL-i1w"/>
-                                <exclude reference="rgN-nI-NeD"/>
                                 <exclude reference="6Uu-lh-pOC"/>
                                 <exclude reference="DDb-NZ-fPw"/>
                                 <exclude reference="PFl-di-byG"/>
@@ -604,6 +598,8 @@
                                 <exclude reference="RPz-TG-EgB"/>
                                 <exclude reference="h3X-Sv-4VE"/>
                                 <exclude reference="vZx-LD-eJX"/>
+                                <exclude reference="5QC-IL-i1w"/>
+                                <exclude reference="rgN-nI-NeD"/>
                                 <exclude reference="0l7-5q-3zf"/>
                                 <exclude reference="7GX-rm-Lu7"/>
                                 <exclude reference="IP5-P6-wmP"/>
@@ -615,8 +611,6 @@
                                 <exclude reference="pTh-mC-e27"/>
                                 <exclude reference="sli-1k-i5W"/>
                                 <exclude reference="ukF-93-xfZ"/>
-                                <exclude reference="vkf-vf-2IX"/>
-                                <exclude reference="waZ-2w-RW1"/>
                                 <exclude reference="xdL-hU-8Np"/>
                                 <exclude reference="1To-SE-ubO"/>
                                 <exclude reference="Fdp-ve-rXy"/>
@@ -672,11 +666,11 @@
                                 <include reference="02G-Zl-PJ1"/>
                                 <include reference="3Zf-6r-xDu"/>
                                 <include reference="Q7L-Cg-Rml"/>
-                                <include reference="5QC-IL-i1w"/>
                                 <include reference="PFl-di-byG"/>
                                 <include reference="PKZ-co-q6C"/>
                                 <include reference="RPz-TG-EgB"/>
                                 <include reference="vZx-LD-eJX"/>
+                                <include reference="5QC-IL-i1w"/>
                                 <include reference="IP5-P6-wmP"/>
                                 <include reference="mP3-Aw-Eg2"/>
                                 <include reference="ukF-93-xfZ"/>
@@ -701,14 +695,12 @@
                                 <include reference="VVS-oN-KzO"/>
                                 <include reference="gUk-GU-v1u"/>
                                 <include reference="sMx-RK-bdo"/>
-                                <include reference="rgN-nI-NeD"/>
                                 <include reference="DDb-NZ-fPw"/>
+                                <include reference="rgN-nI-NeD"/>
                                 <include reference="7GX-rm-Lu7"/>
                                 <include reference="XMG-Nj-hPo"/>
                                 <include reference="lgt-jy-gsD"/>
                                 <include reference="sli-1k-i5W"/>
-                                <include reference="vkf-vf-2IX"/>
-                                <include reference="waZ-2w-RW1"/>
                                 <include reference="xdL-hU-8Np"/>
                                 <include reference="Hru-49-ooh"/>
                                 <include reference="mG3-eu-q03"/>
@@ -730,7 +722,7 @@
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="J8c-Ww-m77" userLabel="First Responder" sceneMemberID="firstResponder"/>
             </objects>
-            <point key="canvasLocation" x="773.60000000000002" y="80.50974512743629"/>
+            <point key="canvasLocation" x="772.46376811594212" y="79.891304347826093"/>
         </scene>
         <!--Manufacturer List Controller-->
         <scene sceneID="6ZO-pV-X2b">
@@ -741,22 +733,22 @@
                         <viewControllerLayoutGuide type="bottom" id="SjT-JB-7Rp"/>
                     </layoutGuides>
                     <view key="view" contentMode="scaleToFill" id="MEt-dL-S54">
-                        <rect key="frame" x="0.0" y="0.0" width="667" height="375"/>
+                        <rect key="frame" x="0.0" y="0.0" width="414" height="736"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="l46-Cv-WLh">
-                                <rect key="frame" x="0.0" y="20" width="667" height="355"/>
+                                <rect key="frame" x="0.0" y="20" width="414" height="716"/>
                                 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                                 <prototypes>
                                     <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="ManufacturerCell" id="Scm-6H-13W" customClass="ManufacturerCell">
-                                        <rect key="frame" x="0.0" y="28" width="667" height="44"/>
+                                        <rect key="frame" x="0.0" y="28" width="414" height="44"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <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="667" height="44"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="414" height="43.666666666666664"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <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">
-                                                    <rect key="frame" x="0.0" y="0.0" width="667" height="43.5"/>
+                                                    <rect key="frame" x="0.0" y="0.0" width="320" height="43.666666666666664"/>
                                                     <nil key="textColor"/>
                                                     <fontDescription key="fontDescription" type="system" pointSize="15"/>
                                                     <textInputTraits key="textInputTraits"/>
@@ -797,4 +789,9 @@
             <point key="canvasLocation" x="1814" y="162"/>
         </scene>
     </scenes>
+    <resources>
+        <image name="camera" width="60" height="60"/>
+        <image name="scan" width="60" height="60"/>
+        <image name="upload" width="60" height="60"/>
+    </resources>
 </document>

+ 6 - 2
RA Image/RA Image/PhotoList.storyboard

@@ -47,8 +47,8 @@
                                                         <constraint firstAttribute="height" constant="30" id="fcD-nH-U5R"/>
                                                         <constraint firstAttribute="width" constant="30" id="oon-Ke-ar6"/>
                                                     </constraints>
-                                                    <state key="normal" title="😯"/>
-                                                    <state key="selected" title="🌹"/>
+                                                    <state key="normal" image="checkbox"/>
+                                                    <state key="selected" image="checkbox_check"/>
                                                     <connections>
                                                         <action selector="checkBtnClick:" destination="rIk-OD-0lk" eventType="touchUpInside" id="tSw-f8-93A"/>
                                                     </connections>
@@ -188,4 +188,8 @@
             <point key="canvasLocation" x="1019" y="71"/>
         </scene>
     </scenes>
+    <resources>
+        <image name="checkbox" width="16" height="16"/>
+        <image name="checkbox_check" width="16" height="16"/>
+    </resources>
 </document>

+ 1 - 1
RA Image/RA Image/PhotoListViewController.h

@@ -11,7 +11,7 @@
 @class BasicModeViewController;
 @interface PhotoListViewController : BasicViewController
 
-@property (nonatomic,strong) NSMutableArray *photos;
+@property (nonatomic,strong) NSMutableArray <NSMutableDictionary *> *photos;
 
 @property (nonatomic,weak) BasicModeViewController *modeVC;
 

+ 5 - 3
RA Image/RA Image/PhotoListViewController.m

@@ -60,7 +60,7 @@
         return;
     }
 
-    for (NSDictionary *item in self.selectedPhotos) {
+    for (NSMutableDictionary *item in self.selectedPhotos) {
         NSString *path = [item objectForKey:@"path"];
         BOOL check = [[item objectForKey:@"check"] boolValue];
         if (check) {
@@ -68,7 +68,9 @@
             [self.photos removeObject:item];
             if (self.modeVC) {
                 [self.modeVC showTopImage];
-                self.modeVC.photoCount--;
+//                if(self.modeVC.photoCount) {
+                    self.modeVC.photoCount--;
+//                }
             }
         }
     }
@@ -128,7 +130,7 @@
 
 - (void)checkPhotoCell:(PhotoCell *)cell {
     NSIndexPath *indexPath = [self.photoCollectionView indexPathForCell:cell];
-    NSMutableDictionary *item = [[self.photos objectAtIndex:indexPath.row] mutableCopy];
+    NSMutableDictionary *item = [self.photos objectAtIndex:indexPath.row];
     BOOL check = [[item objectForKey:@"check"] boolValue];
     [item setValue:[NSNumber numberWithBool:!check] forKey:@"check"];
     [self.photos replaceObjectAtIndex:indexPath.row withObject:item];

+ 20 - 10
RA Image/RA Image/Upload.storyboard

@@ -25,16 +25,16 @@
                             <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="g67-RH-bZN">
                                 <rect key="frame" x="0.0" y="20" width="375" height="647"/>
                                 <subviews>
-                                    <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="80" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="u4f-TD-M09">
+                                    <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="100" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="u4f-TD-M09">
                                         <rect key="frame" x="0.0" y="0.0" width="375" height="647"/>
                                         <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                                         <inset key="separatorInset" minX="10" minY="0.0" maxX="0.0" maxY="0.0"/>
                                         <prototypes>
-                                            <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="UploadCell" rowHeight="80" id="p1C-Cy-yXq" customClass="UploadCell">
-                                                <rect key="frame" x="0.0" y="28" width="375" height="80"/>
+                                            <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="UploadCell" rowHeight="100" id="p1C-Cy-yXq" customClass="UploadCell">
+                                                <rect key="frame" x="0.0" y="28" width="375" height="100"/>
                                                 <autoresizingMask key="autoresizingMask"/>
                                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="p1C-Cy-yXq" id="tdd-mO-6vJ">
-                                                    <rect key="frame" x="0.0" y="0.0" width="375" height="80"/>
+                                                    <rect key="frame" x="0.0" y="0.0" width="375" height="100"/>
                                                     <autoresizingMask key="autoresizingMask"/>
                                                     <subviews>
                                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="QS8884456999666666" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0VW-ZZ-YcB">
@@ -47,13 +47,13 @@
                                                             <nil key="highlightedColor"/>
                                                         </label>
                                                         <progressView opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="750" progress="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="NYs-S2-H37">
-                                                            <rect key="frame" x="10" y="37.5" width="355" height="5"/>
+                                                            <rect key="frame" x="10" y="35" width="355" height="5"/>
                                                             <constraints>
                                                                 <constraint firstAttribute="height" constant="5" id="QYr-rE-zSp"/>
                                                             </constraints>
                                                         </progressView>
                                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="99.9%" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8Qr-iv-UsW">
-                                                            <rect key="frame" x="315" y="52.5" width="50" height="21"/>
+                                                            <rect key="frame" x="315" y="45" width="50" height="21"/>
                                                             <constraints>
                                                                 <constraint firstAttribute="height" constant="21" id="8Tc-O3-69h"/>
                                                                 <constraint firstAttribute="width" constant="50" id="ljZ-ci-ehG"/>
@@ -63,7 +63,13 @@
                                                             <nil key="highlightedColor"/>
                                                         </label>
                                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Waiting" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="DED-nv-Rm5">
-                                                            <rect key="frame" x="10" y="52.5" width="295" height="21"/>
+                                                            <rect key="frame" x="10" y="45" width="295" height="21"/>
+                                                            <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                                            <nil key="textColor"/>
+                                                            <nil key="highlightedColor"/>
+                                                        </label>
+                                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Error:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="AOp-qH-n4C">
+                                                            <rect key="frame" x="10" y="71" width="355" height="17"/>
                                                             <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                                             <nil key="textColor"/>
                                                             <nil key="highlightedColor"/>
@@ -78,13 +84,17 @@
                                                         <constraint firstItem="NYs-S2-H37" firstAttribute="leading" secondItem="tdd-mO-6vJ" secondAttribute="leading" constant="10" id="YA4-TF-Sg3"/>
                                                         <constraint firstAttribute="trailing" secondItem="NYs-S2-H37" secondAttribute="trailing" constant="10" id="bCR-Ap-65f"/>
                                                         <constraint firstItem="0VW-ZZ-YcB" firstAttribute="top" secondItem="tdd-mO-6vJ" secondAttribute="top" constant="5" id="blc-vu-cfg"/>
+                                                        <constraint firstItem="AOp-qH-n4C" firstAttribute="leading" secondItem="DED-nv-Rm5" secondAttribute="leading" id="brd-5S-Az7"/>
                                                         <constraint firstItem="DED-nv-Rm5" firstAttribute="leading" secondItem="NYs-S2-H37" secondAttribute="leading" id="fPh-dc-l8i"/>
-                                                        <constraint firstItem="NYs-S2-H37" firstAttribute="centerY" secondItem="tdd-mO-6vJ" secondAttribute="centerY" id="itJ-sP-86i"/>
-                                                        <constraint firstItem="8Qr-iv-UsW" firstAttribute="top" secondItem="NYs-S2-H37" secondAttribute="bottom" constant="10" id="k7O-MS-POX"/>
+                                                        <constraint firstItem="8Qr-iv-UsW" firstAttribute="top" secondItem="NYs-S2-H37" secondAttribute="bottom" constant="5" id="k7O-MS-POX"/>
+                                                        <constraint firstItem="NYs-S2-H37" firstAttribute="top" secondItem="0VW-ZZ-YcB" secondAttribute="bottom" constant="10" id="mvG-Ll-ilJ"/>
+                                                        <constraint firstItem="AOp-qH-n4C" firstAttribute="trailing" secondItem="8Qr-iv-UsW" secondAttribute="trailing" id="qUZ-2k-aaq"/>
+                                                        <constraint firstItem="AOp-qH-n4C" firstAttribute="top" secondItem="DED-nv-Rm5" secondAttribute="bottom" constant="5" id="thb-70-2pv"/>
                                                         <constraint firstItem="DED-nv-Rm5" firstAttribute="centerY" secondItem="8Qr-iv-UsW" secondAttribute="centerY" id="uPm-aG-F8H"/>
                                                     </constraints>
                                                 </tableViewCellContentView>
                                                 <connections>
+                                                    <outlet property="errorLabel" destination="AOp-qH-n4C" id="g0M-yb-3Wg"/>
                                                     <outlet property="nameLabel" destination="0VW-ZZ-YcB" id="Ta1-1H-jUh"/>
                                                     <outlet property="progressIndicator" destination="8Qr-iv-UsW" id="jDN-NR-tA7"/>
                                                     <outlet property="progressView" destination="NYs-S2-H37" id="HWA-Wj-UYx"/>
@@ -122,7 +132,7 @@
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="akp-uQ-YhO" userLabel="First Responder" sceneMemberID="firstResponder"/>
             </objects>
-            <point key="canvasLocation" x="-585" y="-38"/>
+            <point key="canvasLocation" x="-586.39999999999998" y="-38.23088455772114"/>
         </scene>
         <!--Upload Setting Controller-->
         <scene sceneID="lRS-zE-FWM">

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

@@ -13,5 +13,6 @@
 @property (nonatomic,copy) NSString *name;
 @property (nonatomic,assign) float progress;
 @property (nonatomic,copy) NSString *state;
+@property (nonatomic,copy) NSString *errorMsg;
 
 @end

+ 12 - 0
RA Image/RA Image/UploadCell.m

@@ -13,6 +13,7 @@
 @property (strong, nonatomic) IBOutlet UILabel *nameLabel;
 @property (strong, nonatomic) IBOutlet UIProgressView *progressView;
 @property (strong, nonatomic) IBOutlet UILabel *progressIndicator;
+@property (strong, nonatomic) IBOutlet UILabel *errorLabel;
 
 @property (strong, nonatomic) IBOutlet UILabel *stateLabel;
 
@@ -54,4 +55,15 @@
     self.stateLabel.text = state;
 }
 
+- (void)setErrorMsg:(NSString *)errorMsg {
+    _errorMsg = errorMsg;
+    if (errorMsg.length) {
+        self.errorLabel.hidden = NO;
+        self.errorLabel.text = [NSString stringWithFormat:@"Error:%@",errorMsg];
+    } else {
+        self.errorLabel.hidden = YES;
+        self.errorLabel.text = nil;
+    }
+}
+
 @end