Ver código fonte

1.修改Document List Modify时网络任务阻塞UI。
2.首页增加离线Document数量显示。

Pen Li 9 anos atrás
pai
commit
634f660bed

BIN
Ants Contract/AntsContract.xcworkspace/xcuserdata/macmini1.xcuserdatad/UserInterfaceState.xcuserstate


+ 85 - 62
Ants Contract/AntsContract/AntsContract/Base.lproj/Main.storyboard

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11762" systemVersion="16A323" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" colorMatched="YES" initialViewController="UmP-Fl-ZUI">
-    <device id="ipad9_7" orientation="portrait">
+    <device id="ipad12_9" orientation="portrait">
         <adaptation id="fullscreen"/>
     </device>
     <dependencies>
@@ -13,62 +13,84 @@
             <objects>
                 <viewController storyboardIdentifier="RootViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="BYZ-38-t0r" customClass="RootViewController" sceneMemberID="viewController">
                     <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
-                        <rect key="frame" x="0.0" y="0.0" width="768" height="1024"/>
+                        <rect key="frame" x="0.0" y="0.0" width="1024" height="1366"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" image="home_bg_p" id="V7m-G1-ogb">
-                                <rect key="frame" x="0.0" y="20" width="768" height="1024"/>
+                                <rect key="frame" x="0.0" y="27" width="1024" height="1366"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
                             </imageView>
-                            <button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="VoO-EQ-M9h">
-                                <rect key="frame" x="76" y="420" width="200" height="150"/>
+                            <view contentMode="scaleToFill" misplaced="YES" id="VWG-vZ-UuE">
+                                <rect key="frame" x="0.0" y="541" width="1024" height="223"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
-                                <inset key="titleEdgeInsets" minX="-100" minY="0.0" maxX="0.0" maxY="-120"/>
-                                <inset key="imageEdgeInsets" minX="50" minY="0.0" maxX="0.0" maxY="30"/>
-                                <state key="normal" title="New Customer" image="NewDoc">
-                                    <color key="titleColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                                </state>
-                                <connections>
-                                    <action selector="onNewCustomerClick:" destination="BYZ-38-t0r" eventType="touchUpInside" id="Zii-HE-DOQ"/>
-                                </connections>
-                            </button>
-                            <button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="xZf-mR-3rv">
-                                <rect key="frame" x="492" y="420" width="200" height="150"/>
-                                <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
-                                <inset key="titleEdgeInsets" minX="-100" minY="0.0" maxX="0.0" maxY="-120"/>
-                                <inset key="imageEdgeInsets" minX="50" minY="0.0" maxX="0.0" maxY="30"/>
-                                <state key="normal" title="Pending Documents" image="PendingDoc">
-                                    <color key="titleColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                                </state>
-                                <connections>
-                                    <action selector="onPendingDocClick:" destination="BYZ-38-t0r" eventType="touchUpInside" id="v66-Tw-f3L"/>
-                                </connections>
-                            </button>
-                            <button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="tLn-KD-7Jb">
-                                <rect key="frame" x="284" y="420" width="200" height="150"/>
-                                <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
-                                <inset key="titleEdgeInsets" minX="-100" minY="0.0" maxX="0.0" maxY="-120"/>
-                                <inset key="imageEdgeInsets" minX="50" minY="0.0" maxX="0.0" maxY="30"/>
-                                <state key="normal" title="Customer per Document" image="OpenDoc">
-                                    <color key="titleColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                                </state>
-                                <connections>
-                                    <action selector="onCustomerPerDocClick:" destination="BYZ-38-t0r" eventType="touchUpInside" id="bPp-JV-Zpk"/>
-                                </connections>
-                            </button>
+                                <subviews>
+                                    <button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="VoO-EQ-M9h">
+                                        <rect key="frame" x="73" y="30" width="200" height="150"/>
+                                        <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
+                                        <inset key="titleEdgeInsets" minX="-100" minY="0.0" maxX="0.0" maxY="-120"/>
+                                        <inset key="imageEdgeInsets" minX="50" minY="0.0" maxX="0.0" maxY="30"/>
+                                        <state key="normal" title="New Customer" image="NewDoc">
+                                            <color key="titleColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                        </state>
+                                        <connections>
+                                            <action selector="onNewCustomerClick:" destination="BYZ-38-t0r" eventType="touchUpInside" id="Zii-HE-DOQ"/>
+                                        </connections>
+                                    </button>
+                                    <button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="tLn-KD-7Jb">
+                                        <rect key="frame" x="412" y="30" width="200" height="150"/>
+                                        <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
+                                        <inset key="titleEdgeInsets" minX="-100" minY="0.0" maxX="0.0" maxY="-120"/>
+                                        <inset key="imageEdgeInsets" minX="50" minY="0.0" maxX="0.0" maxY="30"/>
+                                        <state key="normal" title="Customer per Document" image="OpenDoc">
+                                            <color key="titleColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                        </state>
+                                        <connections>
+                                            <action selector="onCustomerPerDocClick:" destination="BYZ-38-t0r" eventType="touchUpInside" id="bPp-JV-Zpk"/>
+                                        </connections>
+                                    </button>
+                                    <button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="xZf-mR-3rv">
+                                        <rect key="frame" x="753" y="30" width="200" height="150"/>
+                                        <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
+                                        <color key="backgroundColor" red="1" green="1" blue="1" alpha="0.0" colorSpace="calibratedRGB"/>
+                                        <inset key="titleEdgeInsets" minX="-100" minY="0.0" maxX="0.0" maxY="-120"/>
+                                        <inset key="imageEdgeInsets" minX="50" minY="0.0" maxX="0.0" maxY="30"/>
+                                        <state key="normal" title="Pending Documents" image="PendingDoc">
+                                            <color key="titleColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                        </state>
+                                        <connections>
+                                            <action selector="onPendingDocClick:" destination="BYZ-38-t0r" eventType="touchUpInside" id="v66-Tw-f3L"/>
+                                        </connections>
+                                    </button>
+                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="20" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="KcS-q7-9pm">
+                                        <rect key="frame" x="868" y="30" width="30" height="30"/>
+                                        <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
+                                        <color key="backgroundColor" red="1" green="0.053315131760000002" blue="0.038905751279999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                        <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                        <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                        <nil key="highlightedColor"/>
+                                        <userDefinedRuntimeAttributes>
+                                            <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
+                                                <integer key="value" value="15"/>
+                                            </userDefinedRuntimeAttribute>
+                                            <userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
+                                        </userDefinedRuntimeAttributes>
+                                    </label>
+                                </subviews>
+                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
+                            </view>
                             <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="QNm-bw-hPi">
-                                <rect key="frame" x="532" y="100" width="205" height="21"/>
+                                <rect key="frame" x="709" y="100" width="274" height="21"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                 <nil key="textColor"/>
                                 <nil key="highlightedColor"/>
                             </label>
                             <view hidden="YES" contentMode="scaleToFill" misplaced="YES" id="WlE-9f-0pQ">
-                                <rect key="frame" x="0.0" y="0.0" width="768" height="1024"/>
+                                <rect key="frame" x="0.0" y="0.0" width="1024" height="1366"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
                                 <subviews>
                                     <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" image="home_bg_p" id="74h-ia-SzF">
-                                        <rect key="frame" x="0.0" y="0.0" width="768" height="1024"/>
+                                        <rect key="frame" x="0.0" y="0.0" width="1024" height="1366"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
                                     </imageView>
                                 </subviews>
@@ -79,21 +101,21 @@
                                 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                             </imageView>
                             <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="WPb-xH-q9X">
-                                <rect key="frame" x="42" y="200" width="187" height="21"/>
+                                <rect key="frame" x="42" y="200" width="253" height="21"/>
                                 <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                 <nil key="textColor"/>
                                 <nil key="highlightedColor"/>
                             </label>
                             <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" id="2BU-Jv-Tw8">
-                                <rect key="frame" x="688" y="129" width="51" height="31"/>
+                                <rect key="frame" x="944" y="129" width="51" height="31"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
                                 <connections>
                                     <action selector="onModeSwitch:" destination="BYZ-38-t0r" eventType="valueChanged" id="ve9-zT-d8E"/>
                                 </connections>
                             </switch>
                             <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="Mode" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="CHe-xF-uwt">
-                                <rect key="frame" x="532" y="134" width="140" height="21"/>
+                                <rect key="frame" x="788" y="134" width="140" height="21"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                 <nil key="textColor"/>
@@ -118,6 +140,7 @@
                         <outlet property="coverView" destination="WlE-9f-0pQ" id="WdQ-tM-RPW"/>
                         <outlet property="ibSignin" destination="A9f-vj-ZDF" id="nwF-qz-pqH"/>
                         <outlet property="imageBG" destination="V7m-G1-ogb" id="yvL-Se-ZpI"/>
+                        <outlet property="labelDocNumber" destination="KcS-q7-9pm" id="fNU-5d-StP"/>
                         <outlet property="labelMode" destination="CHe-xF-uwt" id="VCT-dC-CKA"/>
                         <outlet property="labelVer" destination="WPb-xH-q9X" id="hrQ-cR-Ac5"/>
                         <outlet property="switchMode" destination="2BU-Jv-Tw8" id="BJ3-uX-wiI"/>
@@ -149,24 +172,24 @@
             <objects>
                 <viewController storyboardIdentifier="PageViewController" id="e1o-QP-z2F" customClass="PageViewController" sceneMemberID="viewController">
                     <view key="view" contentMode="scaleToFill" id="BEc-Ba-Mzk">
-                        <rect key="frame" x="0.0" y="0.0" width="768" height="1024"/>
+                        <rect key="frame" x="0.0" y="0.0" width="1024" height="1366"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" misplaced="YES" maximumZoomScale="3" id="UZY-AP-7MO" customClass="PDFScrollView">
-                                <rect key="frame" x="0.0" y="64" width="768" height="960"/>
+                                <rect key="frame" x="0.0" y="64" width="1024" height="1302"/>
                                 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                 <subviews>
                                     <view tag="1024" contentMode="scaleToFill" misplaced="YES" id="Iyx-2L-Lrz">
-                                        <rect key="frame" x="0.0" y="0.0" width="768" height="960"/>
+                                        <rect key="frame" x="0.0" y="0.0" width="1024" height="1302"/>
                                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                         <subviews>
                                             <view contentMode="scaleToFill" id="8Hw-OZ-rsH" customClass="PDFPageView">
-                                                <rect key="frame" x="0.0" y="0.0" width="768" height="960"/>
+                                                <rect key="frame" x="0.0" y="0.0" width="1024" height="1302"/>
                                                 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                                 <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
                                             </view>
                                             <view contentMode="scaleToFill" misplaced="YES" id="wPo-qh-F4Q">
-                                                <rect key="frame" x="0.0" y="0.0" width="768" height="961"/>
+                                                <rect key="frame" x="0.0" y="0.0" width="1024" height="1303"/>
                                                 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                             </view>
                                         </subviews>
@@ -197,7 +220,7 @@
             <objects>
                 <viewController storyboardIdentifier="DocumentPageViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="UPd-uT-cg4" customClass="DocumentPageViewController" sceneMemberID="viewController">
                     <view key="view" contentMode="scaleToFill" id="L77-lK-1UM">
-                        <rect key="frame" x="0.0" y="0.0" width="768" height="1024"/>
+                        <rect key="frame" x="0.0" y="0.0" width="1024" height="1366"/>
                         <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
                         <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                     </view>
@@ -361,11 +384,11 @@
             <objects>
                 <viewController storyboardIdentifier="PDFViewController" title="PDFViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="RFL-cn-4ui" customClass="PDFViewController" sceneMemberID="viewController">
                     <view key="view" contentMode="scaleToFill" id="tem-U2-psf">
-                        <rect key="frame" x="0.0" y="0.0" width="768" height="1024"/>
+                        <rect key="frame" x="0.0" y="0.0" width="1024" height="1366"/>
                         <autoresizingMask key="autoresizingMask"/>
                         <subviews>
                             <webView contentMode="scaleToFill" scalesPageToFit="YES" allowsInlineMediaPlayback="NO" mediaPlaybackRequiresUserAction="NO" mediaPlaybackAllowsAirPlay="NO" id="Acx-xn-euf">
-                                <rect key="frame" x="0.0" y="44" width="768" height="980"/>
+                                <rect key="frame" x="0.0" y="44" width="1024" height="1322"/>
                                 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                 <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                 <dataDetectorType key="dataDetectorTypes"/>
@@ -374,7 +397,7 @@
                                 </connections>
                             </webView>
                             <activityIndicatorView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" hidesWhenStopped="YES" animating="YES" style="whiteLarge" id="FgW-eU-Txw">
-                                <rect key="frame" x="365" y="494" width="37" height="37"/>
+                                <rect key="frame" x="493" y="665" width="37" height="37"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
                                 <color key="color" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                             </activityIndicatorView>
@@ -396,11 +419,11 @@
             <objects>
                 <viewController storyboardIdentifier="DocumentListViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="kYv-Xx-xIY" customClass="DocumentListViewController" sceneMemberID="viewController">
                     <view key="view" contentMode="scaleToFill" id="XtH-ZB-KeO">
-                        <rect key="frame" x="0.0" y="0.0" width="768" height="1024"/>
+                        <rect key="frame" x="0.0" y="0.0" width="1024" height="1366"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <toolbar opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" misplaced="YES" id="jsg-Ci-KBs">
-                                <rect key="frame" x="0.0" y="64" width="768" height="44"/>
+                                <rect key="frame" x="0.0" y="64" width="1024" height="44"/>
                                 <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
                                 <items>
                                     <barButtonItem style="plain" systemItem="flexibleSpace" id="9H2-6O-Ty3"/>
@@ -418,7 +441,7 @@
                                 </items>
                             </toolbar>
                             <tableView clipsSubviews="YES" contentMode="scaleToFill" misplaced="YES" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="119" sectionHeaderHeight="28" sectionFooterHeight="28" id="l0t-xj-j7L">
-                                <rect key="frame" x="0.0" y="108" width="768" height="916"/>
+                                <rect key="frame" x="0.0" y="108" width="1024" height="1258"/>
                                 <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES" flexibleMaxY="YES"/>
                                 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                                 <prototypes>
@@ -533,11 +556,11 @@
                                 </connections>
                             </tableView>
                             <activityIndicatorView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" hidesWhenStopped="YES" animating="YES" style="whiteLarge" id="UYQ-CF-Sey">
-                                <rect key="frame" x="366" y="494" width="37" height="37"/>
+                                <rect key="frame" x="494" y="665" width="37" height="37"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
                             </activityIndicatorView>
                             <label hidden="YES" opaque="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Cannot get data from server.
Tap to try again." textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="S0J-Y4-ysB">
-                                <rect key="frame" x="245" y="475" width="277" height="73"/>
+                                <rect key="frame" x="373" y="646" width="277" height="73"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="19"/>
                                 <color key="textColor" red="0.33333333329999998" green="0.33333333329999998" blue="0.33333333329999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@@ -561,7 +584,7 @@
             <objects>
                 <viewController id="3mW-hv-l2g" sceneMemberID="viewController">
                     <view key="view" contentMode="scaleToFill" id="Ij5-SK-Xkx">
-                        <rect key="frame" x="0.0" y="0.0" width="768" height="1024"/>
+                        <rect key="frame" x="0.0" y="0.0" width="1024" height="1366"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                     </view>
@@ -1036,11 +1059,11 @@
             <objects>
                 <viewController storyboardIdentifier="PendingDocumentsViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="6vP-98-4Js" customClass="PendingDocumentsViewController" sceneMemberID="viewController">
                     <view key="view" contentMode="scaleToFill" id="RUZ-6C-sBf">
-                        <rect key="frame" x="0.0" y="0.0" width="768" height="1024"/>
+                        <rect key="frame" x="0.0" y="0.0" width="1024" height="1366"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <tableView clipsSubviews="YES" contentMode="scaleToFill" misplaced="YES" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" id="Flg-41-AM4">
-                                <rect key="frame" x="0.0" y="20" width="768" height="1004"/>
+                                <rect key="frame" x="0.0" y="20" width="1024" height="1346"/>
                                 <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES" flexibleMaxY="YES"/>
                                 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                                 <prototypes>
@@ -1129,6 +1152,6 @@
     <simulatedMetricsContainer key="defaultSimulatedMetrics">
         <simulatedStatusBarMetrics key="statusBar"/>
         <simulatedOrientationMetrics key="orientation"/>
-        <simulatedScreenMetrics key="destination"/>
+        <simulatedScreenMetrics key="destination" type="ipad12_9.fullscreen"/>
     </simulatedMetricsContainer>
 </document>

+ 37 - 32
Ants Contract/common/DocumentListViewController.m

@@ -1057,38 +1057,43 @@
         DebugLog(@"modify click");
         
         UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait..." title:@"Downloading contract"];
-        NSData* jsondata= [NSData dataWithContentsOfURL:[NSURL URLWithString:jsonurl]];
-        NSData* pdfdata= [NSData dataWithContentsOfURL:[NSURL URLWithString:pdfurl]];
-        [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
-        if(jsondata==nil||pdfdata==nil)
-        {
-            
-            [RAUtils message_alert:@"Please try again."  title:@"Can not download contract" controller:self];
-            return;
-        }
-        
-        NSString* tempDir = NSTemporaryDirectory();
-        
-        NSString* jsonpath=[tempDir stringByAppendingPathComponent:@"json.json"];
-        NSString* pdfpath=[tempDir stringByAppendingPathComponent:[NSString stringWithFormat:@"%@.pdf",item_json[@"doc_number"]]];
-        [jsondata writeToFile:jsonpath atomically:true];
-        [pdfdata writeToFile:pdfpath atomically:true];
-        
-        
-        DocumentPageViewController* dvc = [self.storyboard instantiateViewControllerWithIdentifier:@"DocumentPageViewController" ];
-        
-        //                dvc.templateName = @"debug.json";
-        dvc.templatePath = jsonpath;
-        dvc.pdfPath = pdfpath;
-        dvc.action = PDFEditActionModify;
-        dvc.docment_id =  item_json[@"doc_number"];
-        dvc.OnSave=^(NSString* file, NSString* subject)
-        {
-            
-            [weakSelf previewPDF:file title:item_json[@"doc_number"] subject:subject];
-        };
-        
-        [self.navigationController pushViewController:dvc animated:true];
+        dispatch_async(dispatch_get_global_queue(0, 0), ^{
+            NSData* jsondata= [NSData dataWithContentsOfURL:[NSURL URLWithString:jsonurl]];
+            NSData* pdfdata= [NSData dataWithContentsOfURL:[NSURL URLWithString:pdfurl]];
+            dispatch_async(dispatch_get_main_queue(), ^{
+                [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+                if(jsondata==nil||pdfdata==nil)
+                {
+                    
+                    [RAUtils message_alert:@"Please try again."  title:@"Can not download contract" controller:self];
+                    return;
+                }
+                
+                NSString* tempDir = NSTemporaryDirectory();
+                
+                NSString* jsonpath=[tempDir stringByAppendingPathComponent:@"json.json"];
+                NSString* pdfpath=[tempDir stringByAppendingPathComponent:[NSString stringWithFormat:@"%@.pdf",item_json[@"doc_number"]]];
+                [jsondata writeToFile:jsonpath atomically:true];
+                [pdfdata writeToFile:pdfpath atomically:true];
+                
+                
+                DocumentPageViewController* dvc = [self.storyboard instantiateViewControllerWithIdentifier:@"DocumentPageViewController" ];
+                
+                //                dvc.templateName = @"debug.json";
+                dvc.templatePath = jsonpath;
+                dvc.pdfPath = pdfpath;
+                dvc.action = PDFEditActionModify;
+                dvc.docment_id =  item_json[@"doc_number"];
+                dvc.OnSave=^(NSString* file, NSString* subject)
+                {
+                    
+                    [weakSelf previewPDF:file title:item_json[@"doc_number"] subject:subject];
+                };
+                
+                [self.navigationController pushViewController:dvc animated:true];
+            });
+
+        });
         
         
 //        [tableView reloadRowsAtIndexPaths:@[indexPath]withRowAnimation:UITableViewRowAnimationMiddle];

+ 1 - 0
Ants Contract/common/RootViewController.h

@@ -24,6 +24,7 @@
 @property (weak, nonatomic) IBOutlet UIImageView *coverBG;
 @property (weak, nonatomic) IBOutlet UILabel *labelMode;
 @property (weak, nonatomic) IBOutlet UISwitch *switchMode;
+@property (strong, nonatomic) IBOutlet UILabel *labelDocNumber;
 
 - (void)dealWithUILogout;
 

+ 18 - 1
Ants Contract/common/RootViewController.m

@@ -50,6 +50,15 @@
      // Do any additional setup after loading the view, typically from a nib.
 }
 
+- (NSInteger)loadDocCount {
+    NSUserDefaults *defaults =[NSUserDefaults standardUserDefaults];
+    NSArray *docArr = [defaults arrayForKey:@"pending_doc"];
+    if (docArr) {
+        return docArr.count;
+    }
+    return 0;
+}
+
 -(void) viewDidAppear:(BOOL)animated
 {
         AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
@@ -68,7 +77,15 @@
 
     if(!appDelegate.bLogin)
         [self presentLogin:self.ibSignin];
-
+    
+    NSInteger docCount = [self loadDocCount];
+    if (docCount > 0) {
+        self.labelDocNumber.hidden = NO;
+        self.labelDocNumber.text = [NSString stringWithFormat:@"%ld",docCount];
+    } else {
+        self.labelDocNumber.hidden = YES;
+        self.labelDocNumber.text = [NSString stringWithFormat:@""];
+    }
 }
 -(void) presentLogin:(id)sender
 {