[iOS] Fixed bottom view position for the landscape mode

This commit is contained in:
Zoia Pribytkova 2019-08-07 16:12:44 +03:00 committed by Aleksey Belousov
parent e325520808
commit 1f1b5f0d79
2 changed files with 14 additions and 10 deletions

View file

@ -25,16 +25,6 @@
<rect key="frame" x="0.0" y="0.0" width="320" height="96"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="tRj-9k-ciR">
<rect key="frame" x="0.0" y="-44" width="320" height="44"/>
<color key="backgroundColor" red="0.1215686275" green="0.59999999999999998" blue="0.32156862749999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="QYY-96-CiC"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="primary"/>
</userDefinedRuntimeAttributes>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ib5-qh-Cmo">
<rect key="frame" x="0.0" y="48" width="320" height="48"/>
<subviews>
@ -60,6 +50,16 @@
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="secondary"/>
</userDefinedRuntimeAttributes>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="tRj-9k-ciR">
<rect key="frame" x="0.0" y="-44" width="320" height="44"/>
<color key="backgroundColor" red="0.1215686275" green="0.59999999999999998" blue="0.32156862749999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="QYY-96-CiC"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="primary"/>
</userDefinedRuntimeAttributes>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="WqK-Yb-PmP" customClass="SolidTouchView">
<rect key="frame" x="0.0" y="0.0" width="320" height="48"/>
<subviews>

View file

@ -81,6 +81,10 @@ typedef NS_ENUM(NSUInteger, MWMBottomMenuViewCell) {
_mapViewController = controller;
_delegate = delegate;
[controller addChildViewController:self];
self.view.autoresizingMask = (UIViewAutoresizingFlexibleWidth |
UIViewAutoresizingFlexibleTopMargin |
UIViewAutoresizingFlexibleBottomMargin |
UIViewAutoresizingFlexibleHeight);
[controller.controlsView addSubview:self.view];
[controller.view layoutIfNeeded];
}