Преглед изворни кода

1.修复RedAnt Mobile Result界面大小不正确。

Pen Li пре 8 година
родитељ
комит
a5740aedf7

+ 4 - 0
RedAnt Mobile/RedAnt Mobile.xcodeproj/project.pbxproj

@@ -18,6 +18,7 @@
 		4221EFB41FA8599A0026E1EC /* UIScrollView+JLRefresh.m in Sources */ = {isa = PBXBuildFile; fileRef = 4221EFAF1FA853660026E1EC /* UIScrollView+JLRefresh.m */; };
 		4221EFB51FA8599A0026E1EC /* UIView+JLExtension.m in Sources */ = {isa = PBXBuildFile; fileRef = 4221EFB11FA853660026E1EC /* UIView+JLExtension.m */; };
 		4221EFB61FA859B80026E1EC /* JLRefreshFooter.m in Sources */ = {isa = PBXBuildFile; fileRef = 4221EFA81FA853660026E1EC /* JLRefreshFooter.m */; };
+		4221EFB81FA879470026E1EC /* Result.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4221EFB71FA879470026E1EC /* Result.storyboard */; };
 		42DFAE6B1F9B2B73009AFCCC /* Phone_Action_Cell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 42DFAE6A1F9B2B73009AFCCC /* Phone_Action_Cell.xib */; };
 		42DFAE6D1F9B2BE4009AFCCC /* Phone_Edit_Cell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 42DFAE6C1F9B2BE4009AFCCC /* Phone_Edit_Cell.xib */; };
 		42DFAE6F1F9B2C18009AFCCC /* Phone_Enum_Cell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 42DFAE6E1F9B2C18009AFCCC /* Phone_Enum_Cell.xib */; };
@@ -129,6 +130,7 @@
 		4221EFAF1FA853660026E1EC /* UIScrollView+JLRefresh.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIScrollView+JLRefresh.m"; sourceTree = "<group>"; };
 		4221EFB01FA853660026E1EC /* UIView+JLExtension.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIView+JLExtension.h"; sourceTree = "<group>"; };
 		4221EFB11FA853660026E1EC /* UIView+JLExtension.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIView+JLExtension.m"; sourceTree = "<group>"; };
+		4221EFB71FA879470026E1EC /* Result.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Result.storyboard; sourceTree = "<group>"; };
 		42DFAE6A1F9B2B73009AFCCC /* Phone_Action_Cell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = Phone_Action_Cell.xib; sourceTree = "<group>"; };
 		42DFAE6C1F9B2BE4009AFCCC /* Phone_Edit_Cell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = Phone_Edit_Cell.xib; sourceTree = "<group>"; };
 		42DFAE6E1F9B2C18009AFCCC /* Phone_Enum_Cell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = Phone_Enum_Cell.xib; sourceTree = "<group>"; };
@@ -548,6 +550,7 @@
 				71CB70B11FA1BA5E009FDCB7 /* layout.json */,
 				71F3A9BB1F5F8EAE001036C8 /* FullyShowViewController.h */,
 				71F3A9BC1F5F8EAE001036C8 /* FullyShowViewController.m */,
+				4221EFB71FA879470026E1EC /* Result.storyboard */,
 			);
 			name = result;
 			sourceTree = "<group>";
@@ -830,6 +833,7 @@
 				71F3AA361F612369001036C8 /* CommonEditor.storyboard in Resources */,
 				71FF602F1FA8449C00C5523A /* predef_query.json in Resources */,
 				71F3AA081F5FDDFE001036C8 /* LICENSE in Resources */,
+				4221EFB81FA879470026E1EC /* Result.storyboard in Resources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};

BIN
RedAnt Mobile/RedAnt Mobile.xcodeproj/project.xcworkspace/xcuserdata/macmini1.xcuserdatad/UserInterfaceState.xcuserstate


+ 37 - 27
RedAnt Mobile/RedAnt Mobile/Base.lproj/Main.storyboard

@@ -336,43 +336,53 @@
                             <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" bounces="NO" showsVerticalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wBM-b0-JRO">
                                 <rect key="frame" x="0.0" y="20" width="375" height="647"/>
                                 <subviews>
-                                    <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" dataMode="prototypes" style="plain" separatorStyle="default" allowsSelection="NO" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="IdY-hf-Rfp">
-                                        <rect key="frame" x="0.0" y="1" width="712" height="645"/>
+                                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="T1R-Fg-fPc">
+                                        <rect key="frame" x="0.0" y="0.0" width="375" height="647"/>
+                                        <subviews>
+                                            <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" dataMode="prototypes" style="plain" separatorStyle="default" allowsSelection="NO" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="IdY-hf-Rfp">
+                                                <rect key="frame" x="0.0" y="0.0" width="375" height="647"/>
+                                                <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                                <prototypes>
+                                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="tCell" id="Z8S-HU-HU3">
+                                                        <rect key="frame" x="0.0" y="28" width="375" height="44"/>
+                                                        <autoresizingMask key="autoresizingMask"/>
+                                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Z8S-HU-HU3" id="dk1-pX-E1r">
+                                                            <rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
+                                                            <autoresizingMask key="autoresizingMask"/>
+                                                        </tableViewCellContentView>
+                                                    </tableViewCell>
+                                                </prototypes>
+                                                <connections>
+                                                    <outlet property="dataSource" destination="Ekb-S8-yfK" id="Xqw-IK-F1M"/>
+                                                    <outlet property="delegate" destination="Ekb-S8-yfK" id="OeX-tg-FFz"/>
+                                                </connections>
+                                            </tableView>
+                                        </subviews>
                                         <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                                         <constraints>
-                                            <constraint firstAttribute="width" constant="712" id="8cn-Ix-LnS"/>
+                                            <constraint firstItem="IdY-hf-Rfp" firstAttribute="leading" secondItem="T1R-Fg-fPc" secondAttribute="leading" id="AE1-0B-nJw"/>
+                                            <constraint firstAttribute="trailing" secondItem="IdY-hf-Rfp" secondAttribute="trailing" id="Pgk-Vz-HOj"/>
+                                            <constraint firstAttribute="bottom" secondItem="IdY-hf-Rfp" secondAttribute="bottom" id="ReX-CE-BV9"/>
+                                            <constraint firstItem="IdY-hf-Rfp" firstAttribute="top" secondItem="T1R-Fg-fPc" secondAttribute="top" id="ma3-Fo-Xmb"/>
                                         </constraints>
-                                        <prototypes>
-                                            <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="tCell" id="Z8S-HU-HU3">
-                                                <rect key="frame" x="0.0" y="28" width="712" height="44"/>
-                                                <autoresizingMask key="autoresizingMask"/>
-                                                <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Z8S-HU-HU3" id="dk1-pX-E1r">
-                                                    <rect key="frame" x="0.0" y="0.0" width="712" height="43.5"/>
-                                                    <autoresizingMask key="autoresizingMask"/>
-                                                </tableViewCellContentView>
-                                            </tableViewCell>
-                                        </prototypes>
-                                        <connections>
-                                            <outlet property="dataSource" destination="Ekb-S8-yfK" id="Xqw-IK-F1M"/>
-                                            <outlet property="delegate" destination="Ekb-S8-yfK" id="OeX-tg-FFz"/>
-                                        </connections>
-                                    </tableView>
+                                    </view>
                                 </subviews>
                                 <constraints>
-                                    <constraint firstAttribute="trailing" secondItem="IdY-hf-Rfp" secondAttribute="trailing" constant="-337" id="CNR-Yx-5ll"/>
-                                    <constraint firstItem="IdY-hf-Rfp" firstAttribute="top" secondItem="wBM-b0-JRO" secondAttribute="top" constant="1" id="Xjb-Av-XIt"/>
-                                    <constraint firstItem="IdY-hf-Rfp" firstAttribute="centerY" secondItem="wBM-b0-JRO" secondAttribute="centerY" id="hQM-i5-xul"/>
-                                    <constraint firstItem="IdY-hf-Rfp" firstAttribute="leading" secondItem="wBM-b0-JRO" secondAttribute="leading" id="lkr-4F-Blk"/>
-                                    <constraint firstAttribute="bottom" secondItem="IdY-hf-Rfp" secondAttribute="bottom" constant="1" id="vLc-bY-2Lk"/>
+                                    <constraint firstItem="T1R-Fg-fPc" firstAttribute="top" secondItem="wBM-b0-JRO" secondAttribute="top" id="Bfi-Z7-Q3B"/>
+                                    <constraint firstItem="T1R-Fg-fPc" firstAttribute="centerX" secondItem="wBM-b0-JRO" secondAttribute="centerX" id="KDG-ZZ-2Br"/>
+                                    <constraint firstItem="T1R-Fg-fPc" firstAttribute="centerY" secondItem="wBM-b0-JRO" secondAttribute="centerY" id="OGq-h8-bLC"/>
+                                    <constraint firstAttribute="trailing" secondItem="T1R-Fg-fPc" secondAttribute="trailing" id="bDd-32-hxn"/>
+                                    <constraint firstItem="T1R-Fg-fPc" firstAttribute="leading" secondItem="wBM-b0-JRO" secondAttribute="leading" id="fsB-yd-suO"/>
+                                    <constraint firstAttribute="bottom" secondItem="T1R-Fg-fPc" secondAttribute="bottom" id="gWN-f9-WOl"/>
                                 </constraints>
                             </scrollView>
                         </subviews>
                         <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                         <constraints>
-                            <constraint firstItem="wBM-b0-JRO" firstAttribute="bottom" secondItem="ifv-Jz-opQ" secondAttribute="top" id="Nu0-Vp-ZAh"/>
-                            <constraint firstItem="wBM-b0-JRO" firstAttribute="leading" secondItem="dFG-t0-Cuv" secondAttribute="leading" id="ciV-OT-89f"/>
-                            <constraint firstItem="wBM-b0-JRO" firstAttribute="top" secondItem="QN9-la-fqb" secondAttribute="bottom" id="dQB-on-U7m"/>
-                            <constraint firstAttribute="trailing" secondItem="wBM-b0-JRO" secondAttribute="trailing" id="nko-B7-ire"/>
+                            <constraint firstAttribute="trailing" secondItem="wBM-b0-JRO" secondAttribute="trailing" id="6sM-e4-XUU"/>
+                            <constraint firstItem="wBM-b0-JRO" firstAttribute="leading" secondItem="dFG-t0-Cuv" secondAttribute="leading" id="DOr-mq-TTJ"/>
+                            <constraint firstItem="wBM-b0-JRO" firstAttribute="top" secondItem="QN9-la-fqb" secondAttribute="bottom" id="KtP-8r-Gvw"/>
+                            <constraint firstAttribute="bottom" secondItem="wBM-b0-JRO" secondAttribute="bottom" id="Yvz-h1-Ef7"/>
                         </constraints>
                     </view>
                     <connections>

+ 1 - 1
RedAnt Mobile/RedAnt Mobile/RARootViewController.m

@@ -26,7 +26,7 @@
     [super viewDidLoad];
     // Do any additional setup after loading the view, typically from a nib.
     [self removeFirstResponderTap]; // 截断了Cell响应
-    
+    self.automaticallyAdjustsScrollViewInsets = NO;
     self.modeTableView.tableHeaderView = [UIView new];
     self.modeTableView.tableFooterView = [UIView new];
     

+ 58 - 0
RedAnt Mobile/RedAnt Mobile/Result.storyboard

@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13196" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" colorMatched="YES">
+    <device id="retina4_7" orientation="portrait">
+        <adaptation id="fullscreen"/>
+    </device>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13173"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <scenes>
+        <!--Result View Controller-->
+        <scene sceneID="eni-hx-usK">
+            <objects>
+                <viewController storyboardIdentifier="ResultViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="A7H-61-6Jz" customClass="ResultViewController" sceneMemberID="viewController">
+                    <view key="view" contentMode="scaleToFill" id="Yxh-l7-Nol">
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <subviews>
+                            <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" bounces="NO" showsVerticalScrollIndicator="NO" id="W8a-gh-hKw">
+                                <rect key="frame" x="0.0" y="20" width="375" height="667"/>
+                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                                <subviews>
+                                    <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" dataMode="prototypes" style="plain" separatorStyle="default" allowsSelection="NO" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" id="KTK-uM-DQr">
+                                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+                                        <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                        <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                        <prototypes>
+                                            <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="tCell" id="Ylv-Wr-Fnh">
+                                                <rect key="frame" x="0.0" y="28" width="375" height="44"/>
+                                                <autoresizingMask key="autoresizingMask"/>
+                                                <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Ylv-Wr-Fnh" id="cUz-lt-NLj">
+                                                    <rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
+                                                    <autoresizingMask key="autoresizingMask"/>
+                                                </tableViewCellContentView>
+                                            </tableViewCell>
+                                        </prototypes>
+                                        <connections>
+                                            <outlet property="dataSource" destination="A7H-61-6Jz" id="ikJ-DX-ZnH"/>
+                                            <outlet property="delegate" destination="A7H-61-6Jz" id="odC-uZ-gnF"/>
+                                        </connections>
+                                    </tableView>
+                                </subviews>
+                            </scrollView>
+                        </subviews>
+                        <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                    </view>
+                    <connections>
+                        <outlet property="scrollview" destination="W8a-gh-hKw" id="K46-0i-Ojd"/>
+                        <outlet property="tableview" destination="KTK-uM-DQr" id="L4u-EL-nAA"/>
+                    </connections>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="vcl-hZ-djB" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="-977.5" y="177.86666666666665"/>
+        </scene>
+    </scenes>
+</document>

+ 1 - 0
RedAnt Mobile/RedAnt Mobile/ResultViewController.m

@@ -79,6 +79,7 @@ static const int delta = 25;
 //    self.scrollview.contentSize=self.tableview.frame.size;
     // Do any additional setup after loading the view, typically from a nib.
     
+    self.automaticallyAdjustsScrollViewInsets = NO;
     [self loadContent];
     [self setupTableRefreshView];
 }