Sfoglia il codice sorgente

Apex Mobile
完成了search菜单的功能挂接

Ray Zhang 8 anni fa
parent
commit
586a4eb0b7

BIN
Apex Mobile/Apex Mobile.xcodeproj/project.xcworkspace/xcuserdata/Ray.xcuserdatad/UserInterfaceState.xcuserstate


+ 3 - 3
Apex Mobile/Apex Mobile.xcodeproj/xcuserdata/Ray.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -26,7 +26,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "Apex Mobile/DetailPageViewController.m"
-            timestampString = "538975719.864561"
+            timestampString = "538976298.218757"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "544"
@@ -106,7 +106,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "Apex Mobile/ToolslistViewController.m"
-            timestampString = "538975719.864925"
+            timestampString = "538976298.219445"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "76"
@@ -122,7 +122,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "Apex Mobile/ToolslistViewController.m"
-            timestampString = "538975719.865057"
+            timestampString = "538976298.219702"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "113"

+ 176 - 0
Apex Mobile/Apex Mobile/Main.storyboard

@@ -515,6 +515,182 @@
             </objects>
             <point key="canvasLocation" x="4630" y="-1817"/>
         </scene>
+        <!--Search-->
+        <scene sceneID="WqW-UO-y7w">
+            <objects>
+                <viewController storyboardIdentifier="SearchViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="C3t-ED-9dx" customClass="SearchViewController" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="dkt-BH-cFp"/>
+                        <viewControllerLayoutGuide type="bottom" id="FpR-kZ-qvh"/>
+                    </layoutGuides>
+                    <view key="view" contentMode="scaleToFill" id="obf-ZQ-pbd">
+                        <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" allowsSelection="NO" rowHeight="82" sectionHeaderHeight="22" sectionFooterHeight="42" translatesAutoresizingMaskIntoConstraints="NO" id="ppj-4o-rzu">
+                                <rect key="frame" x="0.0" y="0.0" width="375" height="623"/>
+                                <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="item_date" rowHeight="82" id="mTz-zv-fyY" customClass="TableCellDate">
+                                        <rect key="frame" x="0.0" y="22" width="375" height="82"/>
+                                        <autoresizingMask key="autoresizingMask"/>
+                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="mTz-zv-fyY" id="ExR-Af-j3g">
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="81.5"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                            <subviews>
+                                                <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" restorationIdentifier="edit_from" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="From" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="Fj7-9i-IJL">
+                                                    <rect key="frame" x="20" y="38" width="135" height="30"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                                    <nil key="textColor"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <textInputTraits key="textInputTraits" returnKeyType="done"/>
+                                                    <connections>
+                                                        <outlet property="delegate" destination="C3t-ED-9dx" id="G84-PY-wEC"/>
+                                                    </connections>
+                                                </textField>
+                                                <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" restorationIdentifier="edit_to" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="To" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="7An-ec-LnT">
+                                                    <rect key="frame" x="165" y="38" width="135" height="30"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <textInputTraits key="textInputTraits" returnKeyType="done"/>
+                                                    <connections>
+                                                        <outlet property="delegate" destination="C3t-ED-9dx" id="14m-Mm-aCu"/>
+                                                    </connections>
+                                                </textField>
+                                                <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="item_date" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="siE-GW-KiJ">
+                                                    <rect key="frame" x="20" y="10" width="178" height="21"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
+                                            </subviews>
+                                        </tableViewCellContentView>
+                                        <connections>
+                                            <outlet property="anameLabel" destination="siE-GW-KiJ" id="AT9-Lm-1y4"/>
+                                            <outlet property="fromEdit" destination="Fj7-9i-IJL" id="Ahd-Jh-e1i"/>
+                                            <outlet property="toEdit" destination="7An-ec-LnT" id="AeM-4l-EzU"/>
+                                        </connections>
+                                    </tableViewCell>
+                                    <tableViewCell contentMode="scaleToFill" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="item_bool" rowHeight="82" id="cff-AI-2yS" customClass="TableCellBool">
+                                        <rect key="frame" x="0.0" y="104" width="375" height="82"/>
+                                        <autoresizingMask key="autoresizingMask"/>
+                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="cff-AI-2yS" id="78g-DF-IJU">
+                                            <rect key="frame" x="0.0" y="0.0" width="342" height="81.5"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                            <subviews>
+                                                <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="item_bool" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="94I-uG-uW7">
+                                                    <rect key="frame" x="20" y="10" width="143" height="21"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
+                                                <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="XF6-7j-X0s">
+                                                    <rect key="frame" x="0.0" y="10" width="320" height="71"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <state key="normal" title="Not set">
+                                                        <color key="titleColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                                        <color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                                    </state>
+                                                    <connections>
+                                                        <action selector="onBoolitemClick:" destination="C3t-ED-9dx" eventType="touchUpInside" id="cmU-wB-HNU"/>
+                                                    </connections>
+                                                </button>
+                                            </subviews>
+                                        </tableViewCellContentView>
+                                        <connections>
+                                            <outlet property="anameLabel" destination="94I-uG-uW7" id="RfC-Vi-cgU"/>
+                                            <outlet property="valButton" destination="XF6-7j-X0s" id="SZb-vM-eTM"/>
+                                        </connections>
+                                    </tableViewCell>
+                                    <tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="item_edit" rowHeight="82" id="wQN-d1-kMW" customClass="TableCellEdit">
+                                        <rect key="frame" x="0.0" y="186" width="375" height="82"/>
+                                        <autoresizingMask key="autoresizingMask"/>
+                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="wQN-d1-kMW" id="3St-ZX-jbo">
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="81.5"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                            <subviews>
+                                                <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="item_edit" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5yL-Qn-keV">
+                                                    <rect key="frame" x="20" y="10" width="156" height="21"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
+                                                <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Enter criterion" minimumFontSize="17" clearButtonMode="always" translatesAutoresizingMaskIntoConstraints="NO" id="3xs-xH-AbW">
+                                                    <rect key="frame" x="20" y="38" width="280" height="30"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <textInputTraits key="textInputTraits" returnKeyType="done"/>
+                                                    <connections>
+                                                        <outlet property="delegate" destination="C3t-ED-9dx" id="6l2-Iq-lZY"/>
+                                                    </connections>
+                                                </textField>
+                                            </subviews>
+                                        </tableViewCellContentView>
+                                        <connections>
+                                            <outlet property="anameLabel" destination="5yL-Qn-keV" id="NTx-6M-V9t"/>
+                                            <outlet property="valueEdit" destination="3xs-xH-AbW" id="JMo-DI-AXY"/>
+                                        </connections>
+                                    </tableViewCell>
+                                </prototypes>
+                                <connections>
+                                    <outlet property="dataSource" destination="C3t-ED-9dx" id="Vnd-AM-A5R"/>
+                                    <outlet property="delegate" destination="C3t-ED-9dx" id="ZHb-4L-dA1"/>
+                                </connections>
+                            </tableView>
+                            <toolbar opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="FYC-YO-04g">
+                                <rect key="frame" x="0.0" y="623" width="375" height="44"/>
+                                <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
+                                <items>
+                                    <barButtonItem style="plain" id="bX6-SA-fCQ">
+                                        <button key="customView" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="q98-Ul-Lg7">
+                                            <rect key="frame" x="16" y="5.5" width="73" height="33"/>
+                                            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                            <state key="normal" title="Clear">
+                                                <color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                            </state>
+                                            <connections>
+                                                <action selector="ClearBtnOnClick:" destination="C3t-ED-9dx" eventType="touchUpInside" id="ebl-U4-0EU"/>
+                                            </connections>
+                                        </button>
+                                    </barButtonItem>
+                                    <barButtonItem systemItem="flexibleSpace" id="DPL-8Q-HwA"/>
+                                    <barButtonItem style="plain" id="VRS-1z-M9u">
+                                        <button key="customView" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="azJ-db-8ce">
+                                            <rect key="frame" x="286" y="5.5" width="73" height="33"/>
+                                            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                            <state key="normal" title="Search">
+                                                <color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                            </state>
+                                            <connections>
+                                                <action selector="SearchBtnOnClick:" destination="C3t-ED-9dx" eventType="touchUpInside" id="c2h-g8-8vV"/>
+                                            </connections>
+                                        </button>
+                                    </barButtonItem>
+                                </items>
+                            </toolbar>
+                        </subviews>
+                        <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                    </view>
+                    <navigationItem key="navigationItem" title="Search" id="OwC-ot-lOg">
+                        <barButtonItem key="rightBarButtonItem" title="Items" id="cmN-H2-3ne">
+                            <connections>
+                                <action selector="onCustomize:" destination="C3t-ED-9dx" id="2HU-8j-YCr"/>
+                            </connections>
+                        </barButtonItem>
+                    </navigationItem>
+                    <connections>
+                        <outlet property="table" destination="ppj-4o-rzu" id="Kjn-ln-5de"/>
+                    </connections>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="erf-Re-vM1" userLabel="First Responder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="2290" y="-1094"/>
+        </scene>
     </scenes>
     <resources>
         <image name="apexlogo-2" width="129" height="32"/>

+ 31 - 1
Apex Mobile/Apex Mobile/SearchlistViewController.m

@@ -7,7 +7,7 @@
 //
 
 #import "SearchlistViewController.h"
-
+#import "SearchViewController.h"
 @interface SearchlistViewController ()
 
 @end
@@ -75,6 +75,36 @@
     
     //    NSAssert(true, ([NSString stringWithFormat:@"%s LoadModelist not impl",object_getClassName([self class])]));
 }
+
+-(void)PerformAction:(NSString*) type
+{
+
+        NSString *function_name;
+    
+    
+    if([type isEqualToString:@"ocean_booking"])
+    {
+function_name = @"Ocean Booking";
+    }
+    else if([type isEqualToString:@"ocean_blinfo"])
+    {
+         function_name = @"Ocean B/L info.";
+    }
+    else if([type isEqualToString:@"container"])
+    {
+          function_name = @"Container detail";
+    }
+    else if([type isEqualToString:@"document"])
+    {
+        
+ function_name = @"Download Document";
+    }
+
+    SearchViewController *searchViewController = [[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"SearchViewController"];
+    searchViewController.function_name = function_name;
+    [self.navigationController pushViewController:searchViewController animated:YES];
+    
+}
 /*
 #pragma mark - Navigation
 

+ 0 - 42
Apex Mobile/Apex Mobile/ToolslistViewController.m

@@ -142,48 +142,6 @@
         //        newsview.module_name = @"Market news";
         [self.navigationController pushViewController:viewcontroller animated:YES];
     }
-//    
-//    
-//    NSString* title = [self.toolsinfo[indexPath.row] valueForKey:@"title"];
-//    if([title isEqualToString:@"Market news"])
-//    {
-//        NewsViewController *viewcontroller=[[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"NewsView"];
-//        viewcontroller.module_name = @"Market news";
-//        [self.navigationController pushViewController:viewcontroller animated:YES];
-//    }
-//    else if([title isEqualToString:@"Announcements"])
-//    {
-//        NewsViewController *viewcontroller=[[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"NewsView"];
-//        viewcontroller.module_name = @"Announcements";
-//        [self.navigationController pushViewController:viewcontroller animated:YES];
-//    }
-//    else if([title isEqualToString:@"Saved Detail/Search"])
-//    {
-//        
-//        HistoryTabBarController *viewcontroller=[[HistoryTabBarController alloc] init];
-//        
-//        [self.navigationController pushViewController:viewcontroller animated:YES];
-//        
-//    }
-//    else if([title isEqualToString:@"Change Password"])
-//    {
-//        ChangePasswordViewController *viewcontroller=[[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"ChangePassword"];
-//        //        newsview.module_name = @"Market news";
-//        [self.navigationController pushViewController:viewcontroller animated:YES];
-//    }
-//    //    else if([title isEqualToString:@"Setting"])
-//    //    {
-//    //        ChangePasswordViewController *newsview=[[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"Setting"];
-//    ////        newsview.module_name = @"Market news";
-//    //        [self.navigationController pushViewController:newsview animated:YES];
-//    //    }
-//    else if([title isEqualToString:@"Apex History"])
-//    {
-//        ApexHistoryViewController *viewcontroller=[[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"ApexHistory"];
-//        //        newsview.module_name = @"Market news";
-//        [self.navigationController pushViewController:viewcontroller animated:YES];
-//    }
-//    else if([title isEqualToString:@"About this App"])
 
 }
 /*

+ 4 - 4
Apex Mobile/Apex Mobile/search.json

@@ -5,25 +5,25 @@
                  "name": "Ocean Booking",
                  "detail": "Search ocean booking information",
                  "icon": "mode_booking",
-                 "type": "market news"
+                 "type": "ocean_booking"
                  },
                  {
                  "name": "Ocean B/L Info.",
                  "detail": "Search ocean bill of lading information",
                  "icon": "mode_bl",
-                 "type": "market news"
+                 "type": "ocean_blinfo"
                  },
                  {
                  "name": "Container Detail",
                  "detail": "Search container",
                  "icon": "mode_container",
-                 "type": "market news"
+                 "type": "container_detail"
                  },
                  {
                  "name": "Document",
                  "detail": "Search document",
                  "icon": "mode_document",
-                 "type": "market news"
+                 "type": "document"
                  }
                  ],
     "title": "Search",