Sfoglia il codice sorgente

170204
Fixed display issue for iPad pro.
eSign 1.21 release version

Ray Zhang 9 anni fa
parent
commit
71df40b6d5

+ 191 - 15
Ants Contract/AntsContract.xcworkspace/xcuserdata/Ray.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -10,11 +10,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/PageViewController.m"
-            timestampString = "506491314.356293"
+            timestampString = "507871716.928267"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1194"
-            endingLineNumber = "1194"
+            startingLineNumber = "1247"
+            endingLineNumber = "1247"
             landmarkName = "-keyboardWillShow:"
             landmarkType = "7">
          </BreakpointContent>
@@ -26,11 +26,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/PageViewController.m"
-            timestampString = "506491314.356293"
+            timestampString = "507871716.928267"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1245"
-            endingLineNumber = "1245"
+            startingLineNumber = "1298"
+            endingLineNumber = "1298"
             landmarkName = "-keyboardWillHide:"
             landmarkType = "7">
          </BreakpointContent>
@@ -42,11 +42,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/PageViewController.m"
-            timestampString = "506491314.356293"
+            timestampString = "507871716.928267"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1244"
-            endingLineNumber = "1244"
+            startingLineNumber = "1297"
+            endingLineNumber = "1297"
             landmarkName = "-keyboardWillHide:"
             landmarkType = "7">
          </BreakpointContent>
@@ -58,11 +58,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/PageViewController.m"
-            timestampString = "506491314.356293"
+            timestampString = "507871716.928267"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1195"
-            endingLineNumber = "1195"
+            startingLineNumber = "1248"
+            endingLineNumber = "1248"
             landmarkName = "-keyboardWillShow:"
             landmarkType = "7">
          </BreakpointContent>
@@ -88,11 +88,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/PageViewController.m"
-            timestampString = "506491314.356293"
+            timestampString = "507871716.928267"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "726"
-            endingLineNumber = "726"
+            startingLineNumber = "779"
+            endingLineNumber = "779"
             landmarkName = "-textView:shouldChangeTextInRange:replacementText:"
             landmarkType = "7">
          </BreakpointContent>
@@ -161,5 +161,181 @@
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/PDFPageView.m"
+            timestampString = "507803646.230241"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "64"
+            endingLineNumber = "64"
+            landmarkName = "-MyDisplayPDFPage:index:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/PageViewController.m"
+            timestampString = "507871716.928267"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "144"
+            endingLineNumber = "144"
+            landmarkName = "-initControl"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/PDFPageView.m"
+            timestampString = "507785743.177363"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "40"
+            endingLineNumber = "40"
+            landmarkName = "-MyDisplayPDFPage:index:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/PDFPageView.m"
+            timestampString = "507803646.230241"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "60"
+            endingLineNumber = "60"
+            landmarkName = "-MyDisplayPDFPage:index:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/PDFPageView.m"
+            timestampString = "507803646.230241"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "62"
+            endingLineNumber = "62"
+            landmarkName = "-MyDisplayPDFPage:index:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/PDFPageView.m"
+            timestampString = "507803646.230241"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "67"
+            endingLineNumber = "67"
+            landmarkName = "-MyDisplayPDFPage:index:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/PDFPageView.m"
+            timestampString = "507803646.230241"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "47"
+            endingLineNumber = "47"
+            landmarkName = "-MyDisplayPDFPage:index:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/PDFPageView.m"
+            timestampString = "507798704.873893"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "41"
+            endingLineNumber = "41"
+            landmarkName = "-MyDisplayPDFPage:index:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/PDFPageView.m"
+            timestampString = "507798705.785721"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "39"
+            endingLineNumber = "39"
+            landmarkName = "-MyDisplayPDFPage:index:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/PDFPageView.m"
+            timestampString = "507803646.230241"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "43"
+            endingLineNumber = "43"
+            landmarkName = "-MyDisplayPDFPage:index:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/PageViewController.m"
+            timestampString = "507871706.661522"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "138"
+            endingLineNumber = "138"
+            landmarkName = "-scaleControl:from:to:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
    </Breakpoints>
 </Bucket>

+ 46 - 16
Ants Contract/AntsContract.xcworkspace/xcuserdata/Ray.xcuserdatad/xcdebugger/Expressions.xcexplist

@@ -25,22 +25,66 @@
          </PersistentStrings>
       </ContextState>
       <ContextState
-         contextName = "-[PageViewController keyboardWillShow:]:PageViewController.m">
+         contextName = "-[PageViewController initControl]:PageViewController.m">
          <PersistentStrings>
             <PersistentString
-               value = "self.hotTextView">
+               value = "self.editControlView.bounds">
+            </PersistentString>
+            <PersistentString
+               value = "self.editControlView.frame">
+            </PersistentString>
+         </PersistentStrings>
+      </ContextState>
+      <ContextState
+         contextName = "-[PDFPageView MyDisplayPDFPage:index:]:PDFPageView.m">
+         <PersistentStrings>
+            <PersistentString
+               value = "92.5714416*0.952380955">
+            </PersistentString>
+            <PersistentString
+               value = "(self.frame.size.width-mediabox.size.width*scale)/2">
             </PersistentString>
          </PersistentStrings>
       </ContextState>
       <ContextState
          contextName = "-[PDFViewController loadcontent]:PDFViewController.m">
       </ContextState>
+      <ContextState
+         contextName = "-[PageViewController keyboardWillShow:]:PageViewController.m">
+         <PersistentStrings>
+            <PersistentString
+               value = "self.hotTextView">
+            </PersistentString>
+         </PersistentStrings>
+      </ContextState>
       <ContextState
          contextName = "__41-[PageViewController CheckButtonClicked:]_block_invoke:PageViewController.m">
       </ContextState>
       <ContextState
          contextName = "-[PDFViewController onActionClick:]:PDFViewController.m">
       </ContextState>
+      <ContextState
+         contextName = "-[PageViewController scaleControl:from:to:]:PageViewController.m">
+         <PersistentStrings>
+            <PersistentString
+               value = "twindowsize.width/2-(fwindowsize.width/2-(frame.origin.x+frame.size.width))*a-width;">
+            </PersistentString>
+         </PersistentStrings>
+      </ContextState>
+      <ContextState
+         contextName = "__32-[PDFViewController loadcontent]_block_invoke:PDFViewController.m">
+      </ContextState>
+      <ContextState
+         contextName = "+[ACNetwork get_json:parameters:]:ACNetwork.m">
+         <PersistentStrings>
+            <PersistentString
+               value = "[e aes256_encrypt:@&quot;usai2010&quot;]">
+            </PersistentString>
+         </PersistentStrings>
+      </ContextState>
+      <ContextState
+         contextName = "-[PageViewController addTextView:destView:index:]:PageViewController.m">
+      </ContextState>
       <ContextState
          contextName = "-[PageViewController textViewDidEndEditing:]:PageViewController.m">
          <PersistentStrings>
@@ -66,22 +110,8 @@
             </PersistentString>
          </PersistentStrings>
       </ContextState>
-      <ContextState
-         contextName = "-[PageViewController addTextView:destView:index:]:PageViewController.m">
-      </ContextState>
-      <ContextState
-         contextName = "__32-[PDFViewController loadcontent]_block_invoke:PDFViewController.m">
-      </ContextState>
       <ContextState
          contextName = "+[ACNetwork prepare_addtional_params:]:ACNetwork.m">
       </ContextState>
-      <ContextState
-         contextName = "+[ACNetwork get_json:parameters:]:ACNetwork.m">
-         <PersistentStrings>
-            <PersistentString
-               value = "[e aes256_encrypt:@&quot;usai2010&quot;]">
-            </PersistentString>
-         </PersistentStrings>
-      </ContextState>
    </ContextStates>
 </VariablesViewState>

+ 28 - 28
Ants Contract/AntsContract/AntsContract/Base.lproj/Main.storyboard

@@ -1,5 +1,5 @@
 <?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">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11762" systemVersion="16D32" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" colorMatched="YES" initialViewController="UmP-Fl-ZUI">
     <device id="ipad9_7" orientation="portrait">
         <adaptation id="fullscreen"/>
     </device>
@@ -22,7 +22,7 @@
                             </imageView>
                             <button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="VoO-EQ-M9h">
                                 <rect key="frame" x="130" y="420" width="200" height="150"/>
-                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <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">
@@ -34,7 +34,7 @@
                             </button>
                             <button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="tLn-KD-7Jb">
                                 <rect key="frame" x="438" y="420" width="200" height="150"/>
-                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <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">
@@ -46,7 +46,7 @@
                             </button>
                             <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"/>
-                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                 <nil key="textColor"/>
                                 <nil key="highlightedColor"/>
@@ -64,7 +64,7 @@
                             </view>
                             <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"/>
-                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                 <nil key="textColor"/>
                                 <nil key="highlightedColor"/>
@@ -92,7 +92,7 @@
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
             </objects>
-            <point key="canvasLocation" x="432" y="-62"/>
+            <point key="canvasLocation" x="-93" y="-62"/>
         </scene>
         <!--Navigation Controller-->
         <scene sceneID="SA2-sQ-7bL">
@@ -108,7 +108,7 @@
                 </navigationController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="Uec-R7-eKD" userLabel="First Responder" sceneMemberID="firstResponder"/>
             </objects>
-            <point key="canvasLocation" x="-576" y="-61.440000000000005"/>
+            <point key="canvasLocation" x="-1492" y="-62"/>
         </scene>
         <!--Page View Controller-->
         <scene sceneID="9YD-lb-QfP">
@@ -120,20 +120,20 @@
                         <subviews>
                             <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" maximumZoomScale="3" id="UZY-AP-7MO" customClass="PDFScrollView">
                                 <rect key="frame" x="0.0" y="64" width="768" height="960"/>
-                                <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
+                                <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"/>
-                                        <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
+                                        <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"/>
-                                                <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
-                                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
+                                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                                                <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
                                             </view>
-                                            <view contentMode="scaleToFill" id="wPo-qh-F4Q">
-                                                <rect key="frame" x="0.0" y="0.0" width="768" height="960"/>
-                                                <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
+                                            <view contentMode="scaleToFill" misplaced="YES" id="wPo-qh-F4Q">
+                                                <rect key="frame" x="0.0" y="0.0" width="768" height="961"/>
+                                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                             </view>
                                         </subviews>
                                         <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
@@ -145,7 +145,7 @@
                                 </connections>
                             </scrollView>
                         </subviews>
-                        <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                        <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
                     </view>
                     <toolbarItems/>
                     <connections>
@@ -164,7 +164,7 @@
                 <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"/>
-                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <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>
                     <navigationItem key="navigationItem" title="Title" id="ToF-qy-nGL">
@@ -183,7 +183,7 @@
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="8TC-Iz-v3r" userLabel="First Responder" sceneMemberID="firstResponder"/>
             </objects>
-            <point key="canvasLocation" x="1456.6400000000001" y="-61.440000000000005"/>
+            <point key="canvasLocation" x="1217" y="-62"/>
         </scene>
         <!--Sign_in-->
         <scene sceneID="UjY-oO-Rfn">
@@ -325,7 +325,7 @@
                 <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"/>
-                        <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                        <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"/>
@@ -352,7 +352,7 @@
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="7Hi-9W-715" userLabel="First Responder" sceneMemberID="firstResponder"/>
             </objects>
-            <point key="canvasLocation" x="1456" y="-1350"/>
+            <point key="canvasLocation" x="1503" y="-1775"/>
         </scene>
         <!--Document List View Controller-->
         <scene sceneID="eWl-LJ-ZOc">
@@ -364,7 +364,7 @@
                         <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"/>
-                                <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
+                                <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
                                 <items>
                                     <barButtonItem style="plain" systemItem="flexibleSpace" id="9H2-6O-Ty3"/>
                                     <barButtonItem title="Filter" id="wfX-co-eMN">
@@ -376,7 +376,7 @@
                             </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"/>
-                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES" flexibleMaxY="YES"/>
                                 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                                 <prototypes>
                                     <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" misplaced="YES" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="DocListTableViewCell" rowHeight="128" id="KmC-hR-Rfo" customClass="DocListTableViewCell">
@@ -388,7 +388,7 @@
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="GE2016121201" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="eH3-OQ-M6Q">
                                                     <rect key="frame" x="8" y="8" width="122" height="21"/>
-                                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                                    <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                                     <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                                     <nil key="textColor"/>
                                                     <nil key="highlightedColor"/>
@@ -408,8 +408,8 @@
                                                     <nil key="highlightedColor"/>
                                                 </label>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="t8P-5p-BAG">
-                                                    <rect key="frame" x="9" y="44" width="745" height="63"/>
-                                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                                    <rect key="frame" x="9" y="44" width="745" height="62"/>
+                                                    <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
                                                     <string key="text">    //    ref addTarget:self action:@selector(manually_refresh) forControlEvents:UIControlEventValueChanged
     btn.backgroundColor = UIColorFromRGB(BT_BG);
     [btn addTarget:self action:@selector(ControlButtonClicked:) forControlEvents:UIControlEventTouchUpInside];    //    ref addTarget:self action:@selector(manually_refresh) forControlEvents:UIControlEventValueChanged
@@ -421,14 +421,14 @@
                                                 </label>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="AGENT NAME" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="tHu-Ic-2Wf">
                                                     <rect key="frame" x="455" y="8" width="189" height="21"/>
-                                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
                                                     <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                                     <nil key="textColor"/>
                                                     <nil key="highlightedColor"/>
                                                 </label>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="2012-12-30" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="eq9-ea-SjV">
                                                     <rect key="frame" x="657" y="8" width="97" height="21"/>
-                                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
                                                     <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                                     <nil key="textColor"/>
                                                     <nil key="highlightedColor"/>
@@ -472,7 +472,7 @@
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="4FP-y6-zL0" userLabel="First Responder" sceneMemberID="firstResponder"/>
             </objects>
-            <point key="canvasLocation" x="2414" y="-1350"/>
+            <point key="canvasLocation" x="2916" y="-1775"/>
         </scene>
         <!--Documents Filter-->
         <scene sceneID="Ruw-38-v9q">
@@ -707,7 +707,7 @@
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="htY-Z9-c0H" userLabel="First Responder" sceneMemberID="firstResponder"/>
             </objects>
-            <point key="canvasLocation" x="3398" y="-1425"/>
+            <point key="canvasLocation" x="3935" y="-1400"/>
         </scene>
     </scenes>
     <resources>

+ 1 - 1
Ants Contract/Granite Expo eSign/Granite Expo eSign/Info.plist

@@ -15,7 +15,7 @@
 	<key>CFBundlePackageType</key>
 	<string>APPL</string>
 	<key>CFBundleShortVersionString</key>
-	<string>1.2</string>
+	<string>1.21</string>
 	<key>CFBundleVersion</key>
 	<string>30908</string>
 	<key>LSRequiresIPhoneOS</key>

+ 16 - 3
Ants Contract/common/PDFPageView.m

@@ -44,11 +44,24 @@
 //                CGContextTranslateCTM(myContext, 0, mediabox.size.height);
 //                CGContextScaleCTM(myContext, 1, -1);
 
-        CGAffineTransform pdfTransform = CGPDFPageGetDrawingTransform(page, kCGPDFMediaBox, self.frame, 0, true);
-        CGContextConcatCTM(myContext, pdfTransform);
+     //   CGAffineTransform pdfTransform = CGPDFPageGetDrawingTransform(page, kCGPDFMediaBox, self.frame, 0, true);
+
+        
+        CGRect mediabox= CGPDFPageGetBoxRect(page, kCGPDFMediaBox);
+        double scalex = self.frame.size.width/mediabox.size.width;
+        double scaley = self.frame.size.height/mediabox.size.height;
+        
+        double scale = scalex<scaley?scalex:scaley;
+        
+        CGAffineTransform translate_transform = CGAffineTransformMakeTranslation ( (self.frame.size.width-mediabox.size.width*scale)/2, 0 );
         
+        CGAffineTransform scale_transform=CGAffineTransformScale ( translate_transform, scale, scale );
+        
+        CGContextConcatCTM(myContext, scale_transform);
+        
+
         CGContextScaleCTM(myContext, 1, -1);
-        CGContextTranslateCTM(myContext, 0, -self.frame.size.height/pdfTransform.a);
+        CGContextTranslateCTM(myContext, 0, -self.frame.size.height/scale_transform.a);
         
 
     CGContextDrawPDFPage (myContext, page);

+ 63 - 10
Ants Contract/common/PageViewController.m

@@ -99,8 +99,48 @@
 //}
 
 
+
+//+(CGRect)WindowRect2PDFRect:(CGRect)rect pdf_rect:(CGRect)pdf_rect window_size:(CGSize)window_size
+//{
+//    CGRect pdf_expand;
+//    float offset_x = 0;
+//    float offset_y = 0;
+//    float scale =1;
+//    if(pdf_rect.size.height>=pdf_rect.size.width)
+//    {
+//        pdf_expand = CGRectMake(0, 0, pdf_rect.size.height*window_size.width/window_size.height, pdf_rect.size.height);
+//        offset_x = (pdf_expand.size.width-pdf_rect.size.width)/2;
+//        scale = pdf_rect.size.height/window_size.height;
+//        
+//    }
+//    else
+//    {
+//        pdf_expand = CGRectMake(0, 0, pdf_rect.size.width, pdf_rect.size.width*window_size.height/window_size.width);
+//        offset_y = (pdf_expand.size.height-pdf_rect.size.height)/2;
+//        scale = pdf_rect.size.width/window_size.width;
+//    }
+//    float x=rect.origin.x*scale-offset_x;
+//    float y=rect.origin.y*scale-offset_y;
+//    float width = rect.size.width*scale;
+//    float height = rect.size.height*scale;
+//    
+//    return CGRectMake(x, y, width, height);
+//    
+//}
+
+-(CGRect) scaleControl:(CGRect) frame from:(CGSize)fwindowsize to:(CGSize)twindowsize
+{
+         CGRect pdfsize=CGPDFPageGetBoxRect(self.pageRef, kCGPDFMediaBox);
+    frame=[PDFUtils WindowRect2PDFRect:frame pdf_rect:pdfsize window_size:fwindowsize];
+    
+    frame= [PDFUtils PDFRect2WindowRect:frame pdf_rect:pdfsize window_size:twindowsize];
+    
+    return frame;
+    
+}
 -(void) initControl
 {
+//    return;
     int count = [self.controlTemplate[@"count"] intValue];
     for(int i=0;i<count;i++)
     {
@@ -232,7 +272,10 @@
 }
 -(void) addTextView:(NSMutableDictionary*) template destView:(UIView*)destView index:(int) index
 {
-    UITextView* tv = [[UITextView alloc] initWithFrame:CGRectMake([template[@"pos_x"] floatValue], [template[@"pos_y"] floatValue], [template[@"width"] floatValue], [template[@"height"] floatValue])];
+    
+    CGRect srect=[self scaleControl:CGRectMake([template[@"pos_x"] floatValue], [template[@"pos_y"] floatValue], [template[@"width"] floatValue], [template[@"height"] floatValue]) from:CGSizeMake(768, 960.5) to:destView.frame.size];
+    
+    UITextView* tv = [[UITextView alloc] initWithFrame:srect];
     float fontsize = [template[@"size"] floatValue];
     if(fontsize==0)
         fontsize=10;
@@ -308,7 +351,8 @@
 }
 -(void) addLabel:(NSMutableDictionary*) template destView:(UIView*)destView index:(int) index
 {
-    UILabel* label = [[UILabel alloc] initWithFrame:CGRectMake([template[@"pos_x"] floatValue], [template[@"pos_y"] floatValue], [template[@"width"] floatValue], [template[@"height"] floatValue])];
+        CGRect srect=[self scaleControl:CGRectMake([template[@"pos_x"] floatValue], [template[@"pos_y"] floatValue], [template[@"width"] floatValue], [template[@"height"] floatValue]) from:CGSizeMake(768, 960.5) to:destView.frame.size];
+    UILabel* label = [[UILabel alloc] initWithFrame:srect];
     float fontsize = [template[@"size"] floatValue];
     if(fontsize==0)
         fontsize=10;
@@ -341,7 +385,8 @@
 
 -(void) addButton:(NSMutableDictionary*) template destView:(UIView*)destView index:(int) index
 {
-    UIButton* btn = [[UIButton alloc] initWithFrame:CGRectMake([template[@"pos_x"] floatValue], [template[@"pos_y"] floatValue], [template[@"width"] floatValue], [template[@"height"] floatValue])];
+            CGRect srect=[self scaleControl:CGRectMake([template[@"pos_x"] floatValue], [template[@"pos_y"] floatValue], [template[@"width"] floatValue], [template[@"height"] floatValue]) from:CGSizeMake(768, 960.5) to:destView.frame.size];
+    UIButton* btn = [[UIButton alloc] initWithFrame:srect];
     [btn setTitle:template[@"title"] forState:UIControlStateNormal];
     
         btn.tag = index+ CONTROL_BASE;
@@ -358,7 +403,8 @@
 }
 -(void) addDatePicker:(NSMutableDictionary*) template destView:(UIView*)destView index:(int) index
 {
-    UIButton* btn = [[UIButton alloc] initWithFrame:CGRectMake([template[@"pos_x"] floatValue], [template[@"pos_y"] floatValue], [template[@"width"] floatValue], [template[@"height"] floatValue])];
+            CGRect srect=[self scaleControl:CGRectMake([template[@"pos_x"] floatValue], [template[@"pos_y"] floatValue], [template[@"width"] floatValue], [template[@"height"] floatValue]) from:CGSizeMake(768, 960.5) to:destView.frame.size];
+    UIButton* btn = [[UIButton alloc] initWithFrame:srect];
     
 
     [btn setTitle:template[@"value"] forState:UIControlStateNormal];
@@ -379,15 +425,20 @@
     }
     [destView addSubview:btn];
 }
--(UIView*) createMarker:(int)size x:(int)x y:(int)y
+-(UIView*) createMarker:(int)size x:(int)x y:(int)y destView:(UIView*)destView
 {
-    UIView* v=[[UIView alloc] initWithFrame:CGRectMake(x, y, size, size)];
+    
+    
+            CGRect srect=[self scaleControl:CGRectMake(x,y,size,size) from:CGSizeMake(768, 960.5) to:destView.frame.size];
+    UIView* v=[[UIView alloc] initWithFrame:srect];
     return v;
     
 }
 -(void) addCheck:(NSMutableDictionary*) template destView:(UIView*)destView index:(int) index
 {
-    UIButton* btn = [[UIButton alloc] initWithFrame:CGRectMake([template[@"pos_x"] floatValue], [template[@"pos_y"] floatValue], [template[@"width"] floatValue], [template[@"height"] floatValue])];
+    
+            CGRect srect=[self scaleControl:CGRectMake([template[@"pos_x"] floatValue], [template[@"pos_y"] floatValue], [template[@"width"] floatValue], [template[@"height"] floatValue]) from:CGSizeMake(768, 960.5) to:destView.frame.size];
+    UIButton* btn = [[UIButton alloc] initWithFrame:srect];
     
     //    ref addTarget:self action:@selector(manually_refresh) forControlEvents:UIControlEventValueChanged
         btn.tag = index+ CONTROL_BASE;
@@ -435,7 +486,7 @@
         {
             [btn setTitle:@"" forState:UIControlStateNormal];
         }
-        UIView* marker=[self createMarker:[template[@"marker_size"] intValue] x:[item[1][0] intValue] y:[item[1][1] intValue]];
+        UIView* marker=[self createMarker:[template[@"marker_size"] intValue] x:[item[1][0] intValue] y:[item[1][1] intValue] destView:destView];
         
         marker.backgroundColor = marker_bg;
         marker.tag = CHECK_BASE+index*1000+i;
@@ -459,7 +510,8 @@
 }
 -(void) addSignatureButton:(NSMutableDictionary*) template destView:(UIView*)destView index:(int) index
 {
-    TouchImageView* btn = [[TouchImageView alloc] initWithFrame:CGRectMake([template[@"pos_x"] floatValue], [template[@"pos_y"] floatValue], [template[@"width"] floatValue], [template[@"height"] floatValue])];
+            CGRect srect=[self scaleControl:CGRectMake([template[@"pos_x"] floatValue], [template[@"pos_y"] floatValue], [template[@"width"] floatValue], [template[@"height"] floatValue]) from:CGSizeMake(768, 960.5) to:destView.frame.size];
+    TouchImageView* btn = [[TouchImageView alloc] initWithFrame:srect];
     
     btn.contentMode = UIViewContentModeScaleAspectFit;
     btn.delegate = self;
@@ -492,7 +544,8 @@
 }
 -(void) addImage:(NSMutableDictionary*) template destView:(UIView*)destView index:(int) index
 {
-    UIImageView* btn = [[UIImageView alloc] initWithFrame:CGRectMake([template[@"pos_x"] floatValue], [template[@"pos_y"] floatValue], [template[@"width"] floatValue], [template[@"height"] floatValue])];
+            CGRect srect=[self scaleControl:CGRectMake([template[@"pos_x"] floatValue], [template[@"pos_y"] floatValue], [template[@"width"] floatValue], [template[@"height"] floatValue]) from:CGSizeMake(768, 960.5) to:destView.frame.size];
+    UIImageView* btn = [[UIImageView alloc] initWithFrame:srect];
     
     btn.contentMode = UIViewContentModeScaleAspectFit;