Просмотр исходного кода

RedAnt Mobile

修改query 数据结构
修复单击显不全的单元格会闪退的bug
Ray Zhang 8 лет назад
Родитель
Сommit
b7dd1aeda4

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

@@ -104,7 +104,7 @@
 //    preQueryVC.query_id = [model.query_id integerValue];
 //    preQueryVC.query_id = [model.query_id integerValue];
 //    preQueryVC.title = model.name;
 //    preQueryVC.title = model.name;
     
     
-    ResultViewController *preQueryVC = [[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"ResultViewController"];
+    ResultViewController *preQueryVC = [[UIStoryboard storyboardWithName:@"Result" bundle:nil] instantiateViewControllerWithIdentifier:@"ResultViewController"];
     [preQueryVC setQueryParams: @{
     [preQueryVC setQueryParams: @{
                                   @"query_id" : model.query_id
                                   @"query_id" : model.query_id
                                   }];
                                   }];

+ 93 - 29
RedAnt Mobile/RedAnt Mobile/Result.storyboard

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?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">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13196" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
     <device id="retina4_7" orientation="portrait">
     <device id="retina4_7" orientation="portrait">
         <adaptation id="fullscreen"/>
         <adaptation id="fullscreen"/>
     </device>
     </device>
@@ -9,50 +9,114 @@
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     </dependencies>
     <scenes>
     <scenes>
+        <!--Fully Show View Controller-->
+        <scene sceneID="5sT-Gu-pjy">
+            <objects>
+                <viewController storyboardIdentifier="fullyShowViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="9N3-SE-Xaq" customClass="FullyShowViewController" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="FQC-qs-wlf"/>
+                        <viewControllerLayoutGuide type="bottom" id="lD2-gB-lrk"/>
+                    </layoutGuides>
+                    <view key="view" contentMode="scaleToFill" id="TLk-X5-Q7O">
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <subviews>
+                            <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" fixedFrame="YES" editable="NO" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="ENI-uK-o09">
+                                <rect key="frame" x="16" y="20" width="343" height="627"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
+                            </textView>
+                        </subviews>
+                        <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                    </view>
+                    <simulatedNavigationBarMetrics key="simulatedTopBarMetrics" prompted="NO"/>
+                    <simulatedToolbarMetrics key="simulatedBottomBarMetrics"/>
+                    <connections>
+                        <outlet property="textView" destination="ENI-uK-o09" id="1YY-34-98o"/>
+                    </connections>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="Bbu-wv-eiG" userLabel="First Responder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="1170.4000000000001" y="108.39580209895054"/>
+        </scene>
         <!--Result View Controller-->
         <!--Result View Controller-->
-        <scene sceneID="eni-hx-usK">
+        <scene sceneID="ZcM-sA-vbV">
             <objects>
             <objects>
-                <viewController storyboardIdentifier="ResultViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="A7H-61-6Jz" customClass="ResultViewController" sceneMemberID="viewController">
-                    <view key="view" contentMode="scaleToFill" id="Yxh-l7-Nol">
+                <viewController storyboardIdentifier="ResultViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="br7-Ok-rlw" customClass="ResultViewController" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="nHW-fo-m1o"/>
+                        <viewControllerLayoutGuide type="bottom" id="2lc-PA-aGV"/>
+                    </layoutGuides>
+                    <view key="view" contentMode="scaleToFill" id="M6S-pO-oSB">
                         <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
                         <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                         <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"/>
+                            <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" bounces="NO" showsVerticalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fhj-vf-xf4">
+                                <rect key="frame" x="0.0" y="20" width="375" height="647"/>
                                 <subviews>
                                 <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"/>
+                                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="jND-lc-SG6">
+                                        <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="BgA-Ls-Ost">
+                                                <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="ff8-Nh-JiF">
+                                                        <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="ff8-Nh-JiF" id="Oxm-mQ-KQG">
+                                                            <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="br7-Ok-rlw" id="fhy-5O-c1X"/>
+                                                    <outlet property="delegate" destination="br7-Ok-rlw" id="T9S-cF-Ubp"/>
+                                                </connections>
+                                            </tableView>
+                                        </subviews>
                                         <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                                         <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>
+                                        <constraints>
+                                            <constraint firstItem="BgA-Ls-Ost" firstAttribute="height" secondItem="jND-lc-SG6" secondAttribute="height" id="09D-oE-1bU"/>
+                                            <constraint firstItem="BgA-Ls-Ost" firstAttribute="leading" secondItem="jND-lc-SG6" secondAttribute="leading" id="CTT-xZ-60d"/>
+                                            <constraint firstAttribute="trailing" secondItem="BgA-Ls-Ost" secondAttribute="trailing" id="QRA-fL-Jfb"/>
+                                            <constraint firstItem="BgA-Ls-Ost" firstAttribute="width" secondItem="jND-lc-SG6" secondAttribute="width" id="dcv-NF-rlk"/>
+                                            <constraint firstItem="BgA-Ls-Ost" firstAttribute="top" secondItem="jND-lc-SG6" secondAttribute="top" id="mTG-07-KlK"/>
+                                        </constraints>
+                                    </view>
                                 </subviews>
                                 </subviews>
+                                <constraints>
+                                    <constraint firstAttribute="trailing" secondItem="jND-lc-SG6" secondAttribute="trailing" id="4Uo-hv-geP"/>
+                                    <constraint firstItem="jND-lc-SG6" firstAttribute="top" secondItem="fhj-vf-xf4" secondAttribute="top" id="GJT-GS-cD0"/>
+                                    <constraint firstAttribute="bottom" secondItem="jND-lc-SG6" secondAttribute="bottom" id="UHi-I1-SYw"/>
+                                    <constraint firstItem="jND-lc-SG6" firstAttribute="leading" secondItem="fhj-vf-xf4" secondAttribute="leading" id="Vya-TD-rrY"/>
+                                    <constraint firstItem="jND-lc-SG6" firstAttribute="height" secondItem="fhj-vf-xf4" secondAttribute="height" id="pdO-iB-wvO"/>
+                                    <constraint firstItem="jND-lc-SG6" firstAttribute="width" secondItem="fhj-vf-xf4" secondAttribute="width" id="q5c-pN-emY"/>
+                                </constraints>
                             </scrollView>
                             </scrollView>
                         </subviews>
                         </subviews>
                         <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                         <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                        <constraints>
+                            <constraint firstItem="fhj-vf-xf4" firstAttribute="leading" secondItem="M6S-pO-oSB" secondAttribute="leading" id="G9N-de-plx"/>
+                            <constraint firstItem="fhj-vf-xf4" firstAttribute="top" secondItem="nHW-fo-m1o" secondAttribute="bottom" id="IVy-Nm-2hT"/>
+                            <constraint firstItem="2lc-PA-aGV" firstAttribute="top" secondItem="fhj-vf-xf4" secondAttribute="bottom" id="MW3-GZ-Kz4"/>
+                            <constraint firstAttribute="trailing" secondItem="fhj-vf-xf4" secondAttribute="trailing" id="eeR-EM-VjV"/>
+                        </constraints>
                     </view>
                     </view>
                     <connections>
                     <connections>
-                        <outlet property="scrollview" destination="W8a-gh-hKw" id="K46-0i-Ojd"/>
-                        <outlet property="tableview" destination="KTK-uM-DQr" id="L4u-EL-nAA"/>
+                        <outlet property="h_constraint" destination="pdO-iB-wvO" id="1Qb-Sk-mqY"/>
+                        <outlet property="lead_constraint" destination="G9N-de-plx" id="zZj-EV-oAd"/>
+                        <outlet property="scrollview" destination="fhj-vf-xf4" id="rhg-O3-Nvw"/>
+                        <outlet property="tableview" destination="BgA-Ls-Ost" id="EV0-iB-Ugo"/>
+                        <outlet property="trail_constraint" destination="eeR-EM-VjV" id="6DB-BM-IrG"/>
+                        <outlet property="w_constraint" destination="q5c-pN-emY" id="Yn0-Du-eeP"/>
                     </connections>
                     </connections>
                 </viewController>
                 </viewController>
-                <placeholder placeholderIdentifier="IBFirstResponder" id="vcl-hZ-djB" sceneMemberID="firstResponder"/>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="Bg8-u7-Uy3" sceneMemberID="firstResponder"/>
             </objects>
             </objects>
-            <point key="canvasLocation" x="-977.5" y="177.86666666666665"/>
+            <point key="canvasLocation" x="-1564" y="160"/>
         </scene>
         </scene>
     </scenes>
     </scenes>
 </document>
 </document>

+ 7 - 0
RedAnt Mobile/RedAnt Mobile/predef_query.json

@@ -1,5 +1,12 @@
 {
 {
     "result": 2,
     "result": 2,
+    "action":{
+        "title":"demo title",
+        "module":"quick_look",
+        "params":{
+            "order#":0
+        }
+    },
     "data": {
     "data": {
         "count": 17,
         "count": 17,
         "item_0": [
         "item_0": [