[ios] isolines tip is added

This commit is contained in:
Arsentiy Milchakov 2020-01-22 15:57:45 +03:00 committed by Daria Volvenkova
parent 1777f9c766
commit 453ad5463c
6 changed files with 114 additions and 0 deletions

View file

@ -6,6 +6,7 @@ typedef NS_ENUM(NSUInteger, MWMTip)
MWMTipSearch,
MWMTipDiscovery,
MWMTipSubway,
MWMTipIsolines,
MWMTipNone
};

View file

@ -397,6 +397,11 @@ NSString * const kMapToCategorySelectorSegue = @"MapToCategorySelectorSegue";
target:(UIControl *)self.trafficButton.view
delegate:self];
break;
case MWMTipIsolines:
tutorial = [MWMTutorialViewController tutorial:MWMTutorialTypeIsolines
target:(UIControl *)self.trafficButton.view
delegate:self];
break;
case MWMTipNone:
tutorial = nil;
break;
@ -521,6 +526,9 @@ NSString * const kMapToCategorySelectorSegue = @"MapToCategorySelectorSegue";
case MWMTipSubway:
statTutorialType = @3;
break;
case MWMTipIsolines:
statTutorialType = @4;
break;
case MWMTipNone:
return;
}

View file

@ -313,6 +313,7 @@
34F742321E0834F400AC1FD6 /* UIViewController+Navigation.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F742301E0834F400AC1FD6 /* UIViewController+Navigation.m */; };
34FE5A6F1F18F30F00BCA729 /* TrafficButtonArea.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34FE5A6D1F18F30F00BCA729 /* TrafficButtonArea.swift */; };
39CDE69123E1B6C8007CDA58 /* libge0.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 39CDE69023E1B6C8007CDA58 /* libge0.a */; };
3D0D2F7623D858BF00945C8D /* IsolinesTutorialBlur.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3D0D2F7523D858BF00945C8D /* IsolinesTutorialBlur.xib */; };
3D15ACEE2155117000F725D5 /* MWMObjectsCategorySelectorDataSource.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3D15ACED2155117000F725D5 /* MWMObjectsCategorySelectorDataSource.mm */; };
3D1958EB213804B6009A83EC /* libmetrics.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3D1958EA213804B6009A83EC /* libmetrics.a */; };
3DB1C57122D5DDA60097EC4C /* PromoAfterBookingViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3DB1C57022D5DDA60097EC4C /* PromoAfterBookingViewController.xib */; };
@ -1347,6 +1348,7 @@
34FE4C441BCC013500066718 /* MWMMapWidgets.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMMapWidgets.mm; sourceTree = "<group>"; };
34FE5A6D1F18F30F00BCA729 /* TrafficButtonArea.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TrafficButtonArea.swift; sourceTree = "<group>"; };
39CDE69023E1B6C8007CDA58 /* libge0.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libge0.a; sourceTree = BUILT_PRODUCTS_DIR; };
3D0D2F7523D858BF00945C8D /* IsolinesTutorialBlur.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = IsolinesTutorialBlur.xib; sourceTree = "<group>"; };
3D15ACED2155117000F725D5 /* MWMObjectsCategorySelectorDataSource.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMObjectsCategorySelectorDataSource.mm; sourceTree = "<group>"; };
3D15ACEF2155118800F725D5 /* MWMObjectsCategorySelectorDataSource.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MWMObjectsCategorySelectorDataSource.h; sourceTree = "<group>"; };
3D1958EA213804B6009A83EC /* libmetrics.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libmetrics.a; sourceTree = BUILT_PRODUCTS_DIR; };
@ -3362,6 +3364,7 @@
471BBD92213038E000EB17C9 /* TipsAndTricks */ = {
isa = PBXGroup;
children = (
3D0D2F7523D858BF00945C8D /* IsolinesTutorialBlur.xib */,
471BBD932130390F00EB17C9 /* TutorialViewController.swift */,
470A89FC21342A9D00D72FBF /* TutorialBlurView.swift */,
47B505522136AB41009CBB55 /* DiscoveryTutorialBlur.xib */,
@ -4954,6 +4957,7 @@
6741A9421BF340DE002C974C /* sound-strings in Resources */,
F69018BD1E9F7CB600B3C10B /* MWMAutoupdateController.xib in Resources */,
34BBD6681F8273350070CA50 /* AuthorizationViewController.xib in Resources */,
3D0D2F7623D858BF00945C8D /* IsolinesTutorialBlur.xib in Resources */,
47B505552136B0CF009CBB55 /* SearchTutorialBlur.xib in Resources */,
6741A97D1BF340DE002C974C /* synonyms.txt in Resources */,
34E50DF31F6FCC41008EED49 /* UGCYourReviewCell.xib in Resources */,

View file

@ -0,0 +1,82 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15705" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15706"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="MWMTutorialViewController">
<connections>
<outlet property="view" destination="rhI-FF-zxW" id="CRO-Un-KA8"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<visualEffectView opaque="NO" contentMode="scaleToFill" id="rhI-FF-zxW" customClass="MWMTutorialBlurView">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" id="yEJ-mD-tE3">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="5zP-Cp-6l4">
<rect key="frame" x="40" y="264.5" width="91" height="36"/>
<color key="backgroundColor" white="1" alpha="0.29981806506849318" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<accessibility key="accessibilityConfiguration" identifier="tips_subway_got_it"/>
<constraints>
<constraint firstAttribute="height" constant="36" id="NHs-R6-v4C"/>
</constraints>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
<inset key="contentEdgeInsets" minX="16" minY="0.0" maxX="16" maxY="0.0"/>
<state key="normal" title="Понятно">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="6"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="boolean" keyPath="clipsToBounds" value="YES"/>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="button_layer_got_it"/>
</userDefinedRuntimeAttributes>
<connections>
<action selector="onCancel:" destination="-1" eventType="touchUpInside" id="71M-01-Usd"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Линии высот офлайн в MAPS.ME!" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ouh-SJ-3gL">
<rect key="frame" x="40" y="130" width="295" height="48"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="20"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="tips_map_layers_title_countour"/>
</userDefinedRuntimeAttributes>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Линии высот помогут спланировать путешествие на природу и не потеряться на местности" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="sYr-oN-jn1">
<rect key="frame" x="40" y="190" width="295" height="50.5"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" white="1" alpha="0.70232234589041098" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="tips_map_layers_message_countour"/>
</userDefinedRuntimeAttributes>
</label>
</subviews>
<constraints>
<constraint firstAttribute="trailing" secondItem="Ouh-SJ-3gL" secondAttribute="trailing" constant="40" id="6yW-V4-4zD"/>
<constraint firstItem="5zP-Cp-6l4" firstAttribute="leading" secondItem="yEJ-mD-tE3" secondAttribute="leading" constant="40" id="A6U-Mt-mV7"/>
<constraint firstItem="5zP-Cp-6l4" firstAttribute="top" secondItem="sYr-oN-jn1" secondAttribute="bottom" constant="24" id="X0d-lX-ot9"/>
<constraint firstItem="Ouh-SJ-3gL" firstAttribute="top" secondItem="yEJ-mD-tE3" secondAttribute="top" constant="130" id="bpL-kW-Igc"/>
<constraint firstItem="Ouh-SJ-3gL" firstAttribute="leading" secondItem="yEJ-mD-tE3" secondAttribute="leading" constant="40" id="dM1-pn-WtX"/>
<constraint firstItem="sYr-oN-jn1" firstAttribute="top" secondItem="Ouh-SJ-3gL" secondAttribute="bottom" constant="12" id="gkD-Fs-pNT"/>
<constraint firstItem="sYr-oN-jn1" firstAttribute="leading" secondItem="yEJ-mD-tE3" secondAttribute="leading" constant="40" id="lqK-mM-Whv"/>
<constraint firstAttribute="trailing" secondItem="sYr-oN-jn1" secondAttribute="trailing" constant="40" id="obz-rr-Z5o"/>
</constraints>
</view>
<viewLayoutGuide key="safeArea" id="xeI-hc-wDY"/>
<blurEffect style="dark"/>
<point key="canvasLocation" x="100.5" y="60"/>
</visualEffectView>
</objects>
</document>

View file

@ -4,6 +4,7 @@ enum TutorialType: Int {
case discovery
case bookmarks
case subway
case isolines
}
@objc(MWMTutorialViewControllerDelegate)
@ -109,6 +110,8 @@ extension TutorialViewController {
result = discoveryTutorialBlur()
case .subway:
result = subwayTutorialBlur()
case .isolines:
result = isolinesTutorialBlur()
case .bookmarks:
result = bookmarksTutorialBlur()
}
@ -149,4 +152,12 @@ extension TutorialViewController {
}
return result
}
private static func isolinesTutorialBlur() -> TutorialViewController {
let result = TutorialViewController(nibName: "IsolinesTutorialBlur", bundle: nil)
result.customAction = {
MapOverlayManager.setIsoLinesEnabled(true)
}
return result
}
}

View file

@ -26,6 +26,8 @@
39E3C60423312BA800FB0C37 /* features_fetcher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39E3C60223312BA800FB0C37 /* features_fetcher.cpp */; };
3D0AEAFC1FBB0FF400AD042B /* libgenerator_tests_support.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3D0AEAFF1FBB0FF400AD042B /* libgenerator_tests_support.a */; };
3D0AEAFE1FBB0FF400AD042B /* libsearch_tests_support.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3D0AEB011FBB0FF400AD042B /* libsearch_tests_support.a */; };
3D0D2F7323D854AA00945C8D /* tips_api_delegate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3D0D2F7123D854AA00945C8D /* tips_api_delegate.cpp */; };
3D0D2F7423D854AA00945C8D /* tips_api_delegate.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3D0D2F7223D854AA00945C8D /* tips_api_delegate.hpp */; };
3D1775A42317E2FD00F8889C /* promo_catalog_poi_checker.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3D1775A22317E2FD00F8889C /* promo_catalog_poi_checker.hpp */; };
3D18DC3C22956DD100A583A6 /* framework_light_delegate.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3D18DC3922956DD100A583A6 /* framework_light_delegate.hpp */; };
3D18DC3D22956DD100A583A6 /* promo_delegate.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3D18DC3A22956DD100A583A6 /* promo_delegate.hpp */; };
@ -291,6 +293,8 @@
3D0AEAFF1FBB0FF400AD042B /* libgenerator_tests_support.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libgenerator_tests_support.a; sourceTree = BUILT_PRODUCTS_DIR; };
3D0AEB001FBB0FF400AD042B /* libindexer_tests_support.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libindexer_tests_support.a; sourceTree = BUILT_PRODUCTS_DIR; };
3D0AEB011FBB0FF400AD042B /* libsearch_tests_support.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libsearch_tests_support.a; sourceTree = BUILT_PRODUCTS_DIR; };
3D0D2F7123D854AA00945C8D /* tips_api_delegate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = tips_api_delegate.cpp; sourceTree = "<group>"; };
3D0D2F7223D854AA00945C8D /* tips_api_delegate.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = tips_api_delegate.hpp; sourceTree = "<group>"; };
3D1775A22317E2FD00F8889C /* promo_catalog_poi_checker.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = promo_catalog_poi_checker.hpp; sourceTree = "<group>"; };
3D18DC3922956DD100A583A6 /* framework_light_delegate.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = framework_light_delegate.hpp; sourceTree = "<group>"; };
3D18DC3A22956DD100A583A6 /* promo_delegate.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = promo_delegate.hpp; sourceTree = "<group>"; };
@ -838,6 +842,8 @@
675345BD1A4054AD00A0A8C3 /* map */ = {
isa = PBXGroup;
children = (
3D0D2F7123D854AA00945C8D /* tips_api_delegate.cpp */,
3D0D2F7223D854AA00945C8D /* tips_api_delegate.hpp */,
3DF528D4237DC82E000ED0D5 /* catalog_headers_provider.cpp */,
3DF528D6237DC82E000ED0D5 /* catalog_headers_provider.hpp */,
3DF528D5237DC82E000ED0D5 /* position_provider.hpp */,
@ -1023,6 +1029,7 @@
3DD692B3220AD240001C3C62 /* caching_address_getter.hpp in Headers */,
3D62CBDA20FF6C8B00E7BB6E /* discovery_search.hpp in Headers */,
3DD1166C21888AAD007A2ED4 /* notification_queue_serdes.hpp in Headers */,
3D0D2F7423D854AA00945C8D /* tips_api_delegate.hpp in Headers */,
675346491A4054E800A0A8C3 /* bookmark_manager.hpp in Headers */,
3DA5714320B5CC80007BDE27 /* booking_filter_processor.hpp in Headers */,
F6B2830A1C1B03320081957A /* gps_track.hpp in Headers */,
@ -1208,6 +1215,7 @@
3DA5714120B5CC80007BDE27 /* booking_availability_filter.cpp in Sources */,
F6B283051C1B03320081957A /* gps_track_filter.cpp in Sources */,
675346481A4054E800A0A8C3 /* bookmark_manager.cpp in Sources */,
3D0D2F7323D854AA00945C8D /* tips_api_delegate.cpp in Sources */,
40ACC79923191C2600238E21 /* power_manager_tests.cpp in Sources */,
45F6EE9F1FB1C77600019892 /* search_api.cpp in Sources */,
BB4E5F251FCC664A00A77250 /* transit_display.cpp in Sources */,