diff options
author | Zoia Pribytkova <niakris90@gmail.com> | 2019-04-29 12:09:41 +0300 |
---|---|---|
committer | Arsentiy Milchakov <milcars@mapswithme.com> | 2019-05-08 16:49:33 +0300 |
commit | bd200d68b05136f21e1b5c9da8154c697a71bb06 (patch) | |
tree | c8cff736c460b8025d46c6f9fdbb062a5a4973eb /iphone | |
parent | 91c5fe28ed746b984779a042d71b20387989f771 (diff) |
[iOS] Road Place Page should contain only a preview and meta information
Diffstat (limited to 'iphone')
6 files changed, 32 insertions, 10 deletions
diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMRoutePreview.mm b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMRoutePreview.mm index 541ee4ed69..ab387acfa4 100644 --- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMRoutePreview.mm +++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMRoutePreview.mm @@ -193,9 +193,13 @@ static CGFloat const kDrivingOptionsHeight = 48; }]; if (state == MWMDrivingOptionsStateDefine) { + [self.drivingOptionsButton setImage:nil + forState:UIControlStateNormal]; [self.drivingOptionsButton setTitle:L(@"define_to_avoid_btn").uppercaseString forState:UIControlStateNormal]; } else if (state == MWMDrivingOptionsStateChange) { + [self.drivingOptionsButton setImage:[UIImage imageNamed:@"ic_options_warning"] + forState:UIControlStateNormal]; [self.drivingOptionsButton setTitle:L(@"change_driving_options_btn").uppercaseString forState:UIControlStateNormal]; } diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMiPadRoutePreview.xib b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMiPadRoutePreview.xib index 754a012de8..2831980945 100644 --- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMiPadRoutePreview.xib +++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMiPadRoutePreview.xib @@ -1,11 +1,11 @@ <?xml version="1.0" encoding="UTF-8"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> <device id="retina4_7" orientation="portrait"> <adaptation id="fullscreen"/> </device> <dependencies> <deployment identifier="iOS"/> - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/> <capability name="Safe area layout guides" minToolsVersion="9.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> @@ -39,10 +39,11 @@ <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="l7E-Ns-2Nn" userLabel="Options View"> <rect key="frame" x="0.0" y="68" width="320" height="48"/> <subviews> - <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Opi-yT-xIZ"> - <rect key="frame" x="84.5" y="10.5" width="151" height="27"/> + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Opi-yT-xIZ"> + <rect key="frame" x="72.5" y="12" width="175" height="24"/> <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="12"/> - <state key="normal" title="DEFINE ROADS TO AVOID"/> + <inset key="imageEdgeInsets" minX="-10" minY="0.0" maxX="0.0" maxY="0.0"/> + <state key="normal" title="DEFINE ROADS TO AVOID" image="ic_options_warning"/> <connections> <action selector="onDrivingOptions:" destination="u2u-Vb-2eH" eventType="touchUpInside" id="x2p-AW-91V"/> </connections> @@ -525,5 +526,6 @@ <resources> <image name="ic_24px_manager" width="24" height="24"/> <image name="ic_nav_bar_back" width="14" height="22"/> + <image name="ic_options_warning" width="24" height="24"/> </resources> </document> diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMiPhoneRoutePreview.xib b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMiPhoneRoutePreview.xib index febfed51d2..a737a88c4e 100644 --- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMiPhoneRoutePreview.xib +++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMiPhoneRoutePreview.xib @@ -1,11 +1,11 @@ <?xml version="1.0" encoding="UTF-8"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> <device id="retina4_7" orientation="portrait"> <adaptation id="fullscreen"/> </device> <dependencies> <deployment identifier="iOS"/> - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/> <capability name="Safe area layout guides" minToolsVersion="9.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> @@ -38,10 +38,11 @@ <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ib5-qh-Cmo"> <rect key="frame" x="0.0" y="48" width="320" height="48"/> <subviews> - <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ZXA-Og-q2I"> - <rect key="frame" x="84.5" y="10.5" width="151" height="27"/> + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ZXA-Og-q2I"> + <rect key="frame" x="72.5" y="12" width="175" height="24"/> <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="12"/> - <state key="normal" title="DEFINE ROADS TO AVOID"/> + <inset key="imageEdgeInsets" minX="-10" minY="0.0" maxX="0.0" maxY="0.0"/> + <state key="normal" title="DEFINE ROADS TO AVOID" image="ic_options_warning"/> <connections> <action selector="onDrivingOptions:" destination="aNH-vh-DPz" eventType="touchUpInside" id="jR1-dk-nNj"/> </connections> @@ -522,5 +523,6 @@ <resources> <image name="ic_24px_manager" width="24" height="24"/> <image name="ic_nav_bar_back" width="14" height="22"/> + <image name="ic_options_warning" width="24" height="24"/> </resources> </document> diff --git a/iphone/Maps/Images.xcassets/NavigationDashboard/ic_options_warning.imageset/Contents.json b/iphone/Maps/Images.xcassets/NavigationDashboard/ic_options_warning.imageset/Contents.json new file mode 100644 index 0000000000..5cd2986d96 --- /dev/null +++ b/iphone/Maps/Images.xcassets/NavigationDashboard/ic_options_warning.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icError.pdf" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +}
\ No newline at end of file diff --git a/iphone/Maps/Images.xcassets/NavigationDashboard/ic_options_warning.imageset/icError.pdf b/iphone/Maps/Images.xcassets/NavigationDashboard/ic_options_warning.imageset/icError.pdf Binary files differnew file mode 100644 index 0000000000..5a0dc62cbe --- /dev/null +++ b/iphone/Maps/Images.xcassets/NavigationDashboard/ic_options_warning.imageset/icError.pdf diff --git a/iphone/Maps/UI/PlacePage/MWMPlacePageData.mm b/iphone/Maps/UI/PlacePage/MWMPlacePageData.mm index 7ed9bbcb3d..f5343093f0 100644 --- a/iphone/Maps/UI/PlacePage/MWMPlacePageData.mm +++ b/iphone/Maps/UI/PlacePage/MWMPlacePageData.mm @@ -98,6 +98,8 @@ NSString * const kUserDefaultsLatLonAsDMSKey = @"UserDefaultsLatLonAsDMS"; // There is always at least coordinate meta field. m_sections.push_back(Sections::Metainfo); [self fillMetaInfoSection]; + + if ([self roadType] != RoadWarningMarkType::Count) { return; } auto const & taxiProviders = [self taxiProviders]; if (!taxiProviders.empty()) |