Prechádzať zdrojové kódy

20170310

GRANITE EXPO 1.30
Ray Zhang 9 rokov pred
rodič
commit
863b450a48

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


+ 196 - 84
Ants Contract/AntsContract.xcworkspace/xcuserdata/Ray.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -602,11 +602,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/DocumentListViewController.m"
-            timestampString = "509962964.368565"
+            timestampString = "511065890.736989"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "951"
-            endingLineNumber = "951"
+            startingLineNumber = "953"
+            endingLineNumber = "953"
             landmarkName = "-tableView:editActionsForRowAtIndexPath:"
             landmarkType = "7">
             <Locations>
@@ -650,11 +650,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/DocumentListViewController.m"
-            timestampString = "509962964.368565"
+            timestampString = "511070075.3357"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "994"
-            endingLineNumber = "994"
+            startingLineNumber = "1009"
+            endingLineNumber = "1009"
             landmarkName = "-tableView:editActionsForRowAtIndexPath:"
             landmarkType = "7">
          </BreakpointContent>
@@ -666,11 +666,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/ExtDocumentsViewController.m"
-            timestampString = "510129325.869567"
+            timestampString = "511069805.53406"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "319"
-            endingLineNumber = "319"
+            startingLineNumber = "335"
+            endingLineNumber = "335"
             landmarkName = "-tableView:cellForRowAtIndexPath:"
             landmarkType = "7">
          </BreakpointContent>
@@ -682,11 +682,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/ExtDocumentsViewController.m"
-            timestampString = "510129325.869567"
+            timestampString = "511069805.53406"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "294"
-            endingLineNumber = "294"
+            startingLineNumber = "310"
+            endingLineNumber = "310"
             landmarkName = "-numberOfSectionsInTableView:"
             landmarkType = "7">
          </BreakpointContent>
@@ -698,11 +698,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/ExtDocumentsViewController.m"
-            timestampString = "510129325.869567"
+            timestampString = "511069805.53406"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "305"
-            endingLineNumber = "305"
+            startingLineNumber = "321"
+            endingLineNumber = "321"
             landmarkName = "-tableView:numberOfRowsInSection:"
             landmarkType = "7">
          </BreakpointContent>
@@ -714,11 +714,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/ExtDocumentsViewController.m"
-            timestampString = "510129325.869567"
+            timestampString = "511069805.53406"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "326"
-            endingLineNumber = "326"
+            startingLineNumber = "342"
+            endingLineNumber = "342"
             landmarkName = "-tableView:cellForRowAtIndexPath:"
             landmarkType = "7">
          </BreakpointContent>
@@ -730,11 +730,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/ExtDocumentsViewController.m"
-            timestampString = "510129325.869567"
+            timestampString = "511069805.53406"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "331"
-            endingLineNumber = "331"
+            startingLineNumber = "347"
+            endingLineNumber = "347"
             landmarkName = "-tableView:cellForRowAtIndexPath:"
             landmarkType = "7">
          </BreakpointContent>
@@ -746,11 +746,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/ExtDocumentsViewController.m"
-            timestampString = "510129325.869567"
+            timestampString = "511069805.53406"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "329"
-            endingLineNumber = "329"
+            startingLineNumber = "345"
+            endingLineNumber = "345"
             landmarkName = "-tableView:cellForRowAtIndexPath:"
             landmarkType = "7">
          </BreakpointContent>
@@ -762,11 +762,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/ExtDocumentsViewController.m"
-            timestampString = "510129325.869567"
+            timestampString = "511069805.53406"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "320"
-            endingLineNumber = "320"
+            startingLineNumber = "336"
+            endingLineNumber = "336"
             landmarkName = "-tableView:cellForRowAtIndexPath:"
             landmarkType = "7">
          </BreakpointContent>
@@ -937,11 +937,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/AddExtDocumentViewController.m"
-            timestampString = "510567394.174816"
+            timestampString = "511065890.736989"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "153"
-            endingLineNumber = "153"
+            startingLineNumber = "168"
+            endingLineNumber = "168"
             landmarkName = "-onAddImageClicked:"
             landmarkType = "7">
          </BreakpointContent>
@@ -1160,11 +1160,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/AddExtDocumentViewController.m"
-            timestampString = "510567394.174816"
+            timestampString = "511065890.736989"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "140"
-            endingLineNumber = "140"
+            startingLineNumber = "155"
+            endingLineNumber = "155"
             landmarkName = "-onAddImageClicked:"
             landmarkType = "7">
          </BreakpointContent>
@@ -1208,11 +1208,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/AddExtDocumentViewController.m"
-            timestampString = "510567394.174816"
+            timestampString = "511069509.19339"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "457"
-            endingLineNumber = "457"
+            startingLineNumber = "489"
+            endingLineNumber = "489"
             landmarkName = "-imagePickerController:didFinishPickingMediaWithInfo:"
             landmarkType = "7">
             <Locations>
@@ -1256,11 +1256,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/AddExtDocumentViewController.m"
-            timestampString = "510567394.174816"
+            timestampString = "511069509.19339"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "468"
-            endingLineNumber = "468"
+            startingLineNumber = "500"
+            endingLineNumber = "500"
             landmarkName = "-imagePickerController:didFinishPickingMediaWithInfo:"
             landmarkType = "7">
          </BreakpointContent>
@@ -1272,11 +1272,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/AddExtDocumentViewController.m"
-            timestampString = "510567394.174816"
+            timestampString = "511069509.19339"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "315"
-            endingLineNumber = "315"
+            startingLineNumber = "347"
+            endingLineNumber = "347"
             landmarkName = "-tableView:cellForRowAtIndexPath:"
             landmarkType = "7">
          </BreakpointContent>
@@ -1288,11 +1288,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/AddExtDocumentViewController.m"
-            timestampString = "510567394.174816"
+            timestampString = "511069509.19339"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "303"
-            endingLineNumber = "303"
+            startingLineNumber = "335"
+            endingLineNumber = "335"
             landmarkName = "-tableView:numberOfRowsInSection:"
             landmarkType = "7">
          </BreakpointContent>
@@ -1304,11 +1304,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/AddExtDocumentViewController.m"
-            timestampString = "510567394.174816"
+            timestampString = "511069509.19339"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "386"
-            endingLineNumber = "386"
+            startingLineNumber = "418"
+            endingLineNumber = "418"
             landmarkName = "-tableView:didSelectRowAtIndexPath:"
             landmarkType = "7">
          </BreakpointContent>
@@ -1320,11 +1320,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/AddExtDocumentViewController.m"
-            timestampString = "510567394.174816"
+            timestampString = "511069509.19339"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "442"
-            endingLineNumber = "442"
+            startingLineNumber = "474"
+            endingLineNumber = "474"
             landmarkName = "-imagePickerController:didFinishPickingMediaWithInfo:"
             landmarkType = "7">
          </BreakpointContent>
@@ -1332,15 +1332,15 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            shouldBeEnabled = "Yes"
+            shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/AddExtDocumentViewController.m"
-            timestampString = "510567394.174816"
+            timestampString = "511069509.19339"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "466"
-            endingLineNumber = "466"
+            startingLineNumber = "498"
+            endingLineNumber = "498"
             landmarkName = "-imagePickerController:didFinishPickingMediaWithInfo:"
             landmarkType = "7">
          </BreakpointContent>
@@ -1352,11 +1352,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/AddExtDocumentViewController.m"
-            timestampString = "510567394.174816"
+            timestampString = "511065890.736989"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "97"
-            endingLineNumber = "97"
+            startingLineNumber = "112"
+            endingLineNumber = "112"
             landmarkName = "-onAddImageClicked:"
             landmarkType = "7">
          </BreakpointContent>
@@ -1364,15 +1364,15 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            shouldBeEnabled = "Yes"
+            shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/AddExtDocumentViewController.m"
-            timestampString = "510567394.174816"
+            timestampString = "511069509.19339"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "440"
-            endingLineNumber = "440"
+            startingLineNumber = "472"
+            endingLineNumber = "472"
             landmarkName = "-imagePickerController:didFinishPickingMediaWithInfo:"
             landmarkType = "7">
          </BreakpointContent>
@@ -1384,11 +1384,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/AddExtDocumentViewController.m"
-            timestampString = "510567394.174816"
+            timestampString = "511065890.736989"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "81"
-            endingLineNumber = "81"
+            startingLineNumber = "96"
+            endingLineNumber = "96"
             landmarkName = "-onAddImageClicked:"
             landmarkType = "7">
          </BreakpointContent>
@@ -1400,11 +1400,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/AppDelegate.m"
-            timestampString = "510567819.811612"
+            timestampString = "511065890.736989"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "92"
-            endingLineNumber = "92"
+            startingLineNumber = "135"
+            endingLineNumber = "135"
             landmarkName = "-application:openURL:options:"
             landmarkType = "7">
          </BreakpointContent>
@@ -1416,11 +1416,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/AddExtDocumentViewController.m"
-            timestampString = "510567394.174816"
+            timestampString = "510736763.9606"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "46"
-            endingLineNumber = "46"
+            startingLineNumber = "48"
+            endingLineNumber = "48"
             landmarkName = "-viewDidLoad"
             landmarkType = "7">
          </BreakpointContent>
@@ -1432,11 +1432,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/AppDelegate.m"
-            timestampString = "510567819.811612"
+            timestampString = "511065890.736989"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "54"
-            endingLineNumber = "54"
+            startingLineNumber = "109"
+            endingLineNumber = "109"
             landmarkName = "-application:openURL:options:"
             landmarkType = "7">
          </BreakpointContent>
@@ -1448,15 +1448,127 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/AddExtDocumentViewController.m"
-            timestampString = "510567394.174816"
+            timestampString = "511069509.19339"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "324"
-            endingLineNumber = "324"
+            startingLineNumber = "356"
+            endingLineNumber = "356"
             landmarkName = "-tableView:cellForRowAtIndexPath:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../RedAnt ERP Mobile/common/Functions/PDF+Web/PDFViewController.m"
+            timestampString = "510569394.185751"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "206"
+            endingLineNumber = "206"
+            landmarkName = "-loadcontent"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/AppDelegate.m"
+            timestampString = "510741344.532136"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "61"
+            endingLineNumber = "61"
+            landmarkName = "-application:openURL:options:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../common/ScannerViewController.m"
+            timestampString = "510736763.9606"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "403"
+            endingLineNumber = "403"
+            landmarkName = "-captureOutput:didOutputMetadataObjects:fromConnection:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/RootViewController.m"
+            timestampString = "510737578.065408"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "28"
+            endingLineNumber = "28"
+            landmarkName = "-viewDidLoad"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/RootViewController.m"
+            timestampString = "510738511.645257"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "46"
+            endingLineNumber = "46"
+            landmarkName = "-viewDidLoad"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/RootViewController.m"
+            timestampString = "510741344.532136"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "293"
+            endingLineNumber = "293"
+            landmarkName = "-OnSigninClick:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/RootViewController.m"
+            timestampString = "510740876.374775"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "51"
+            endingLineNumber = "51"
+            landmarkName = "-viewDidAppear:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
@@ -1464,7 +1576,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/AppDelegate.m"
-            timestampString = "510568432.765675"
+            timestampString = "510819931.848373"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "56"
@@ -1476,16 +1588,16 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            shouldBeEnabled = "No"
+            shouldBeEnabled = "Yes"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "../RedAnt ERP Mobile/common/Functions/PDF+Web/PDFViewController.m"
-            timestampString = "510569394.185751"
+            filePath = "common/DocumentListViewController.m"
+            timestampString = "511069732.84451"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "206"
-            endingLineNumber = "206"
-            landmarkName = "-loadcontent"
+            startingLineNumber = "235"
+            endingLineNumber = "235"
+            landmarkName = "-refresh_btn_click:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>

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

@@ -701,7 +701,7 @@
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Title" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="93T-5h-JKV">
-                                                    <rect key="frame" x="15" y="5" width="34" height="21"/>
+                                                    <rect key="frame" x="15" y="5" width="33" height="21"/>
                                                     <autoresizingMask key="autoresizingMask"/>
                                                     <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                                     <nil key="textColor"/>

+ 25 - 3
Ants Contract/Granite Expo eSign/Granite Expo eSign.xcodeproj/project.pbxproj

@@ -60,6 +60,10 @@
 		7128C3541E12548C00FF635B /* PDFScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7128C34D1E12548C00FF635B /* PDFScrollView.m */; };
 		7128C3551E12548C00FF635B /* SignatureListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7128C34F1E12548C00FF635B /* SignatureListViewController.m */; };
 		7128C3561E12548C00FF635B /* SignatureTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 7128C3511E12548C00FF635B /* SignatureTableViewCell.m */; };
+		714B37041E70F2BF00E99B90 /* ScannerControllerView.m in Sources */ = {isa = PBXBuildFile; fileRef = 714B36FF1E70F2BF00E99B90 /* ScannerControllerView.m */; };
+		714B37051E70F2BF00E99B90 /* ScannerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 714B37011E70F2BF00E99B90 /* ScannerViewController.m */; };
+		714B37061E70F2BF00E99B90 /* SCShapeView.m in Sources */ = {isa = PBXBuildFile; fileRef = 714B37031E70F2BF00E99B90 /* SCShapeView.m */; };
+		714B37081E70FCFE00E99B90 /* cam_scan.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 714B37071E70FCFE00E99B90 /* cam_scan.storyboard */; };
 		714B870B1E24CAE300A40D18 /* debug.json in Resources */ = {isa = PBXBuildFile; fileRef = 714B870A1E24CAE200A40D18 /* debug.json */; };
 		717243441E1CCCEC00800678 /* CustomIOSAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = 717243431E1CCCEC00800678 /* CustomIOSAlertView.m */; };
 		7172434A1E1E208F00800678 /* GEIC - Home Improvement Contract 2017.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 717243491E1E208F00800678 /* GEIC - Home Improvement Contract 2017.pdf */; };
@@ -173,6 +177,13 @@
 		7128C34F1E12548C00FF635B /* SignatureListViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SignatureListViewController.m; path = ../../common/SignatureListViewController.m; sourceTree = "<group>"; };
 		7128C3501E12548C00FF635B /* SignatureTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SignatureTableViewCell.h; path = ../../common/SignatureTableViewCell.h; sourceTree = "<group>"; };
 		7128C3511E12548C00FF635B /* SignatureTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SignatureTableViewCell.m; path = ../../common/SignatureTableViewCell.m; sourceTree = "<group>"; };
+		714B36FE1E70F2BF00E99B90 /* ScannerControllerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScannerControllerView.h; path = ../../../common/ScannerControllerView.h; sourceTree = "<group>"; };
+		714B36FF1E70F2BF00E99B90 /* ScannerControllerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ScannerControllerView.m; path = ../../../common/ScannerControllerView.m; sourceTree = "<group>"; };
+		714B37001E70F2BF00E99B90 /* ScannerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScannerViewController.h; path = ../../../common/ScannerViewController.h; sourceTree = "<group>"; };
+		714B37011E70F2BF00E99B90 /* ScannerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ScannerViewController.m; path = ../../../common/ScannerViewController.m; sourceTree = "<group>"; };
+		714B37021E70F2BF00E99B90 /* SCShapeView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SCShapeView.h; path = ../../../common/SCShapeView.h; sourceTree = "<group>"; };
+		714B37031E70F2BF00E99B90 /* SCShapeView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SCShapeView.m; path = ../../../common/SCShapeView.m; sourceTree = "<group>"; };
+		714B37071E70FCFE00E99B90 /* cam_scan.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = cam_scan.storyboard; path = ../../../common/cam_scan.storyboard; sourceTree = "<group>"; };
 		714B870A1E24CAE200A40D18 /* debug.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = debug.json; sourceTree = "<group>"; };
 		717243421E1CCCEC00800678 /* CustomIOSAlertView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CustomIOSAlertView.h; path = "../../../RedAnt ERP Mobile/common/customUI/CustomIOSAlertView.h"; sourceTree = "<group>"; };
 		717243431E1CCCEC00800678 /* CustomIOSAlertView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CustomIOSAlertView.m; path = "../../../RedAnt ERP Mobile/common/customUI/CustomIOSAlertView.m"; sourceTree = "<group>"; };
@@ -233,7 +244,7 @@
 		7128C23D1E124F4500FF635B /* Granite Expo eSign */ = {
 			isa = PBXGroup;
 			children = (
-				71B152F11E67E86C00D2E5EC /* camera */,
+				71B152F11E67E86C00D2E5EC /* cam scan */,
 				7128C24A1E124F4500FF635B /* Assets.xcassets */,
 				7128C3241E1251D000FF635B /* config.h */,
 				7128C3251E1251D000FF635B /* const.h */,
@@ -428,11 +439,18 @@
 			name = Frameworks;
 			sourceTree = "<group>";
 		};
-		71B152F11E67E86C00D2E5EC /* camera */ = {
+		71B152F11E67E86C00D2E5EC /* cam scan */ = {
 			isa = PBXGroup;
 			children = (
+				714B36FE1E70F2BF00E99B90 /* ScannerControllerView.h */,
+				714B36FF1E70F2BF00E99B90 /* ScannerControllerView.m */,
+				714B37001E70F2BF00E99B90 /* ScannerViewController.h */,
+				714B37011E70F2BF00E99B90 /* ScannerViewController.m */,
+				714B37021E70F2BF00E99B90 /* SCShapeView.h */,
+				714B37031E70F2BF00E99B90 /* SCShapeView.m */,
+				714B37071E70FCFE00E99B90 /* cam_scan.storyboard */,
 			);
-			name = camera;
+			name = "cam scan";
 			sourceTree = "<group>";
 		};
 /* End PBXGroup section */
@@ -503,6 +521,7 @@
 				7128C27D1E12500B00FF635B /* signature.storyboard in Resources */,
 				7128C2E81E12511B00FF635B /* LICENSE in Resources */,
 				714B870B1E24CAE300A40D18 /* debug.json in Resources */,
+				714B37081E70FCFE00E99B90 /* cam_scan.storyboard in Resources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -556,13 +575,16 @@
 				7115D4591E162BA800EF4E4C /* DatePickerViewController.m in Sources */,
 				7128C2401E124F4500FF635B /* main.m in Sources */,
 				7128C3551E12548C00FF635B /* SignatureListViewController.m in Sources */,
+				714B37041E70F2BF00E99B90 /* ScannerControllerView.m in Sources */,
 				7128C2EA1E12511B00FF635B /* NSData+CommonCrypto.m in Sources */,
 				7128C2B01E1250CA00FF635B /* TextDrawable.m in Sources */,
 				71BBFC371E6419D4008668A7 /* ExtDocumentsViewController.m in Sources */,
 				7128C3531E12548C00FF635B /* PDFPageView.m in Sources */,
 				7128C33E1E12541800FF635B /* RootViewController.m in Sources */,
 				7128C2E91E12511B00FF635B /* NSData+Base64.m in Sources */,
+				714B37051E70F2BF00E99B90 /* ScannerViewController.m in Sources */,
 				7128C2D81E12510900FF635B /* ioapi.c in Sources */,
+				714B37061E70F2BF00E99B90 /* SCShapeView.m in Sources */,
 				7128C2C61E1250FC00FF635B /* ImageUtils.m in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;

+ 3 - 0
Ants Contract/common/AddExtDocumentViewController.h

@@ -16,4 +16,7 @@
 
 @property (strong, nonatomic) NSString * doc_number;
 @property (assign, nonatomic) bool is_present;
+-(void) refresh_table;
+@property (nonatomic , copy) void (^uploadSuccess)(NSMutableArray * arr_documents);
+//@property (assign, nonatomic) bool close
 @end

+ 41 - 9
Ants Contract/common/AddExtDocumentViewController.m

@@ -16,6 +16,8 @@
 #import "ACNetwork.h"
 
 #import "PDFViewController.h"
+#import "ScannerViewController.h"
+
 
 @interface AddExtDocumentViewController ()
 
@@ -65,7 +67,10 @@
 //    }
     // Do any additional setup after loading the view.
 }
-
+-(void) refresh_table
+{
+    [self.tableView reloadData];
+}
 - (void)didReceiveMemoryWarning {
     [super didReceiveMemoryWarning];
     // Dispose of any resources that can be recreated.
@@ -75,6 +80,16 @@
     [self dismissViewControllerAnimated:false completion:nil];
 }
 - (IBAction)onScanClicked:(id)sender {
+    
+        __weak typeof(self) weakself = self;
+    ScannerViewController * scannerVC =[ [UIStoryboard storyboardWithName:@"cam_scan" bundle:nil] instantiateViewControllerWithIdentifier:@"ScannerViewController"];;
+    
+    scannerVC.returnCode = ^(NSString* code){
+      
+        weakself.editDocNumber.text = code;
+        
+    };
+    [self presentViewController:scannerVC animated:false completion:nil];
 }
 - (IBAction)onAddImageClicked:(id)sender {
     
@@ -96,7 +111,7 @@
         
         imagePickerController.delegate = weakself;
         
-        imagePickerController.allowsEditing = YES;
+        imagePickerController.allowsEditing = NO;
         
         imagePickerController.sourceType = sourceType;
         
@@ -212,13 +227,21 @@
     
 }
 - (IBAction)onAddFileClicked:(id)sender {
+    [RAUtils alert_view:@"To upload a file, you must share it from thrid-part App." title:@"Upload"];
+    return;
 }
 - (IBAction)onUploadClicked:(id)sender {
     
+    if(self.arr_documents.count==0)
+    {
+        [RAUtils alert_view:@"Upload list is empty." title:@"Upload"];
+        return;
+    }
+    
     NSString* docNumber = self.editDocNumber.text;
     if(docNumber.length==0)
     {
-        [RAUtils alert_view:@"Document number can not be empty." title:@"Upload"];
+        [RAUtils alert_view:@"Document number is empty." title:@"Upload"];
         return;
     }
     
@@ -239,7 +262,7 @@
     zipfile =[ACNetwork packfiles2zip:arr_files];
     
     
-//    __weak typeof(self) weakSelf = self;
+    __weak typeof(self) weakSelf = self;
     
     UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait..." title:@"Upload Documents"];
     
@@ -261,8 +284,17 @@
             if([[json valueForKey:@"result"] intValue]==2)
             {
                 
-
-                [self.navigationController popViewControllerAnimated:false];
+//                if(self.is_present)
+                [weakSelf dismissViewControllerAnimated:false completion:^{
+                                    if(weakSelf.uploadSuccess)
+                                        weakSelf.uploadSuccess(weakSelf.arr_documents);
+                    
+                }];
+//                else
+//                    [self.navigationController popViewControllerAnimated:false];
+                
+//                if(self.uploadSuccess)
+//                    self.uploadSuccess(self.arr_documents);
                 
             }
             else
@@ -441,7 +473,7 @@ commitEditingStyle:(UITableViewCellEditingStyle)editingStyle  forRowAtIndexPath:
         
         UIImage * image = [info objectForKey:UIImagePickerControllerEditedImage];
         
-        image=[ImageUtils img_compress:image kbsize:512];
+        image=[ImageUtils img_compress:image kbsize:1024];
         
         
         NSString *path = NSTemporaryDirectory();
@@ -463,9 +495,9 @@ commitEditingStyle:(UITableViewCellEditingStyle)editingStyle  forRowAtIndexPath:
          *  UIImagePickerControllerEditedImage 取得的是被编辑过的图片,需要allowsEditing设置为YES
          *  UIImagePickerControllerOriginalImage 取得的是相册中原始图片
          */
-        UIImage * image = [info objectForKey:UIImagePickerControllerEditedImage];
+        UIImage * image = [info objectForKey:UIImagePickerControllerOriginalImage];
         
-        image=[ImageUtils img_compress:image kbsize:512];
+        image=[ImageUtils img_compress:image kbsize:1024];
         
         NSString *path = NSTemporaryDirectory();
         NSString *filePath = [path stringByAppendingPathComponent:[NSString stringWithFormat:@"%@.jpg",[[NSUUID UUID] UUIDString]]];

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

@@ -20,6 +20,7 @@
 -(void) Logout;
 -(void) Login:(NSString* )user pwd:(NSString*) pwd;
 @property (strong,nonatomic) NSString* printerURL;
+@property (strong,nonatomic) NSMutableDictionary* shareFile;
 
 @end
 

+ 69 - 26
Ants Contract/common/AppDelegate.m

@@ -12,6 +12,9 @@
 #import "PDFUtils.h"
 #import "RAUtils.h"
 #import "AddExtDocumentViewController.h"
+#import "LoginViewController.h"
+#import "RootViewController.h"
+
 
 //#import "AFHTTPSessionManager.h"
 @interface AppDelegate ()
@@ -42,51 +45,91 @@
 {
 
     NSLog(@"URL:%@, OPTIONS:%@",[url absoluteString],[RAUtils dict2string:options]);
+    
+    NSMutableDictionary* item = [[NSMutableDictionary alloc] init];
+    item[@"type"]=[self filetype:url.absoluteString];
+    item[@"url"]= [url path];
+    item[@"file_name"] = [url.absoluteString lastPathComponent];
+    
     if(self.bLogin)
     {
         UINavigationController *rootVC = (UINavigationController *)application.keyWindow.rootViewController;
         
         UIViewController* presentVC=rootVC.presentedViewController;
         
-        UIViewController* topvc= rootVC.topViewController;
         
-        NSMutableDictionary* item = [[NSMutableDictionary alloc] init];
+        AddExtDocumentViewController * addVC;
         
+        if([presentVC isKindOfClass:[UINavigationController class]])
+        {
+            //如果当前已有模态对话框,则关闭当前的模态框,否则无法弹出上传框。
+            
+            UIViewController* topvc= ((UINavigationController*)presentVC).topViewController;
+            if([topvc isKindOfClass:[AddExtDocumentViewController class]])
+            {
+                addVC = (AddExtDocumentViewController*)topvc;
+                
+                if(addVC.arr_documents==nil)
+                    addVC.arr_documents = [NSMutableArray arrayWithObjects:item, nil];
+                else
+                    [addVC.arr_documents addObject:item];
+                
+                [addVC refresh_table];
+                    
+            }
+            else
+                [presentVC dismissViewControllerAnimated:false completion:nil];
+            
+            
+        }
+        else
+        {
+            addVC = [ [UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"AddExtDocumentViewController"];
+            addVC.is_present = true;
+            addVC.doc_number = nil;
+            addVC.arr_documents = [NSMutableArray arrayWithObjects:item, nil];
+            UINavigationController* navi = [[UINavigationController alloc] initWithRootViewController:addVC] ;
+            
+            
+            
+            
+            
+            
+            navi.modalPresentationStyle = UIModalPresentationFormSheet;//有三种状态,自己看看是哪种
+            [rootVC presentViewController:navi animated:YES completion:^{
+                
+                //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
+                
+                DebugLog(@"filter present.........");
+                
+                //   self.btop = false;
+                //  <#code#>
+            }];
+        }
         
-        UIImage* img=[UIImage imageWithData:[NSData dataWithContentsOfURL:url]];
 
-        item[@"type"]=[self filetype:url.absoluteString];
-        item[@"url"]= [url path];
-        item[@"file_name"] = [url.absoluteString lastPathComponent];
-        
-        AddExtDocumentViewController * addVC = [ [UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"AddExtDocumentViewController"];
-        addVC.is_present = true;
-        addVC.doc_number = nil;
-        addVC.arr_documents = [NSMutableArray arrayWithObjects:item, nil];
+    }
+    else
+    {
+        self.shareFile = item;
         
-        //        notesVC.docNotes = notes;
         
-        UINavigationController* navi = [[UINavigationController alloc] initWithRootViewController:addVC] ;
         
+        UINavigationController *rootVC = (UINavigationController *)application.keyWindow.rootViewController;
         
+        RootViewController* topvc= (RootViewController*)rootVC.topViewController;
         
+        UIViewController* presentVC=rootVC.presentedViewController;
         
         
+//        AddExtDocumentViewController * addVC;
         
-        navi.modalPresentationStyle = UIModalTransitionStyleCrossDissolve;//有三种状态,自己看看是哪种
-        [rootVC presentViewController:navi animated:YES completion:^{
+        if(!presentVC)//([presentVC isKindOfClass:[UINavigationController class]])
+        {
+            //未弹出login 框
+            [topvc presentLogin:topvc.ibSignin];
             
-            //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
-            
-            DebugLog(@"filter present.........");
-            
-            //   self.btop = false;
-            //  <#code#>
-        }];
-    }
-    else
-    {
-        
+        }
     }
     
     

+ 21 - 6
Ants Contract/common/DocumentListViewController.m

@@ -107,7 +107,7 @@
     
     
     
-    navi.modalPresentationStyle = UIModalTransitionStyleCrossDissolve;//有三种状态,自己看看是哪种
+    navi.modalPresentationStyle = UIModalPresentationFormSheet;//有三种状态,自己看看是哪种
     [self presentViewController:navi animated:YES completion:^{
         
         //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
@@ -855,7 +855,9 @@
 #pragma mark tableview delegate
 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
 {
-    
+    //如果是最后的状态cell 则返回;
+    if(indexPath.row==self.table_data.count)
+        return;
     
     NSDictionary * item_json = self.table_data[indexPath.row];
     
@@ -939,8 +941,8 @@
 
 {
     
-    
-    
+    __weak typeof (self) weekself=self;
+    __weak NSIndexPath* weekindex = indexPath;
     NSDictionary * item_json = self.table_data[indexPath.row];
     
     NSString* notes = item_json[@"notes"];
@@ -959,6 +961,19 @@
         
         docVC.docNumber = doc_number;
         docVC.arr_documents =arr_doc;
+        
+        docVC.closeExtDoc=^(bool refresh){
+            
+            if(refresh)
+            {
+                
+                self.reset_result=true;
+                //    self.norefresh=true;
+                [self loadpage];
+            }
+//            [weekself.tableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:weekindex, nil] withRowAnimation:UITableViewRowAnimationAutomatic];
+            
+        };
 //        notesVC.docNotes = notes;
         
         UINavigationController* navi = [[UINavigationController alloc] initWithRootViewController:docVC] ;
@@ -968,7 +983,7 @@
         
         
         
-        navi.modalPresentationStyle = UIModalTransitionStyleCrossDissolve;//有三种状态,自己看看是哪种
+        navi.modalPresentationStyle = UIModalPresentationFormSheet;//有三种状态,自己看看是哪种
         [self presentViewController:navi animated:YES completion:^{
             
             //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
@@ -1003,7 +1018,7 @@
         
         
         
-        navi.modalPresentationStyle = UIModalTransitionStyleCrossDissolve;//有三种状态,自己看看是哪种
+        navi.modalPresentationStyle = UIModalPresentationFormSheet;//有三种状态,自己看看是哪种
         [self presentViewController:navi animated:YES completion:^{
             
             //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);

+ 2 - 0
Ants Contract/common/ExtDocumentsViewController.h

@@ -16,4 +16,6 @@
 
 
 @property (strong, nonatomic)  NSString *docNumber;
+
+@property (nonatomic , copy) void (^closeExtDoc)(bool refresh);
 @end

+ 18 - 2
Ants Contract/common/ExtDocumentsViewController.m

@@ -45,16 +45,32 @@
 }
 
 - (void)onCloseClick:(UIButton *)sender {
+      __weak typeof(self) weakself = self;  
     
-    
-    [self dismissViewControllerAnimated:false completion:nil];
+    [self dismissViewControllerAnimated:false completion:^{
+        if(weakself.closeExtDoc)
+            weakself.closeExtDoc(false);
+    }];
     
     //    [self.navigationController popViewControllerAnimated:FALSE];
 }
 - (IBAction)onAddClick:(id)sender {
     
+    
+    __weak typeof(self) weakself = self;
     AddExtDocumentViewController * addVC = [self.storyboard instantiateViewControllerWithIdentifier:@"AddExtDocumentViewController"];
     addVC.doc_number = self.docNumber;
+    addVC.uploadSuccess = ^(NSMutableArray* arr_upload){
+//        [weakself.arr_documents addObjectsFromArray:arr_upload];
+//        [weakself.tableView reloadData];
+//        [weakself dismissViewControllerAnimated:false completion:^{
+//
+//        }];
+        
+        if(weakself.closeExtDoc)
+            weakself.closeExtDoc(true);
+        
+    };
     [self.navigationController pushViewController:addVC animated:false];
     
 }

+ 1 - 1
Ants Contract/common/PageViewController.m

@@ -805,7 +805,7 @@
     checkVC.show_detail = show_detail;
     
     checkVC.title=@"abcdefg";
-    checkVC.modalPresentationStyle = UIModalTransitionStyleCrossDissolve;
+    checkVC.modalPresentationStyle = UIModalPresentationFormSheet;
     [self presentViewController:checkVC animated:YES completion:nil];
     
 }

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

@@ -18,6 +18,6 @@
 @property (strong, nonatomic) IBOutlet UIButton *btnNewCustomer;
 @property (strong, nonatomic) IBOutlet UIButton *btnCustomerPerDoc;
 @property (strong, nonatomic) IBOutlet UILabel *labelVer;
-
+-(void) presentLogin:(id)sender;
 @end
 

+ 102 - 43
Ants Contract/common/RootViewController.m

@@ -16,6 +16,8 @@
 #import "DocumentListViewController.h"
 #import "ACNetwork.h"
 #import "PDFUtils.h"
+#import "AddExtDocumentViewController.h"
+
 @interface RootViewController ()
 
 @end
@@ -41,8 +43,104 @@
     
     
     
-    [self OnSigninClick:self.ibSignin];
-    // Do any additional setup after loading the view, typically from a nib.
+     // Do any additional setup after loading the view, typically from a nib.
+}
+
+-(void) viewDidAppear:(BOOL)animated
+{
+        AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
+    if(!appDelegate.bLogin)
+        [self presentLogin:self.ibSignin];
+
+}
+-(void) presentLogin:(id)sender
+{
+    
+    UIBarButtonItem* bbitem = sender;
+    
+    AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
+    {
+        LoginViewController * loginvc =[ self.storyboard instantiateViewControllerWithIdentifier:@"LoginViewController"];
+        loginvc.returnValue = ^(bool blogin){
+            
+            //            [self checklogin :true];
+            
+            if(blogin)
+            {
+                
+                self.welcomeLabel.text=[NSString stringWithFormat:@"Welcome %@",appDelegate.user];
+                
+                [bbitem setTitle:@"Sign out"];
+                self.buttonHIC.enabled = true;
+                self.buttonSRL.enabled = true;
+                self.coverView.hidden = true;
+                
+                // 处理三方app 传入文件
+                AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
+                if(appDelegate.shareFile)
+                {
+                    
+                    
+                    
+                    AddExtDocumentViewController * addVC;
+                    
+                    
+                    
+                    addVC = [ [UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"AddExtDocumentViewController"];
+                    addVC.is_present = true;
+                    addVC.doc_number = nil;
+                    addVC.arr_documents = [NSMutableArray arrayWithObjects:appDelegate.shareFile, nil];
+                    appDelegate.shareFile=nil;
+                    
+                    //        notesVC.docNotes = notes;
+                    
+                    UINavigationController* navi = [[UINavigationController alloc] initWithRootViewController:addVC] ;
+                    
+                    
+                    
+                    
+                    
+                    
+                    navi.modalPresentationStyle = UIModalPresentationFormSheet;//有三种状态,自己看看是哪种
+                    [self presentViewController:navi animated:YES completion:^{
+                        
+                        //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
+                        
+                        DebugLog(@"filter present.........");
+                        
+                        //   self.btop = false;
+                        //  <#code#>
+                    }];
+                    
+                    
+                }
+                
+            }
+            else
+            {
+                appDelegate.shareFile=nil;
+                self.welcomeLabel.text=@"Not sign in";
+                self.buttonHIC.enabled = false;
+                self.buttonSRL.enabled = false;
+                self.coverView.hidden = false;
+            }
+            
+        };
+        
+        UINavigationController* navi = [[UINavigationController alloc] initWithRootViewController:loginvc] ;
+        
+        
+        
+        
+        
+        
+        navi.modalPresentationStyle = UIModalPresentationFormSheet;//有三种状态,自己看看是哪种
+        [self presentViewController:navi animated:YES completion:^{
+            
+            DebugLog(@"login present.........");
+            
+        }];
+    }
 }
 
 //-(void) leak_debug
@@ -257,47 +355,8 @@
         
     }
     else
-    {
-        LoginViewController * loginvc =[ self.storyboard instantiateViewControllerWithIdentifier:@"LoginViewController"];
-        loginvc.returnValue = ^(bool blogin){
-            
-            //            [self checklogin :true];
-            
-            if(blogin)
-            {
-                
-                self.welcomeLabel.text=[NSString stringWithFormat:@"Welcome %@",appDelegate.user];
-                
-                [bbitem setTitle:@"Sign out"];
-                self.buttonHIC.enabled = true;
-                self.buttonSRL.enabled = true;
-                self.coverView.hidden = true;
-                
-            }
-            else
-            {
-                self.welcomeLabel.text=@"Not sign in";
-                self.buttonHIC.enabled = false;
-                self.buttonSRL.enabled = false;
-                self.coverView.hidden = false;
-            }
-            
-        };
-        
-        UINavigationController* navi = [[UINavigationController alloc] initWithRootViewController:loginvc] ;
-        
-        
-        
-        
-        
-        
-        navi.modalPresentationStyle = UIModalTransitionStyleCrossDissolve;//有三种状态,自己看看是哪种
-        [self presentViewController:navi animated:YES completion:^{
-            
-            DebugLog(@"login present.........");
-            
-        }];
-    }
+        [self presentLogin:sender];
+    
     
     
 }