Kaynağa Gözat

1.修改RedAnt Mobile,添加Enum Select视图界面。

Pen Li 8 yıl önce
ebeveyn
işleme
54fe5ac575

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


+ 66 - 18
RedAnt Mobile/RedAnt Mobile/Base.lproj/Main.storyboard

@@ -30,7 +30,7 @@
                                         <rect key="frame" x="0.0" y="28" width="375" height="40"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="dIs-Xr-nJO" id="0xv-T2-kkQ">
-                                            <rect key="frame" x="0.0" y="0.0" width="375" height="40"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="39.5"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dbw-1x-pdX">
@@ -107,7 +107,7 @@
                                         <rect key="frame" x="0.0" y="28" width="375" height="50"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="XVx-Pj-3l6" id="j2k-Zt-2jZ">
-                                            <rect key="frame" x="0.0" y="0.0" width="375" height="50"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="49.5"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" placeholder="place order" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="O29-II-M5r">
@@ -135,7 +135,7 @@
                                         <rect key="frame" x="0.0" y="78" width="375" height="50"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="5oS-6f-gIz" id="Tg3-Nx-TXI">
-                                            <rect key="frame" x="0.0" y="0.0" width="375" height="50"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="49.5"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="记住我的登录状态" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="68b-FX-thz">
@@ -347,7 +347,7 @@
                                                         <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="44"/>
+                                                            <rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
                                                             <autoresizingMask key="autoresizingMask"/>
                                                         </tableViewCellContentView>
                                                     </tableViewCell>
@@ -412,28 +412,16 @@
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="QjH-NE-vzj">
-                                <rect key="frame" x="0.0" y="20" width="375" height="597"/>
+                                <rect key="frame" x="0.0" y="20" width="375" height="647"/>
                                 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                             </view>
-                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="7vx-mj-blW">
-                                <rect key="frame" x="290" y="617" width="80" height="45"/>
-                                <constraints>
-                                    <constraint firstAttribute="height" constant="45" id="VHm-sI-49B"/>
-                                </constraints>
-                                <state key="normal" title="Load Saved"/>
-                                <connections>
-                                    <action selector="loadSaveBtnClick:" destination="Yib-5F-rp7" eventType="touchUpInside" id="kop-pC-SPj"/>
-                                </connections>
-                            </button>
                         </subviews>
                         <color key="backgroundColor" red="0.87941224093264247" green="0.87941224093264247" blue="0.87941224093264247" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                         <constraints>
-                            <constraint firstItem="8So-B7-4rn" firstAttribute="top" secondItem="QjH-NE-vzj" secondAttribute="bottom" constant="50" id="IxC-KN-hpb"/>
-                            <constraint firstItem="8So-B7-4rn" firstAttribute="top" secondItem="7vx-mj-blW" secondAttribute="bottom" constant="5" id="SCX-Yh-Uwz"/>
+                            <constraint firstItem="8So-B7-4rn" firstAttribute="top" secondItem="QjH-NE-vzj" secondAttribute="bottom" id="IxC-KN-hpb"/>
                             <constraint firstItem="QjH-NE-vzj" firstAttribute="leading" secondItem="FHx-Ej-UYr" secondAttribute="leading" id="Uck-Bk-0Br"/>
                             <constraint firstAttribute="trailing" secondItem="QjH-NE-vzj" secondAttribute="trailing" id="tzp-Vw-QIX"/>
                             <constraint firstItem="QjH-NE-vzj" firstAttribute="top" secondItem="bfw-v0-DPT" secondAttribute="bottom" id="ve1-uC-CJM"/>
-                            <constraint firstAttribute="trailing" secondItem="7vx-mj-blW" secondAttribute="trailing" constant="5" id="xTj-5L-njZ"/>
                         </constraints>
                     </view>
                     <connections>
@@ -444,8 +432,68 @@
             </objects>
             <point key="canvasLocation" x="-803" y="158"/>
         </scene>
+        <!--Enum Select View Controller-->
+        <scene sceneID="CsD-oh-6Nm">
+            <objects>
+                <viewController storyboardIdentifier="EnumSelectorViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="HLP-Ms-Evp" customClass="EnumSelectViewController" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="9FM-Nt-lDZ"/>
+                        <viewControllerLayoutGuide type="bottom" id="4cN-gj-dk0"/>
+                    </layoutGuides>
+                    <view key="view" contentMode="scaleToFill" id="8Ne-Jp-kx1">
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+                        <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                        <subviews>
+                            <tableView clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" translatesAutoresizingMaskIntoConstraints="NO" id="m1q-zP-831">
+                                <rect key="frame" x="0.0" y="24" width="375" height="643"/>
+                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                                <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                <prototypes>
+                                    <tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="EnumSelectorCell" id="P5L-MP-rAX" customClass="EnumSelectorCell">
+                                        <rect key="frame" x="0.0" y="22" width="375" height="44"/>
+                                        <autoresizingMask key="autoresizingMask"/>
+                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="P5L-MP-rAX" id="u9u-2W-GLB">
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                            <subviews>
+                                                <view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="fGn-l8-kI1" customClass="RTLabel">
+                                                    <rect key="frame" x="11" y="2" width="329" height="23"/>
+                                                    <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                                                    <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                                </view>
+                                                <imageView hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="check_1" translatesAutoresizingMaskIntoConstraints="NO" id="7lb-te-hOE">
+                                                    <rect key="frame" x="333" y="10" width="24" height="24"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
+                                                </imageView>
+                                            </subviews>
+                                        </tableViewCellContentView>
+                                        <connections>
+                                            <outlet property="img_checkmark" destination="7lb-te-hOE" id="Z8M-cG-qX0"/>
+                                            <outlet property="rtLabel" destination="fGn-l8-kI1" id="g7E-2z-pp4"/>
+                                        </connections>
+                                    </tableViewCell>
+                                </prototypes>
+                                <connections>
+                                    <outlet property="dataSource" destination="HLP-Ms-Evp" id="AlH-Q8-61a"/>
+                                    <outlet property="delegate" destination="HLP-Ms-Evp" id="rpX-xg-hL7"/>
+                                </connections>
+                            </tableView>
+                        </subviews>
+                        <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                    </view>
+                    <value key="contentSizeForViewInPopover" type="size" width="540" height="680"/>
+                    <modalFormSheetSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
+                    <connections>
+                        <outlet property="tableEnum" destination="m1q-zP-831" id="bkI-u1-Gx4"/>
+                    </connections>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="9Eo-vN-IJb" userLabel="First Responder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="3490" y="831"/>
+        </scene>
     </scenes>
     <resources>
+        <image name="check_1" width="24" height="24"/>
         <image name="setting" width="60" height="60"/>
     </resources>
 </document>

+ 2 - 6
RedAnt Mobile/RedAnt Mobile/SearchViewController.m

@@ -30,10 +30,10 @@
 
 - (void)setupNavigationBar {
     
-    UIBarButtonItem *saveItem = [[UIBarButtonItem alloc] initWithTitle:@"Save" style:UIBarButtonItemStylePlain target:self action:@selector(saveItemClick:)];
+//    UIBarButtonItem *saveItem = [[UIBarButtonItem alloc] initWithTitle:@"Save" style:UIBarButtonItemStylePlain target:self action:@selector(saveItemClick:)];
     UIBarButtonItem *searchItem = [[UIBarButtonItem alloc] initWithTitle:@"Search" style:UIBarButtonItemStylePlain target:self action:@selector(searchItemClick:)];
     
-    self.navigationItem.rightBarButtonItems = @[searchItem,saveItem];
+    self.navigationItem.rightBarButtonItems = @[searchItem];
 }
 
 #pragma mark - Action
@@ -46,10 +46,6 @@
     
 }
 
-- (IBAction)loadSaveBtnClick:(UIButton *)sender {
-}
-
-
 #pragma mark Request Editor
 -(NSDictionary*)request_Editor:(NSString*) request_url params:(NSMutableDictionary*)params
 {