[iphonex] [ios] Updated discovery controller layout.

This commit is contained in:
Ilya Grechuhin 2017-12-26 13:12:42 +03:00 committed by Roman Kuznetsov
parent c5475c554f
commit d2f53a6f53
4 changed files with 13 additions and 10 deletions

View file

@ -29,7 +29,7 @@
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackSecondaryText"/>
</userDefinedRuntimeAttributes>
</label>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="5kQ-Mc-ZYQ" customClass="MWMDiscoveryCollectionView">
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="5kQ-Mc-ZYQ" customClass="MWMDiscoveryCollectionView">
<rect key="frame" x="0.0" y="48.5" width="375" height="129"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
@ -45,7 +45,7 @@
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="zLg-Ze-Eru" firstAttribute="leading" secondItem="qeQ-5M-VVb" secondAttribute="leading" constant="16" id="2hQ-HG-sHj"/>
<constraint firstItem="zLg-Ze-Eru" firstAttribute="leading" secondItem="qeQ-5M-VVb" secondAttribute="leadingMargin" id="2hQ-HG-sHj"/>
<constraint firstItem="zLg-Ze-Eru" firstAttribute="top" secondItem="qeQ-5M-VVb" secondAttribute="top" constant="12" id="3Ut-Hs-zpi"/>
<constraint firstItem="5kQ-Mc-ZYQ" firstAttribute="top" secondItem="zLg-Ze-Eru" secondAttribute="bottom" constant="12" id="4f5-Um-KLw"/>
<constraint firstAttribute="bottom" secondItem="5kQ-Mc-ZYQ" secondAttribute="bottom" id="84B-tR-LtW"/>

View file

@ -6,15 +6,16 @@
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="DiscoveryViatorCollectionHolderCell" rowHeight="290" id="N8u-E2-CUY" customClass="MWMDiscoveryViatorCollectionHolderCell">
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="none" indentationWidth="10" reuseIdentifier="DiscoveryViatorCollectionHolderCell" rowHeight="290" id="N8u-E2-CUY" customClass="MWMDiscoveryViatorCollectionHolderCell">
<rect key="frame" x="0.0" y="0.0" width="375" height="266"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="N8u-E2-CUY" id="e4C-El-6DW">
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="N8u-E2-CUY" id="e4C-El-6DW">
<rect key="frame" x="0.0" y="0.0" width="375" height="265.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
@ -28,7 +29,7 @@
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="medium14"/>
</userDefinedRuntimeAttributes>
</label>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="kj2-f7-U6l" customClass="MWMDiscoveryCollectionView">
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="kj2-f7-U6l" customClass="MWMDiscoveryCollectionView">
<rect key="frame" x="0.0" y="48" width="375" height="218"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
@ -61,8 +62,8 @@
<constraint firstItem="kj2-f7-U6l" firstAttribute="top" secondItem="03p-rn-MYs" secondAttribute="bottom" priority="750" constant="8" id="IkN-tO-5xe"/>
<constraint firstItem="kj2-f7-U6l" firstAttribute="leading" secondItem="e4C-El-6DW" secondAttribute="leading" id="J8s-Qp-gEk"/>
<constraint firstAttribute="trailing" secondItem="kj2-f7-U6l" secondAttribute="trailing" id="JLb-D7-pec"/>
<constraint firstAttribute="trailing" secondItem="03p-rn-MYs" secondAttribute="trailing" constant="12" id="T0k-Qr-bVb"/>
<constraint firstItem="53P-tj-1hk" firstAttribute="leading" secondItem="e4C-El-6DW" secondAttribute="leading" constant="16" id="Zeg-My-dC4"/>
<constraint firstAttribute="trailingMargin" secondItem="03p-rn-MYs" secondAttribute="trailing" constant="-4" id="T0k-Qr-bVb"/>
<constraint firstItem="53P-tj-1hk" firstAttribute="leading" secondItem="e4C-El-6DW" secondAttribute="leadingMargin" id="Zeg-My-dC4"/>
<constraint firstAttribute="bottom" secondItem="kj2-f7-U6l" secondAttribute="bottom" constant="-0.5" id="uvZ-hP-6am"/>
<constraint firstItem="03p-rn-MYs" firstAttribute="leading" secondItem="53P-tj-1hk" secondAttribute="trailing" constant="12" id="zmd-wA-rqz"/>
</constraints>

View file

@ -22,7 +22,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="grouped" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="mUK-tO-itf">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<rect key="frame" x="0.0" y="20" width="375" height="647"/>
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="pressBackground"/>
@ -31,10 +31,10 @@
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="mUK-tO-itf" secondAttribute="bottom" id="5cL-Te-70Z"/>
<constraint firstItem="eY3-Qh-n8a" firstAttribute="bottom" secondItem="mUK-tO-itf" secondAttribute="bottom" id="5cL-Te-70Z"/>
<constraint firstItem="mUK-tO-itf" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="SFd-I6-gDI"/>
<constraint firstAttribute="trailing" secondItem="mUK-tO-itf" secondAttribute="trailing" id="TAe-XS-STX"/>
<constraint firstItem="mUK-tO-itf" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="gRc-X1-7hY"/>
<constraint firstItem="mUK-tO-itf" firstAttribute="top" secondItem="eY3-Qh-n8a" secondAttribute="top" id="gRc-X1-7hY"/>
</constraints>
<viewLayoutGuide key="safeArea" id="eY3-Qh-n8a"/>
<userDefinedRuntimeAttributes>

View file

@ -96,6 +96,8 @@ string GetDistance(m2::PointD const & from, m2::PointD const & to)
tableView.dataSource = self;
tableView.rowHeight = UITableViewAutomaticDimension;
tableView.estimatedRowHeight = 218;
if (@available(iOS 11.0, *))
tableView.insetsContentViewsToSafeArea = NO;
[self registerCells];
}
return self;