Parcourir la source

1.修复Apex Mobile在iOS 11前TableView内容位置不正确。

Pen Li il y a 8 ans
Parent
commit
06a860ec40

+ 5 - 5
Apex Mobile/Apex Mobile/HomeViewController.m

@@ -25,11 +25,11 @@
 - (void)viewDidLoad {
     [super viewDidLoad];
     // Do any additional setup after loading the view.
-//    if (@available(iOS 11,*)) {
-//        self.shipTableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
-//    } else {
-//        self.automaticallyAdjustsScrollViewInsets = NO;
-//    }
+    if (@available(iOS 11,*)) {
+        self.shipTableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
+    } else {
+        self.automaticallyAdjustsScrollViewInsets = NO;
+    }
     
     
     [self configureTableView];

+ 56 - 33
Apex Mobile/Apex Mobile/Main.storyboard

@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="YOs-rL-bRV">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="YOs-rL-bRV">
     <device id="retina4_7" orientation="portrait">
         <adaptation id="fullscreen"/>
     </device>
     <dependencies>
         <deployment version="2304" identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
-        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13527"/>
+        <capability name="Alignment constraints with different attributes" minToolsVersion="5.1"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <scenes>
@@ -45,12 +45,16 @@
         <scene sceneID="9cQ-7l-o6s">
             <objects>
                 <viewController storyboardIdentifier="SearchPanel" title="Search" useStoryboardIdentifierAsRestorationIdentifier="YES" id="cXn-4T-TpY" customClass="SearchlistViewController" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="jqd-qs-6Hd"/>
+                        <viewControllerLayoutGuide type="bottom" id="GqU-ke-DJ1"/>
+                    </layoutGuides>
                     <view key="view" contentMode="scaleToFill" id="X6q-dB-qSM">
                         <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="VSo-fp-Aqt">
-                                <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+                                <rect key="frame" x="0.0" y="20" width="375" height="598"/>
                                 <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                 <connections>
                                     <outlet property="dataSource" destination="cXn-4T-TpY" id="hp4-PI-gpw"/>
@@ -60,12 +64,11 @@
                         </subviews>
                         <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                         <constraints>
-                            <constraint firstItem="VSo-fp-Aqt" firstAttribute="bottom" secondItem="M2j-n0-SI4" secondAttribute="bottom" constant="49" id="CG1-hf-oNA"/>
-                            <constraint firstItem="VSo-fp-Aqt" firstAttribute="leading" secondItem="M2j-n0-SI4" secondAttribute="leading" id="Ivf-dw-cgl"/>
-                            <constraint firstItem="M2j-n0-SI4" firstAttribute="trailing" secondItem="VSo-fp-Aqt" secondAttribute="trailing" id="NXn-EB-eAW"/>
-                            <constraint firstItem="M2j-n0-SI4" firstAttribute="top" secondItem="VSo-fp-Aqt" secondAttribute="top" constant="20" id="lsE-VZ-KTL"/>
+                            <constraint firstItem="VSo-fp-Aqt" firstAttribute="leading" secondItem="X6q-dB-qSM" secondAttribute="leading" id="01G-ol-y6O"/>
+                            <constraint firstItem="GqU-ke-DJ1" firstAttribute="top" secondItem="VSo-fp-Aqt" secondAttribute="bottom" id="XVp-oF-5pU"/>
+                            <constraint firstItem="VSo-fp-Aqt" firstAttribute="top" secondItem="jqd-qs-6Hd" secondAttribute="bottom" id="YRi-y3-vgM"/>
+                            <constraint firstAttribute="trailing" secondItem="VSo-fp-Aqt" secondAttribute="trailing" id="vNp-R1-P9B"/>
                         </constraints>
-                        <viewLayoutGuide key="safeArea" id="M2j-n0-SI4"/>
                     </view>
                     <tabBarItem key="tabBarItem" title="Search" id="EFy-bO-l3i"/>
                     <simulatedTabBarMetrics key="simulatedBottomBarMetrics"/>
@@ -81,6 +84,10 @@
         <scene sceneID="nh8-1Z-eFB">
             <objects>
                 <viewController storyboardIdentifier="HistoryPanel" title="History" useStoryboardIdentifierAsRestorationIdentifier="YES" id="XAM-wb-CvU" customClass="OrderHistoryViewController" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="87u-Wv-7wA"/>
+                        <viewControllerLayoutGuide type="bottom" id="3Te-oX-ftj"/>
+                    </layoutGuides>
                     <view key="view" contentMode="scaleToFill" id="QxY-X5-VD0">
                         <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@@ -96,12 +103,11 @@
                         </subviews>
                         <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                         <constraints>
-                            <constraint firstItem="Ipg-Ej-dwR" firstAttribute="trailing" secondItem="Vjd-jz-qR0" secondAttribute="trailing" id="Hxm-ei-DV8"/>
-                            <constraint firstItem="Vjd-jz-qR0" firstAttribute="top" secondItem="Ipg-Ej-dwR" secondAttribute="top" id="K9u-F5-9rH"/>
-                            <constraint firstItem="Vjd-jz-qR0" firstAttribute="leading" secondItem="Ipg-Ej-dwR" secondAttribute="leading" id="WDl-k5-IvU"/>
-                            <constraint firstItem="Ipg-Ej-dwR" firstAttribute="bottom" secondItem="Vjd-jz-qR0" secondAttribute="bottom" id="iTX-qv-NhV"/>
+                            <constraint firstAttribute="trailing" secondItem="Vjd-jz-qR0" secondAttribute="trailing" id="Hxm-ei-DV8"/>
+                            <constraint firstItem="Vjd-jz-qR0" firstAttribute="top" secondItem="87u-Wv-7wA" secondAttribute="bottom" id="K9u-F5-9rH"/>
+                            <constraint firstItem="Vjd-jz-qR0" firstAttribute="leading" secondItem="QxY-X5-VD0" secondAttribute="leading" id="WDl-k5-IvU"/>
+                            <constraint firstItem="3Te-oX-ftj" firstAttribute="top" secondItem="Vjd-jz-qR0" secondAttribute="bottom" id="iTX-qv-NhV"/>
                         </constraints>
-                        <viewLayoutGuide key="safeArea" id="Ipg-Ej-dwR"/>
                     </view>
                     <tabBarItem key="tabBarItem" title="History" image="tab_history" id="TGe-qX-0UY"/>
                     <simulatedTabBarMetrics key="simulatedBottomBarMetrics"/>
@@ -117,6 +123,10 @@
         <scene sceneID="2GM-04-5qw">
             <objects>
                 <viewController storyboardIdentifier="LoginPanel" title="Login" useStoryboardIdentifierAsRestorationIdentifier="YES" id="RGM-u2-C1G" customClass="LoginViewController" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="Fgn-Jb-we3"/>
+                        <viewControllerLayoutGuide type="bottom" id="deU-wF-9js"/>
+                    </layoutGuides>
                     <view key="view" contentMode="scaleToFill" id="lHV-oi-ARt">
                         <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@@ -162,14 +172,14 @@
                                 <inset key="insetFor6xAndEarlier" minX="0.0" minY="70" maxX="0.0" maxY="-70"/>
                             </activityIndicatorView>
                             <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Hzc-kg-csR">
-                                <rect key="frame" x="124" y="564" width="126" height="30"/>
+                                <rect key="frame" x="124.5" y="564" width="126" height="30"/>
                                 <state key="normal" title="Retrieve password"/>
                                 <connections>
                                     <action selector="RetrieveButtonClick:" destination="RGM-u2-C1G" eventType="touchUpInside" id="kKP-WL-fGb"/>
                                 </connections>
                             </button>
                             <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="apexlogo-2" translatesAutoresizingMaskIntoConstraints="NO" id="zKh-Ur-Gus">
-                                <rect key="frame" x="50" y="49" width="276" height="120"/>
+                                <rect key="frame" x="49.5" y="49" width="276" height="120"/>
                                 <constraints>
                                     <constraint firstAttribute="height" constant="120" id="JPD-SD-EHj"/>
                                     <constraint firstAttribute="width" constant="276" id="oAG-Aj-MVG"/>
@@ -179,12 +189,11 @@
                         </subviews>
                         <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                         <constraints>
-                            <constraint firstItem="Hzc-kg-csR" firstAttribute="centerX" secondItem="sgG-UE-fQF" secondAttribute="centerX" id="Mnl-xk-TBH"/>
-                            <constraint firstItem="zKh-Ur-Gus" firstAttribute="top" secondItem="sgG-UE-fQF" secondAttribute="top" constant="29" id="NCe-W2-EeK"/>
-                            <constraint firstItem="zKh-Ur-Gus" firstAttribute="centerX" secondItem="sgG-UE-fQF" secondAttribute="centerX" id="de4-gF-h5y"/>
-                            <constraint firstItem="sgG-UE-fQF" firstAttribute="bottom" secondItem="Hzc-kg-csR" secondAttribute="bottom" constant="24" id="fbS-Mb-Anu"/>
+                            <constraint firstItem="Hzc-kg-csR" firstAttribute="centerX" secondItem="lHV-oi-ARt" secondAttribute="centerX" id="Mnl-xk-TBH"/>
+                            <constraint firstItem="zKh-Ur-Gus" firstAttribute="top" secondItem="Fgn-Jb-we3" secondAttribute="bottom" constant="29" id="NCe-W2-EeK"/>
+                            <constraint firstItem="zKh-Ur-Gus" firstAttribute="centerX" secondItem="lHV-oi-ARt" secondAttribute="centerX" id="de4-gF-h5y"/>
+                            <constraint firstItem="deU-wF-9js" firstAttribute="top" secondItem="Hzc-kg-csR" secondAttribute="bottom" constant="24" id="fbS-Mb-Anu"/>
                         </constraints>
-                        <viewLayoutGuide key="safeArea" id="sgG-UE-fQF"/>
                     </view>
                     <tabBarItem key="tabBarItem" title="Login" image="tab_login" id="Tch-x6-pfY"/>
                     <simulatedStatusBarMetrics key="simulatedStatusBarMetrics"/>
@@ -207,6 +216,10 @@
         <scene sceneID="eIc-Na-UuH">
             <objects>
                 <viewController storyboardIdentifier="HomePanel" title="Home" useStoryboardIdentifierAsRestorationIdentifier="YES" id="ucJ-C2-JJ8" customClass="HomeViewController" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="70L-ql-L3f"/>
+                        <viewControllerLayoutGuide type="bottom" id="6yV-PD-KCp"/>
+                    </layoutGuides>
                     <view key="view" contentMode="scaleToFill" id="ifC-vl-u6I">
                         <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@@ -240,15 +253,14 @@
                         </subviews>
                         <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                         <constraints>
-                            <constraint firstItem="3xo-DP-qWN" firstAttribute="top" secondItem="HNS-Qr-K3s" secondAttribute="top" id="7dN-EO-3Yh"/>
-                            <constraint firstItem="iIl-j9-7oa" firstAttribute="trailing" secondItem="HNS-Qr-K3s" secondAttribute="trailing" id="9jR-8W-zYM"/>
-                            <constraint firstItem="HNS-Qr-K3s" firstAttribute="trailing" secondItem="3xo-DP-qWN" secondAttribute="trailing" id="Gvc-tU-QdZ"/>
+                            <constraint firstItem="3xo-DP-qWN" firstAttribute="top" secondItem="70L-ql-L3f" secondAttribute="bottom" id="7dN-EO-3Yh"/>
+                            <constraint firstItem="iIl-j9-7oa" firstAttribute="trailing" secondItem="ifC-vl-u6I" secondAttribute="trailing" id="9jR-8W-zYM"/>
+                            <constraint firstAttribute="trailing" secondItem="3xo-DP-qWN" secondAttribute="trailing" id="Gvc-tU-QdZ"/>
                             <constraint firstItem="iIl-j9-7oa" firstAttribute="top" secondItem="3xo-DP-qWN" secondAttribute="bottom" id="JZI-44-qDk"/>
-                            <constraint firstItem="iIl-j9-7oa" firstAttribute="leading" secondItem="HNS-Qr-K3s" secondAttribute="leading" id="lPc-7m-bBJ"/>
-                            <constraint firstItem="3xo-DP-qWN" firstAttribute="leading" secondItem="HNS-Qr-K3s" secondAttribute="leading" id="mui-fH-ZHN"/>
-                            <constraint firstItem="iIl-j9-7oa" firstAttribute="bottom" secondItem="HNS-Qr-K3s" secondAttribute="bottom" id="nZz-HM-ESm"/>
+                            <constraint firstItem="iIl-j9-7oa" firstAttribute="leading" secondItem="ifC-vl-u6I" secondAttribute="leading" id="lPc-7m-bBJ"/>
+                            <constraint firstItem="3xo-DP-qWN" firstAttribute="leading" secondItem="ifC-vl-u6I" secondAttribute="leading" id="mui-fH-ZHN"/>
+                            <constraint firstItem="iIl-j9-7oa" firstAttribute="bottom" secondItem="6yV-PD-KCp" secondAttribute="top" id="nZz-HM-ESm"/>
                         </constraints>
-                        <viewLayoutGuide key="safeArea" id="HNS-Qr-K3s"/>
                     </view>
                     <tabBarItem key="tabBarItem" title="Home" image="tab_home" id="OC9-MV-8nf"/>
                     <simulatedTabBarMetrics key="simulatedBottomBarMetrics"/>
@@ -264,13 +276,16 @@
         <scene sceneID="xt7-Ft-PVv">
             <objects>
                 <viewController storyboardIdentifier="ToolsPanel" useStoryboardIdentifierAsRestorationIdentifier="YES" id="pHU-MU-wJ7" customClass="ToolslistViewController" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="2hJ-Nj-WK0"/>
+                        <viewControllerLayoutGuide type="bottom" id="NOX-Oo-aNI"/>
+                    </layoutGuides>
                     <view key="view" contentMode="scaleToFill" id="MuK-Mj-PtU">
                         <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="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="10" sectionFooterHeight="10" translatesAutoresizingMaskIntoConstraints="NO" id="t4w-1J-ZSQ">
-                                <rect key="frame" x="0.0" y="0.0" width="375" height="647"/>
-                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                            <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="10" sectionFooterHeight="10" translatesAutoresizingMaskIntoConstraints="NO" id="t4w-1J-ZSQ">
+                                <rect key="frame" x="0.0" y="20" width="375" height="598"/>
                                 <color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.95686274510000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                 <prototypes>
                                     <tableViewCell contentMode="scaleToFill" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="tools" textLabel="tg4-Ox-UsK" style="IBUITableViewCellStyleDefault" id="tq0-wS-k0Y">
@@ -299,7 +314,12 @@
                             </tableView>
                         </subviews>
                         <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                        <viewLayoutGuide key="safeArea" id="E1B-PW-qvx"/>
+                        <constraints>
+                            <constraint firstItem="NOX-Oo-aNI" firstAttribute="top" secondItem="t4w-1J-ZSQ" secondAttribute="bottom" id="1Lq-O9-mK3"/>
+                            <constraint firstAttribute="trailing" secondItem="t4w-1J-ZSQ" secondAttribute="trailing" id="6OB-Jq-6e2"/>
+                            <constraint firstItem="t4w-1J-ZSQ" firstAttribute="leading" secondItem="MuK-Mj-PtU" secondAttribute="leading" id="82y-jF-M3t"/>
+                            <constraint firstItem="t4w-1J-ZSQ" firstAttribute="top" secondItem="2hJ-Nj-WK0" secondAttribute="bottom" id="DNZ-Xt-6Yr"/>
+                        </constraints>
                     </view>
                     <tabBarItem key="tabBarItem" title="Tools" image="tools" id="fJu-Gg-e2f"/>
                     <navigationItem key="navigationItem" title="Tools" id="Cr5-do-P06"/>
@@ -313,11 +333,14 @@
         <scene sceneID="Hkt-tV-iQK">
             <objects>
                 <viewController storyboardIdentifier="MyPanel" title="My" useStoryboardIdentifierAsRestorationIdentifier="YES" id="7ee-Fj-xyv" customClass="MylistViewController" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="xJB-Df-Nnk"/>
+                        <viewControllerLayoutGuide type="bottom" id="Z0g-Fz-l0r"/>
+                    </layoutGuides>
                     <view key="view" contentMode="scaleToFill" id="ggR-kU-S5e">
                         <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                        <viewLayoutGuide key="safeArea" id="wTp-MQ-ZOg"/>
                     </view>
                     <tabBarItem key="tabBarItem" title="My" id="3ya-sj-Vib"/>
                     <simulatedTabBarMetrics key="simulatedBottomBarMetrics"/>

+ 15 - 8
Apex Mobile/Apex Mobile/OrderHistoryViewController.m

@@ -29,6 +29,13 @@ static const int delta = 7;
     [super viewDidLoad];
     // Do any additional setup after loading the view.
     
+    if (@available(iOS 11,*)) {
+        self.shipTableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
+    } else {
+        self.automaticallyAdjustsScrollViewInsets = NO;
+    }
+
+    
     [self configureTableView];
     [self loadData];
 }
@@ -74,14 +81,14 @@ static const int delta = 7;
     
     [self.shipTableView registerNib:[UINib nibWithNibName:@"ShippingStatusCell" bundle:nil] forCellReuseIdentifier:HISTORY_SHIP_CELL_IDENTIFIER];
     
-    
-    self.refreshHeader = [[JLRefreshHeader alloc] init];
-    self.refreshHeader.refreshDelegate = self;
-    self.shipTableView.jl_header = self.refreshHeader;
-    
-    self.refreshFooter = [[JLRefreshFooter alloc] init];
-    self.refreshFooter.refreshDelegate = self;
-    self.shipTableView.jl_footer = self.refreshFooter;
+
+//    self.refreshHeader = [[JLRefreshHeader alloc] init];
+//    self.refreshHeader.refreshDelegate = self;
+//    self.shipTableView.jl_header = self.refreshHeader;
+//
+//    self.refreshFooter = [[JLRefreshFooter alloc] init];
+//    self.refreshFooter.refreshDelegate = self;
+//    self.shipTableView.jl_footer = self.refreshFooter;
 }
 
 #pragma mark - Load Data

+ 1 - 1
Apex Mobile/Apex Mobile/RootViewController.m

@@ -23,7 +23,7 @@
 
 - (void)viewDidLoad {
     [super viewDidLoad];
-    
+    self.automaticallyAdjustsScrollViewInsets = NO;
 //    self.navigationItem.navi
 //     [self.navigationController setNavigationBarHidden:YES animated:YES];
     

+ 12 - 9
Apex Mobile/Apex Mobile/ShipSearch.storyboard

@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
     <device id="retina4_7" orientation="portrait">
         <adaptation id="fullscreen"/>
     </device>
     <dependencies>
         <deployment identifier="iOS"/>
         <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13527"/>
-        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <capability name="Alignment constraints with different attributes" minToolsVersion="5.1"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <scenes>
@@ -14,6 +14,10 @@
         <scene sceneID="vXF-J2-qgu">
             <objects>
                 <viewController storyboardIdentifier="ShipSearchController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="hfn-xJ-pdm" customClass="ShipSearchController" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="qUd-Np-XfW"/>
+                        <viewControllerLayoutGuide type="bottom" id="LMb-ts-Ppd"/>
+                    </layoutGuides>
                     <view key="view" contentMode="scaleToFill" id="7Ur-fK-9cR">
                         <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@@ -43,15 +47,14 @@
                         </subviews>
                         <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                         <constraints>
-                            <constraint firstItem="1MM-Qg-f3V" firstAttribute="leading" secondItem="FT7-lQ-k3y" secondAttribute="leading" id="8ks-s2-gFp"/>
-                            <constraint firstItem="brK-bP-B3P" firstAttribute="leading" secondItem="FT7-lQ-k3y" secondAttribute="leading" id="FX9-m2-AtS"/>
+                            <constraint firstItem="1MM-Qg-f3V" firstAttribute="leading" secondItem="7Ur-fK-9cR" secondAttribute="leading" id="8ks-s2-gFp"/>
+                            <constraint firstItem="brK-bP-B3P" firstAttribute="leading" secondItem="7Ur-fK-9cR" secondAttribute="leading" id="FX9-m2-AtS"/>
                             <constraint firstItem="1MM-Qg-f3V" firstAttribute="top" secondItem="brK-bP-B3P" secondAttribute="bottom" id="M9X-Kq-qNQ"/>
-                            <constraint firstItem="FT7-lQ-k3y" firstAttribute="trailing" secondItem="1MM-Qg-f3V" secondAttribute="trailing" id="boI-D3-yuu"/>
-                            <constraint firstItem="brK-bP-B3P" firstAttribute="trailing" secondItem="FT7-lQ-k3y" secondAttribute="trailing" id="dpb-nC-P2h"/>
-                            <constraint firstItem="FT7-lQ-k3y" firstAttribute="bottom" secondItem="1MM-Qg-f3V" secondAttribute="bottom" id="nhX-XE-chI"/>
-                            <constraint firstItem="brK-bP-B3P" firstAttribute="top" secondItem="FT7-lQ-k3y" secondAttribute="top" id="zSZ-lR-jSt"/>
+                            <constraint firstAttribute="trailing" secondItem="1MM-Qg-f3V" secondAttribute="trailing" id="boI-D3-yuu"/>
+                            <constraint firstItem="brK-bP-B3P" firstAttribute="trailing" secondItem="7Ur-fK-9cR" secondAttribute="trailing" id="dpb-nC-P2h"/>
+                            <constraint firstItem="LMb-ts-Ppd" firstAttribute="top" secondItem="1MM-Qg-f3V" secondAttribute="bottom" id="nhX-XE-chI"/>
+                            <constraint firstItem="brK-bP-B3P" firstAttribute="top" secondItem="qUd-Np-XfW" secondAttribute="bottom" id="zSZ-lR-jSt"/>
                         </constraints>
-                        <viewLayoutGuide key="safeArea" id="FT7-lQ-k3y"/>
                     </view>
                     <connections>
                         <outlet property="searchBar" destination="brK-bP-B3P" id="av0-76-gnh"/>

+ 7 - 0
Apex Mobile/Apex Mobile/ShipSearchController.m

@@ -32,6 +32,13 @@
     [super viewDidLoad];
     // Do any additional setup after loading the view.
     
+    if (@available(iOS 11,*)) {
+        self.searchTable.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
+    } else {
+        self.automaticallyAdjustsScrollViewInsets = NO;
+    }
+
+    
     [self configureNavigationBar];
     [self configureTableView];
 }

+ 1 - 1
Apex Mobile/Apex Mobile/ShippingStatusCell.xib

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
     <device id="retina4_7" orientation="portrait">
         <adaptation id="fullscreen"/>
     </device>

+ 27 - 0
Apex Mobile/Apex Mobile/StaticModelistViewController.m

@@ -11,6 +11,8 @@
 #import "Constant.h"
 
 @interface StaticModelistViewController ()
+@property (strong, nonatomic) IBOutlet NSLayoutConstraint *topLayout;
+@property (strong, nonatomic) IBOutlet NSLayoutConstraint *bottomLayout;
 
 @end
 
@@ -28,10 +30,35 @@
 - (void)viewDidLoad {
     [super viewDidLoad];
     
+
+    [self.view removeConstraint:self.topLayout];
+    [self.view removeConstraint:self.bottomLayout];
+    
+    self.topLayout = [NSLayoutConstraint constraintWithItem:self.modeTableView
+                                                  attribute:NSLayoutAttributeTop
+                                                  relatedBy:NSLayoutRelationEqual
+                                                     toItem:self.topLayoutGuide
+                                                  attribute:NSLayoutAttributeBottom
+                                                 multiplier:1
+                                                   constant:0];
+    [self.view addConstraint:self.topLayout];
+    
+    self.bottomLayout = [NSLayoutConstraint constraintWithItem:self.modeTableView
+                                                  attribute:NSLayoutAttributeBottom
+                                                  relatedBy:NSLayoutRelationEqual
+                                                     toItem:self.bottomLayoutGuide
+                                                  attribute:NSLayoutAttributeTop
+                                                 multiplier:1
+                                                   constant:0];
+    [self.view addConstraint:self.bottomLayout];
+    
+    [self.view layoutIfNeeded];
+    
     
     // Do any additional setup after loading the view.
 }
 
+
 - (void)didReceiveMemoryWarning {
     [super didReceiveMemoryWarning];
     // Dispose of any resources that can be recreated.

+ 11 - 10
Apex Mobile/Apex Mobile/StaticModelistViewController.xib

@@ -1,26 +1,28 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
     <device id="retina4_7" orientation="portrait">
         <adaptation id="fullscreen"/>
     </device>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
-        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13527"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="StaticModelistViewController">
             <connections>
+                <outlet property="bottomLayout" destination="tIU-9p-bOr" id="l45-Nj-kDs"/>
+                <outlet property="modeTableView" destination="UNo-Vl-w2c" id="pRp-uq-8jQ"/>
+                <outlet property="topLayout" destination="7zY-rP-4kw" id="YGV-MM-xoZ"/>
                 <outlet property="view" destination="iN0-l3-epB" id="HiP-zr-PvK"/>
             </connections>
         </placeholder>
         <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
-        <view contentMode="scaleToFill" id="iN0-l3-epB">
+        <view contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="iN0-l3-epB">
             <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
             <subviews>
-                <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="grouped" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="UNo-Vl-w2c">
+                <tableView clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" alwaysBounceVertical="YES" style="grouped" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" contentViewInsetsToSafeArea="NO" translatesAutoresizingMaskIntoConstraints="NO" id="UNo-Vl-w2c">
                     <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
                     <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
                     <connections>
@@ -31,12 +33,11 @@
             </subviews>
             <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
             <constraints>
-                <constraint firstItem="vUN-kp-3ea" firstAttribute="bottom" secondItem="UNo-Vl-w2c" secondAttribute="bottom" id="2pE-c5-uHL"/>
-                <constraint firstItem="vUN-kp-3ea" firstAttribute="top" secondItem="UNo-Vl-w2c" secondAttribute="top" constant="20" id="3Lz-3j-5fO"/>
-                <constraint firstItem="UNo-Vl-w2c" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" id="NBS-gG-tG8"/>
-                <constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="UNo-Vl-w2c" secondAttribute="trailing" id="h3p-Ej-Qi2"/>
+                <constraint firstItem="UNo-Vl-w2c" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="1yS-mV-3zz"/>
+                <constraint firstItem="UNo-Vl-w2c" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="7zY-rP-4kw"/>
+                <constraint firstItem="UNo-Vl-w2c" firstAttribute="trailing" secondItem="iN0-l3-epB" secondAttribute="trailing" id="83A-Xr-Udp"/>
+                <constraint firstItem="UNo-Vl-w2c" firstAttribute="bottom" secondItem="iN0-l3-epB" secondAttribute="bottom" id="tIU-9p-bOr"/>
             </constraints>
-            <viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
         </view>
         <tabBarItem title="Item" image="home" id="rSy-or-zsr"/>
     </objects>