diff options
author | Sergey Yershov <syershov@maps.me> | 2016-11-24 16:13:30 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-24 16:13:30 +0300 |
commit | d0de17010e54e7c3dfdfc04e93f029df2588d00c (patch) | |
tree | 824f2205e2858bbdeb00d780a154886f9d5eea8d /iphone/Maps/Classes/CustomViews | |
parent | d1be6352cc7a2a9520fedac8821569291d47f236 (diff) | |
parent | 75fb1ac431fc312db1fa8891bfd8996707b0b74d (diff) |
Merge pull request #4796 from igrechuhin/MAPSME-3075
[MAPSME-3075] [ios] Refactored map buttons layout.
Diffstat (limited to 'iphone/Maps/Classes/CustomViews')
15 files changed, 161 insertions, 89 deletions
diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/APIBar/MWMMapViewControlsCommon.h b/iphone/Maps/Classes/CustomViews/MapViewControls/APIBar/MWMMapViewControlsCommon.h index e3e3da85b3..7f53f253fc 100644 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/APIBar/MWMMapViewControlsCommon.h +++ b/iphone/Maps/Classes/CustomViews/MapViewControls/APIBar/MWMMapViewControlsCommon.h @@ -7,4 +7,4 @@ static inline NSTimeInterval framesDuration(NSTimeInterval const framesCount) return kFrameDuration * framesCount; } -static CGFloat const kViewControlsOffsetToBounds = 4.0; +static CGFloat const kViewControlsOffsetToBounds = 6; diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/BottomMenu/MWMBottomMenuView.mm b/iphone/Maps/Classes/CustomViews/MapViewControls/BottomMenu/MWMBottomMenuView.mm index 6e53c6f3a7..7ec9edda7c 100644 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/BottomMenu/MWMBottomMenuView.mm +++ b/iphone/Maps/Classes/CustomViews/MapViewControls/BottomMenu/MWMBottomMenuView.mm @@ -4,6 +4,7 @@ #import "MWMBottomMenuViewController.h" #import "MWMButton.h" #import "MWMRouter.h" +#import "MWMSideButtons.h" #import "MapsAppDelegate.h" #import "UIButton+RuntimeAttributes.h" #import "UIColor+MapsMeColor.h" @@ -159,12 +160,19 @@ CGFloat constexpr kTimeWidthRegular = 128; completion:^(BOOL finished) { [self updateVisibility]; }]; - ((EAGLView *)self.superview).widgetsManager.bottomBound = self.mainButtonsHeight.constant; + [self noftifyBottomBoundChange]; [self updateFonts]; [self updateHeightProfile]; [super layoutSubviews]; } +- (void)noftifyBottomBoundChange +{ + CGFloat const height = self.superview.height - self.mainButtonsHeight.constant; + [MWMMapWidgets widgetsManager].bottomBound = height; + [MWMSideButtons buttons].bottomBound = height; +} + - (void)updateAlphaAndColor { switch (self.state) diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/BottomMenu/MWMBottomMenuViewController.h b/iphone/Maps/Classes/CustomViews/MapViewControls/BottomMenu/MWMBottomMenuViewController.h index 78f5fdd509..457e86bbbf 100644 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/BottomMenu/MWMBottomMenuViewController.h +++ b/iphone/Maps/Classes/CustomViews/MapViewControls/BottomMenu/MWMBottomMenuViewController.h @@ -17,10 +17,12 @@ @interface MWMBottomMenuViewController : UIViewController<MWMNavigationDashboardInfoProtocol> ++ (MWMBottomMenuViewController *)controller; + @property(nonatomic) MWMBottomMenuState state; @property(weak, nonatomic) IBOutlet MWMButton * p2pButton; @property(nonatomic) CGFloat leftBound; -@property(nonatomic, readonly) CGFloat mainButtonsHeight; +@property(nonatomic, readonly) CGFloat mainStateHeight; - (instancetype)initWithParentController:(MapViewController *)controller delegate:(id<MWMBottomMenuControllerProtocol>)delegate; diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/BottomMenu/MWMBottomMenuViewController.mm b/iphone/Maps/Classes/CustomViews/MapViewControls/BottomMenu/MWMBottomMenuViewController.mm index 847785102c..d29c8ce891 100644 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/BottomMenu/MWMBottomMenuViewController.mm +++ b/iphone/Maps/Classes/CustomViews/MapViewControls/BottomMenu/MWMBottomMenuViewController.mm @@ -52,6 +52,12 @@ typedef NS_ENUM(NSUInteger, MWMBottomMenuViewCell) { MWMBottomMenuViewCellCount }; +@interface MWMMapViewControlsManager () + +@property(nonatomic) MWMBottomMenuViewController * menuController; + +@end + @interface MWMBottomMenuViewController ()<UICollectionViewDataSource, UICollectionViewDelegate> @property(weak, nonatomic) MapViewController * controller; @@ -87,10 +93,17 @@ typedef NS_ENUM(NSUInteger, MWMBottomMenuViewCell) { @property(weak, nonatomic) IBOutlet NSLayoutConstraint * routingProgress; @property(weak, nonatomic) IBOutlet MWMButton * ttsSoundButton; +@property(weak, nonatomic) IBOutlet NSLayoutConstraint * mainButtonsHeight; + @end @implementation MWMBottomMenuViewController ++ (MWMBottomMenuViewController *)controller +{ + return [MWMMapViewControlsManager manager].menuController; +} + - (instancetype)initWithParentController:(MapViewController *)controller delegate:(id<MWMBottomMenuControllerProtocol>)delegate { @@ -577,4 +590,5 @@ typedef NS_ENUM(NSUInteger, MWMBottomMenuViewCell) { [self ttsButtonStatusChanged:nil]; } +- (CGFloat)mainStateHeight { return self.mainButtonsHeight.constant; } @end diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/BottomMenu/MWMBottomMenuViewController.xib b/iphone/Maps/Classes/CustomViews/MapViewControls/BottomMenu/MWMBottomMenuViewController.xib index 58565e2d2e..9475e04400 100644 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/BottomMenu/MWMBottomMenuViewController.xib +++ b/iphone/Maps/Classes/CustomViews/MapViewControls/BottomMenu/MWMBottomMenuViewController.xib @@ -1,7 +1,11 @@ <?xml version="1.0" encoding="UTF-8"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11201" systemVersion="16A323" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES"> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11542" systemVersion="16B2555" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES"> + <device id="retina4_7" orientation="portrait"> + <adaptation id="fullscreen"/> + </device> <dependencies> - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11161"/> + <deployment identifier="iOS"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11524"/> <capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> @@ -14,6 +18,7 @@ <outlet property="distanceLegendLabel" destination="5ad-tg-al9" id="KFC-sq-rNA"/> <outlet property="distanceWithLegendLabel" destination="LOZ-cm-r9V" id="H0T-Dh-0Q0"/> <outlet property="estimateLabel" destination="EQy-vz-gyi" id="gJq-I7-TaC"/> + <outlet property="mainButtonsHeight" destination="HtR-j8-Qpc" id="uZ3-Im-taa"/> <outlet property="p2pButton" destination="xQ0-ZK-UXk" id="LdY-Rt-Dh4"/> <outlet property="progressView" destination="qvF-jY-5Gi" id="vS9-Cr-K1S"/> <outlet property="routingInfoPageControl" destination="7hO-Gk-BGJ" id="gDI-Bk-PCb"/> @@ -32,8 +37,10 @@ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <subviews> <view opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="kbJ-If-gUR" userLabel="MainButtons"> + <rect key="frame" x="0.0" y="0.0" width="320" height="48"/> <subviews> <button opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="249" horizontalCompressionResistancePriority="751" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="IzQ-aQ-aPH" userLabel="Search" customClass="MWMButton"> + <rect key="frame" x="0.0" y="0.0" width="60" height="48"/> <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/> <accessibility key="accessibilityConfiguration" identifier="searchButton"/> <constraints> @@ -48,6 +55,7 @@ </connections> </button> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="xQ0-ZK-UXk" userLabel="P2P" customClass="MWMButton"> + <rect key="frame" x="88" y="0.0" width="60" height="48"/> <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/> <accessibility key="accessibilityConfiguration" identifier="p2pButton"/> <constraints> @@ -62,6 +70,7 @@ </connections> </button> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qVh-dm-DDH" userLabel="Bookmarks" customClass="MWMButton"> + <rect key="frame" x="176" y="0.0" width="60" height="48"/> <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/> <accessibility key="accessibilityConfiguration" identifier="bookmarksButton"/> <constraints> @@ -76,15 +85,20 @@ </connections> </button> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="c75-ZF-hKn"> + <rect key="frame" x="0.0" y="0.0" width="320" height="48"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="600" text="33 мин • 7.0 км" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="EQy-vz-gyi"> + <rect key="frame" x="16" y="14" width="122" height="21"/> <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> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4Xc-Kl-hAm"> + <rect key="frame" x="154" y="12" width="54" height="24"/> <subviews> - <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="150" verticalHuggingPriority="150" horizontalCompressionResistancePriority="240" verticalCompressionResistancePriority="240" translatesAutoresizingMaskIntoConstraints="NO" id="ViI-p6-hUf"/> + <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="150" verticalHuggingPriority="150" horizontalCompressionResistancePriority="240" verticalCompressionResistancePriority="240" translatesAutoresizingMaskIntoConstraints="NO" id="ViI-p6-hUf"> + <rect key="frame" x="0.0" y="0.0" width="54" height="24"/> + </imageView> </subviews> <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/> <constraints> @@ -95,14 +109,17 @@ </constraints> </view> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="nD5-wx-7Ui"> + <rect key="frame" x="16" y="24" width="50" height="12"/> <subviews> <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_elevation" translatesAutoresizingMaskIntoConstraints="NO" id="FpX-u9-FuR"> + <rect key="frame" x="0.0" y="0.0" width="10" height="12"/> <constraints> <constraint firstAttribute="height" constant="12" id="Wup-Xg-5Ce"/> <constraint firstAttribute="width" constant="10" id="rVv-JG-SyM"/> </constraints> </imageView> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="270" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dVz-cc-LUM"> + <rect key="frame" x="14" y="-2" width="36" height="17"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/> <nil key="textColor"/> <nil key="highlightedColor"/> @@ -123,6 +140,7 @@ </constraints> </view> <button hidden="YES" clipsSubviews="YES" contentMode="scaleToFill" horizontalHuggingPriority="501" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="tailTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="pLD-sZ-ejH" userLabel="Go" customClass="MWMStartButton"> + <rect key="frame" x="224" y="0.0" width="96" height="48"/> <accessibility key="accessibilityConfiguration" identifier="goButton"/> <constraints> <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="96" id="ZHw-Ha-INX"/> @@ -144,13 +162,16 @@ </connections> </button> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="UhW-en-7qq"> + <rect key="frame" x="0.0" y="0.0" width="72" height="48"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="azs-RS-4KE"> + <rect key="frame" x="36" y="4" width="0.0" height="0.0"/> <fontDescription key="fontDescription" type="boldSystem" pointSize="22"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Y2P-la-daO"> + <rect key="frame" x="36" y="4" width="0.0" height="0.0"/> <fontDescription key="fontDescription" type="boldSystem" pointSize="22"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> @@ -159,6 +180,7 @@ </userDefinedRuntimeAttributes> </label> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="P9v-a6-EaA"> + <rect key="frame" x="36" y="11" width="0.0" height="0.0"/> <fontDescription key="fontDescription" type="boldSystem" pointSize="12"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> @@ -180,13 +202,16 @@ </constraints> </view> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Z68-6z-5Ph"> + <rect key="frame" x="104" y="0.0" width="112" height="48"/> <subviews> <pageControl opaque="NO" contentMode="scaleToFill" verticalCompressionResistancePriority="100" contentHorizontalAlignment="center" contentVerticalAlignment="center" numberOfPages="2" translatesAutoresizingMaskIntoConstraints="NO" id="7hO-Gk-BGJ"> + <rect key="frame" x="45" y="4" width="23" height="13"/> <constraints> <constraint firstAttribute="height" constant="13" id="a7i-03-Hg1"/> </constraints> </pageControl> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="jSU-Ns-SpQ"> + <rect key="frame" x="56" y="4" width="0.0" height="0.0"/> <fontDescription key="fontDescription" type="boldSystem" pointSize="22"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> @@ -205,13 +230,16 @@ </constraints> </view> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="mab-rl-ueg"> + <rect key="frame" x="248" y="0.0" width="72" height="48"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="LOZ-cm-r9V"> + <rect key="frame" x="36" y="4" width="0.0" height="0.0"/> <fontDescription key="fontDescription" type="boldSystem" pointSize="22"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="LBZ-kD-25J"> + <rect key="frame" x="36" y="4" width="0.0" height="0.0"/> <fontDescription key="fontDescription" type="boldSystem" pointSize="22"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> @@ -220,6 +248,7 @@ </userDefinedRuntimeAttributes> </label> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5ad-tg-al9"> + <rect key="frame" x="36" y="11" width="0.0" height="0.0"/> <fontDescription key="fontDescription" type="boldSystem" pointSize="12"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> @@ -240,8 +269,10 @@ </constraints> </view> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qvF-jY-5Gi"> + <rect key="frame" x="0.0" y="44" width="320" height="4"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="xqD-Zl-BRc"> + <rect key="frame" x="0.0" y="0.0" width="0.0" height="4"/> <color key="backgroundColor" red="0.11764705882352941" green="0.58823529411764708" blue="0.94117647058823528" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="width" id="pSf-au-FVR"/> @@ -260,14 +291,17 @@ </constraints> </view> <button contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="3oJ-Rv-JS7" userLabel="ToggleInfo"> + <rect key="frame" x="0.0" y="0.0" width="320" height="48"/> <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/> <connections> <action selector="toggleInfoTouchUpInside" destination="-1" eventType="touchUpInside" id="kuP-Ue-Syq"/> </connections> </button> <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="iYj-za-A2N" userLabel="Taxi View"> + <rect key="frame" x="0.0" y="0.0" width="224" height="48"/> <subviews> <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" pagingEnabled="YES" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="pUj-hX-AzZ" customClass="MWMTaxiCollectionView"> + <rect key="frame" x="0.0" y="0.0" width="224" height="48"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> <collectionViewFlowLayout key="collectionViewLayout" scrollDirection="horizontal" minimumLineSpacing="0.0" minimumInteritemSpacing="0.0" id="7nN-GY-zbW" customClass="MWMTaxiCollectionLayout"> <size key="itemSize" width="50" height="50"/> @@ -335,6 +369,7 @@ </userDefinedRuntimeAttributes> </view> <button opaque="NO" contentMode="center" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="YLY-C4-SBu" userLabel="Menu" customClass="MWMButton"> + <rect key="frame" x="260" y="0.0" width="60" height="48"/> <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/> <accessibility key="accessibilityConfiguration" identifier="menuButton"/> <constraints> @@ -349,6 +384,7 @@ </connections> </button> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="WLn-2O-Ivv" userLabel="DownloadBadge"> + <rect key="frame" x="293" y="11" width="10" height="10"/> <color key="backgroundColor" red="1" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="width" constant="10" id="ToN-Zr-4oh"/> @@ -391,6 +427,7 @@ </constraints> </view> <view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="nYy-JN-hGA" userLabel="Separator"> + <rect key="frame" x="0.0" y="48" width="320" height="1"/> <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.12" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="height" constant="1" id="Kgm-bO-O6Q"/> @@ -400,6 +437,7 @@ </userDefinedRuntimeAttributes> </view> <collectionView clipsSubviews="YES" contentMode="scaleToFill" bounces="NO" scrollEnabled="NO" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" delaysContentTouches="NO" bouncesZoom="NO" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="hSd-fM-qKd" userLabel="AdditionalButtons"> + <rect key="frame" x="0.0" y="49" width="320" height="148"/> <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="height" constant="148" id="fsD-HQ-mF9"/> @@ -411,8 +449,10 @@ </connections> </collectionView> <view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Z8y-bh-6dN"> + <rect key="frame" x="0.0" y="48" width="320" height="64"/> <subviews> <button opaque="NO" contentMode="center" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="o9v-sB-QHp" customClass="MWMButton"> + <rect key="frame" x="0.0" y="0.0" width="64" height="64"/> <constraints> <constraint firstAttribute="height" priority="750" constant="64" id="pvz-bi-FpY"/> <constraint firstAttribute="width" constant="64" id="q3s-yb-6lU"/> @@ -426,6 +466,7 @@ </connections> </button> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="q6M-3k-tKX" customClass="MWMButton"> + <rect key="frame" x="256" y="0.0" width="64" height="64"/> <constraints> <constraint firstAttribute="height" priority="750" constant="64" id="6Us-Z7-JyL"/> <constraint firstAttribute="width" constant="64" id="GtG-l1-K05"/> @@ -440,6 +481,7 @@ </connections> </button> <button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Kyc-p0-3HI" customClass="MWMStopButton"> + <rect key="frame" x="112" y="14" width="96" height="36"/> <color key="backgroundColor" red="1" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="96" id="aRk-9J-VLI"/> diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/MWMMapViewControlsManager.h b/iphone/Maps/Classes/CustomViews/MapViewControls/MWMMapViewControlsManager.h index a17e2ce56a..65c17505c7 100644 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/MWMMapViewControlsManager.h +++ b/iphone/Maps/Classes/CustomViews/MapViewControls/MWMMapViewControlsManager.h @@ -43,7 +43,6 @@ - (void)dismissPlacePage; - (void)showPlacePage:(place_page::Info const &)info; - (void)addPlace:(BOOL)isBusiness hasPoint:(BOOL)hasPoint point:(m2::PointD const &)point; -- (void)dragPlacePage:(CGRect)frame; #pragma mark - MWMNavigationDashboardManager diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/MWMMapViewControlsManager.mm b/iphone/Maps/Classes/CustomViews/MapViewControls/MWMMapViewControlsManager.mm index 1518b27cdb..8ca9600d89 100644 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/MWMMapViewControlsManager.mm +++ b/iphone/Maps/Classes/CustomViews/MapViewControls/MWMMapViewControlsManager.mm @@ -295,15 +295,6 @@ extern NSString * const kAlohalyticsTapEventKey; }]; } -#pragma mark - MWMPlacePageManager - -- (void)dragPlacePage:(CGRect)frame -{ - if (IPAD) - return; - [self.sideButtons setBottomBound:frame.origin.y]; -} - #pragma mark - MWMNavigationDashboardManager - (void)routePreviewDidChangeFrame:(CGRect)newFrame diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/SideButtons/MWMSideButtons.h b/iphone/Maps/Classes/CustomViews/MapViewControls/SideButtons/MWMSideButtons.h index 7ea4c78dc1..6a6a98c907 100644 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/SideButtons/MWMSideButtons.h +++ b/iphone/Maps/Classes/CustomViews/MapViewControls/SideButtons/MWMSideButtons.h @@ -4,6 +4,8 @@ @interface MWMSideButtons : NSObject ++ (MWMSideButtons *)buttons; + @property (nonatomic) BOOL zoomHidden; @property (nonatomic) BOOL hidden; diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/SideButtons/MWMSideButtons.mm b/iphone/Maps/Classes/CustomViews/MapViewControls/SideButtons/MWMSideButtons.mm index 7b2cae9a01..53cb77ede5 100644 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/SideButtons/MWMSideButtons.mm +++ b/iphone/Maps/Classes/CustomViews/MapViewControls/SideButtons/MWMSideButtons.mm @@ -1,6 +1,7 @@ #import "MWMSideButtons.h" #import "Common.h" #import "MWMButton.h" +#import "MWMMapViewControlsManager.h" #import "MWMRouter.h" #import "MWMSettings.h" #import "MWMSideButtonsView.h" @@ -33,6 +34,12 @@ NSArray<UIImage *> * animationImages(NSString * animationTemplate, NSUInteger im } } // namespace +@interface MWMMapViewControlsManager () + +@property(nonatomic) MWMSideButtons * sideButtons; + +@end + @interface MWMSideButtons () @property(nonatomic) IBOutlet MWMSideButtonsView * sideView; @@ -49,6 +56,7 @@ NSArray<UIImage *> * animationImages(NSString * animationTemplate, NSUInteger im @implementation MWMSideButtons ++ (MWMSideButtons *)buttons { return [MWMMapViewControlsManager manager].sideButtons; } - (instancetype)initWithParentView:(UIView *)view { self = [super init]; @@ -56,7 +64,7 @@ NSArray<UIImage *> * animationImages(NSString * animationTemplate, NSUInteger im { [[NSBundle mainBundle] loadNibNamed:kMWMSideButtonsViewNibName owner:self options:nil]; [view addSubview:self.sideView]; - [self.sideView layoutIfNeeded]; + [self.sideView setNeedsLayout]; self.sideView.topBound = 0.0; self.sideView.bottomBound = view.height; self.zoomSwipeEnabled = NO; diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/SideButtons/MWMSideButtonsView.mm b/iphone/Maps/Classes/CustomViews/MapViewControls/SideButtons/MWMSideButtonsView.mm index f35b6d7383..7ce0244347 100644 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/SideButtons/MWMSideButtonsView.mm +++ b/iphone/Maps/Classes/CustomViews/MapViewControls/SideButtons/MWMSideButtonsView.mm @@ -1,23 +1,25 @@ #import "MWMSideButtonsView.h" #import "Common.h" +#import "MWMBottomMenuViewController.h" #import "MWMButton.h" #import "MWMMapViewControlsCommon.h" +#include "base/math.hpp" + namespace { -CGFloat constexpr kZoomOutToLayoutPortraitOffset = 52; +CGFloat const kLocationButtonSpacingMax = 52; +CGFloat const kLocationButtonSpacingMin = 8; +CGFloat const kButtonsTopOffset = 82; +CGFloat const kButtonsBottomOffset = 6; } // namespace @interface MWMSideButtonsView () -@property(nonatomic) CGRect defaultBounds; - @property(weak, nonatomic) IBOutlet MWMButton * zoomIn; @property(weak, nonatomic) IBOutlet MWMButton * zoomOut; @property(weak, nonatomic) IBOutlet MWMButton * location; -@property(nonatomic) BOOL isPortrait; - @end @implementation MWMSideButtonsView @@ -25,28 +27,19 @@ CGFloat constexpr kZoomOutToLayoutPortraitOffset = 52; - (void)awakeFromNib { [super awakeFromNib]; - self.defaultBounds = self.bounds; self.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; } - (void)layoutSubviews { - BOOL const isPortrait = self.superview.width < self.superview.height; - if (self.isPortrait != isPortrait && self.superview) - { - self.isPortrait = isPortrait; - CGFloat const zoomOutToLayoutOffset = - IPAD || isPortrait ? kZoomOutToLayoutPortraitOffset : self.zoomOut.minY - self.zoomIn.maxY; - self.location.minY = self.zoomOut.maxY + zoomOutToLayoutOffset; - CGSize size = self.defaultBounds.size; - size.height = self.location.maxY; - self.defaultBounds.size = size; - } - self.bounds = self.defaultBounds; + CGFloat spacing = self.bottomBound - self.topBound - self.zoomOut.maxY - self.location.height; + spacing = my::clamp(spacing, kLocationButtonSpacingMin, kLocationButtonSpacingMax); + + self.location.minY = self.zoomOut.maxY + spacing; + self.bounds = {{}, {self.zoomOut.width, self.location.maxY}}; if (self.zoomHidden) self.height = self.location.height; self.location.maxY = self.height; - self.bottomBound = self.superview.height; [self layoutXPosition:self.hidden]; [self layoutYPosition]; @@ -71,7 +64,13 @@ CGFloat constexpr kZoomOutToLayoutPortraitOffset = 52; } } -- (void)layoutYPosition { self.maxY = self.bottomBound; } +- (void)layoutYPosition +{ + CGFloat const centerShift = (self.height - self.zoomIn.midY - self.zoomOut.midY) / 2; + self.midY = centerShift + self.superview.height / 2; + if (self.maxY > self.bottomBound) + self.maxY = self.bottomBound; +} - (void)fadeZoomButtonsShow:(BOOL)show { CGFloat const alpha = show ? 1.0 : 0.0; @@ -92,34 +91,36 @@ CGFloat constexpr kZoomOutToLayoutPortraitOffset = 52; - (void)animate { - [self layoutYPosition]; - - CGFloat const spaceLeft = self.bottomBound - self.topBound - - (equalScreenDimensions(self.topBound, 0.0) ? statusBarHeight() : 0.0); - BOOL const isZoomHidden = self.zoomIn.alpha == 0.0; - BOOL const willZoomHide = (self.defaultBounds.size.height > spaceLeft); - if (willZoomHide) - { - if (!isZoomHidden) - [self fadeZoomButtonsShow:NO]; - } - else - { - if (isZoomHidden) - [self fadeZoomButtonsShow:YES]; - } - BOOL const isLocationHidden = self.location.alpha == 0.0; - BOOL const willLocationHide = (self.location.height > spaceLeft); - if (willLocationHide) - { - if (!isLocationHidden) - [self fadeLocationButtonShow:NO]; - } - else - { - if (isLocationHidden) - [self fadeLocationButtonShow:YES]; - } + runAsyncOnMainQueue(^{ + [self layoutYPosition]; + + CGFloat const spaceLeft = self.bottomBound - self.topBound - + (equalScreenDimensions(self.topBound, 0.0) ? statusBarHeight() : 0.0); + BOOL const isZoomHidden = self.zoomIn.alpha == 0.0; + BOOL const willZoomHide = (self.location.maxY > spaceLeft); + if (willZoomHide) + { + if (!isZoomHidden) + [self fadeZoomButtonsShow:NO]; + } + else + { + if (isZoomHidden) + [self fadeZoomButtonsShow:YES]; + } + BOOL const isLocationHidden = self.location.alpha == 0.0; + BOOL const willLocationHide = (self.location.height > spaceLeft); + if (willLocationHide) + { + if (!isLocationHidden) + [self fadeLocationButtonShow:NO]; + } + else + { + if (isLocationHidden) + [self fadeLocationButtonShow:YES]; + } + }); } #pragma mark - Properties @@ -166,7 +167,7 @@ CGFloat constexpr kZoomOutToLayoutPortraitOffset = 52; [self animate]; } -- (CGFloat)topBound { return MAX(0.0, _topBound); } +- (CGFloat)topBound { return MAX(kButtonsTopOffset, _topBound); } @synthesize bottomBound = _bottomBound; - (void)setBottomBound:(CGFloat)bottomBound @@ -181,8 +182,9 @@ CGFloat constexpr kZoomOutToLayoutPortraitOffset = 52; { if (!self.superview) return _bottomBound; - CGFloat const bottomBoundLimit = (self.superview.height - self.defaultBounds.size.height) / 2; - return MIN(self.superview.height - bottomBoundLimit, _bottomBound); + CGFloat const spaceOccupiedByMenu = + self.superview.height - [MWMBottomMenuViewController controller].mainStateHeight; + return MIN(spaceOccupiedByMenu, _bottomBound) - kButtonsBottomOffset; } @end diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/MWMNavigationDashboardManager.h b/iphone/Maps/Classes/CustomViews/NavigationDashboard/MWMNavigationDashboardManager.h index c74acb562e..bc13eaebe5 100644 --- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/MWMNavigationDashboardManager.h +++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/MWMNavigationDashboardManager.h @@ -40,7 +40,6 @@ typedef NS_ENUM(NSUInteger, MWMNavigationDashboardState) { @property(weak, nonatomic, readonly) id<MWMNavigationDashboardManagerProtocol> delegate; @property(nonatomic) CGFloat topBound; @property(nonatomic) CGFloat leftBound; -@property(nonatomic, readonly) CGFloat extraCompassBottomOffset; @property(nonatomic, readonly) CGFloat leftHeight; @property(nonatomic, readonly) CGFloat rightHeight; diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/MWMNavigationDashboardManager.mm b/iphone/Maps/Classes/CustomViews/NavigationDashboard/MWMNavigationDashboardManager.mm index c068cb8126..46205fb0c9 100644 --- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/MWMNavigationDashboardManager.mm +++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/MWMNavigationDashboardManager.mm @@ -343,13 +343,6 @@ using TInfoDisplays = NSHashTable<__kindof TInfoDisplay>; return _entity; } -- (CGFloat)extraCompassBottomOffset -{ - if (!_navigationInfoView) - return 0; - return self.navigationInfoView.extraCompassBottomOffset; -} - - (void)setMapSearch { if (_navigationInfoView) diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/MWMNavigationInfoView.h b/iphone/Maps/Classes/CustomViews/NavigationDashboard/MWMNavigationInfoView.h index 9a797b0469..6e40c3ec6c 100644 --- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/MWMNavigationInfoView.h +++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/MWMNavigationInfoView.h @@ -15,7 +15,6 @@ enum class NavigationSearchState @interface MWMNavigationInfoView : UIView<MWMNavigationDashboardInfoProtocol> @property(nonatomic) CGFloat leftBound; -@property(nonatomic, readonly) CGFloat extraCompassBottomOffset; @property(nonatomic, readonly) CGFloat leftHeight; @property(nonatomic, readonly) CGFloat rightHeight; @property(nonatomic, readonly) NavigationSearchState searchState; diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/MWMNavigationInfoView.mm b/iphone/Maps/Classes/CustomViews/NavigationDashboard/MWMNavigationInfoView.mm index 9a333c21e7..ed5088a058 100644 --- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/MWMNavigationInfoView.mm +++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/MWMNavigationInfoView.mm @@ -25,7 +25,6 @@ CGFloat constexpr kSearchButtonsViewWidthPortrait = 200; CGFloat constexpr kSearchButtonsViewHeightLandscape = 56; CGFloat constexpr kSearchButtonsViewWidthLandscape = 286; CGFloat constexpr kSearchButtonsSideSize = 44; -CGFloat constexpr kDefaultExtraCompassBottomOffset = -10; NSTimeInterval constexpr kCollapseSearchTimeout = 5.0; @@ -394,10 +393,4 @@ BOOL defaultOrientation(CGSize const & size) [self layoutIfNeeded]; } -- (CGFloat)extraCompassBottomOffset -{ - return (defaultOrientation(self.frame.size) ? 0 : kSearchButtonsViewHeightLandscape) + - kDefaultExtraCompassBottomOffset; -} - @end diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/MWMNavigationInfoView.xib b/iphone/Maps/Classes/CustomViews/NavigationDashboard/MWMNavigationInfoView.xib index 675b1da95b..757ae4c77f 100644 --- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/MWMNavigationInfoView.xib +++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/MWMNavigationInfoView.xib @@ -1,8 +1,11 @@ <?xml version="1.0" encoding="UTF-8"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11201" systemVersion="16A323" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES"> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11542" systemVersion="16B2555" 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="11161"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11524"/> <capability name="Aspect ratio constraints" minToolsVersion="5.1"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> @@ -14,12 +17,14 @@ </placeholder> <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="MWMNavigationInfoView"> - <rect key="frame" x="0.0" y="0.0" width="320" height="568"/> + <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <subviews> <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="YYv-pG-Wkw" userLabel="Street name" customClass="SolidTouchView"> + <rect key="frame" x="0.0" y="0.0" width="375" height="65.5"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Ленинградский проспект" textAlignment="center" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ShI-bz-5g8"> + <rect key="frame" x="112" y="32" width="255" height="21.5"/> <accessibility key="accessibilityConfiguration"> <accessibilityTraits key="traits" staticText="YES" notEnabled="YES"/> </accessibility> @@ -57,8 +62,10 @@ </userDefinedRuntimeAttributes> </view> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="TMW-aw-1RT"> + <rect key="frame" x="-66" y="265.5" width="200" height="200"/> <subviews> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="2Bv-7H-IZt" userLabel="Gas" customClass="MWMButton"> + <rect key="frame" x="78" y="14" width="44" height="44"/> <constraints> <constraint firstAttribute="width" priority="750" constant="44" id="KKe-fH-h2n"/> <constraint firstAttribute="height" priority="750" constant="44" id="UEW-5h-9Jk"/> @@ -72,6 +79,7 @@ </connections> </button> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="RP3-01-Pj7" userLabel="Parking" customClass="MWMButton"> + <rect key="frame" x="122" y="34" width="44" height="44"/> <constraints> <constraint firstAttribute="height" priority="750" constant="44" id="iq3-j8-GZG"/> <constraint firstAttribute="width" priority="750" constant="44" id="lwq-aN-y8y"/> @@ -85,6 +93,7 @@ </connections> </button> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="GcK-FI-VXw" userLabel="Food" customClass="MWMButton"> + <rect key="frame" x="142" y="78" width="44" height="44"/> <constraints> <constraint firstAttribute="width" priority="750" constant="44" id="euI-Cb-zo4"/> <constraint firstAttribute="height" priority="750" constant="44" id="kdi-mH-aab"/> @@ -98,6 +107,7 @@ </connections> </button> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Ggf-tc-U3R" userLabel="Shop" customClass="MWMButton"> + <rect key="frame" x="122" y="122" width="44" height="44"/> <constraints> <constraint firstAttribute="width" priority="750" constant="44" id="2g5-C3-nTL"/> <constraint firstAttribute="height" priority="750" constant="44" id="fKJ-SP-gfS"/> @@ -111,6 +121,7 @@ </connections> </button> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="uoS-b2-FcN" userLabel="ATM" customClass="MWMButton"> + <rect key="frame" x="78" y="142" width="44" height="44"/> <constraints> <constraint firstAttribute="width" priority="750" constant="44" id="Kvn-g8-63x"/> <constraint firstAttribute="height" priority="750" constant="44" id="rwg-ce-ESb"/> @@ -154,6 +165,7 @@ </userDefinedRuntimeAttributes> </view> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Xna-Q1-7zW" customClass="MWMButton"> + <rect key="frame" x="6" y="337.5" width="56" height="56"/> <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="width" constant="56" id="IJq-4U-XHW"/> @@ -165,15 +177,20 @@ </connections> </button> <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Aa6-N8-acP" userLabel="Turns"> + <rect key="frame" x="8" y="28" width="96" height="153"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="wt8-EO-MKz" userLabel="First turn" customClass="SolidTouchView"> + <rect key="frame" x="0.0" y="0.0" width="96" height="117"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="tnR-CA-hkI"> + <rect key="frame" x="12" y="8" width="72" height="72"/> <subviews> <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="AJe-8N-rpk"> + <rect key="frame" x="0.0" y="0.0" width="72" height="72"/> <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/> </imageView> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="1" textAlignment="center" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="teB-QQ-oib"> + <rect key="frame" x="30" y="21.5" width="12" height="29"/> <fontDescription key="fontDescription" type="boldSystem" pointSize="24"/> <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> @@ -194,6 +211,7 @@ </constraints> </view> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0000 ft" textAlignment="center" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="KuR-1J-VI2"> + <rect key="frame" x="4" y="84" width="88" height="29"/> <fontDescription key="fontDescription" type="boldSystem" pointSize="24"/> <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> @@ -232,8 +250,10 @@ </userDefinedRuntimeAttributes> </view> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8Zu-Ff-6p2" userLabel="Second turn" customClass="SolidTouchView"> + <rect key="frame" x="0.0" y="121" width="96" height="32"/> <subviews> <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="CKi-sy-dNO"> + <rect key="frame" x="36" y="4" width="24" height="24"/> <constraints> <constraint firstAttribute="width" constant="24" id="4ye-1W-bU2"/> <constraint firstAttribute="height" constant="24" id="Fxo-9b-MUJ"/> @@ -284,11 +304,11 @@ </subviews> <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/> <constraints> - <constraint firstAttribute="bottom" secondItem="Xna-Q1-7zW" secondAttribute="bottom" priority="250" constant="44" id="0qY-1y-NiH"/> + <constraint firstAttribute="bottom" secondItem="Xna-Q1-7zW" secondAttribute="bottom" priority="250" constant="46" id="0qY-1y-NiH"/> <constraint firstAttribute="trailing" secondItem="YYv-pG-Wkw" secondAttribute="trailing" id="15D-kN-gda"/> <constraint firstItem="TMW-aw-1RT" firstAttribute="centerY" secondItem="Xna-Q1-7zW" secondAttribute="centerY" id="652-PO-iav"/> <constraint firstItem="YYv-pG-Wkw" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="IBQ-gK-Cpe"/> - <constraint firstItem="Xna-Q1-7zW" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="4" id="J7x-54-WT5"/> + <constraint firstItem="Xna-Q1-7zW" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="6" id="J7x-54-WT5"/> <constraint firstItem="Xna-Q1-7zW" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" priority="500" constant="32" id="KQb-ju-1bf"/> <constraint firstItem="YYv-pG-Wkw" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="Rd5-Hl-fSF"/> <constraint firstItem="TMW-aw-1RT" firstAttribute="leading" secondItem="Xna-Q1-7zW" secondAttribute="leading" priority="250" constant="-2" id="Y9b-UG-buF"/> |