diff --git a/iphone/CoreApi/CoreApi/Metrics/MWMEye.h b/iphone/CoreApi/CoreApi/Metrics/MWMEye.h index 99a8a21751..8e35c97e0f 100644 --- a/iphone/CoreApi/CoreApi/Metrics/MWMEye.h +++ b/iphone/CoreApi/CoreApi/Metrics/MWMEye.h @@ -6,6 +6,7 @@ typedef NS_ENUM(NSUInteger, MWMTip) MWMTipSearch, MWMTipDiscovery, MWMTipSubway, + MWMTipIsolines, MWMTipNone }; diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/MWMMapViewControlsManager.mm b/iphone/Maps/Classes/CustomViews/MapViewControls/MWMMapViewControlsManager.mm index a24cac647c..4fb9a5f26d 100644 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/MWMMapViewControlsManager.mm +++ b/iphone/Maps/Classes/CustomViews/MapViewControls/MWMMapViewControlsManager.mm @@ -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; } diff --git a/iphone/Maps/Maps.xcodeproj/project.pbxproj b/iphone/Maps/Maps.xcodeproj/project.pbxproj index 9dd28d53ea..baa1b88559 100644 --- a/iphone/Maps/Maps.xcodeproj/project.pbxproj +++ b/iphone/Maps/Maps.xcodeproj/project.pbxproj @@ -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 = ""; }; 34FE5A6D1F18F30F00BCA729 /* TrafficButtonArea.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TrafficButtonArea.swift; sourceTree = ""; }; 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 = ""; }; 3D15ACED2155117000F725D5 /* MWMObjectsCategorySelectorDataSource.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMObjectsCategorySelectorDataSource.mm; sourceTree = ""; }; 3D15ACEF2155118800F725D5 /* MWMObjectsCategorySelectorDataSource.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MWMObjectsCategorySelectorDataSource.h; sourceTree = ""; }; 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 */, diff --git a/iphone/Maps/TipsAndTricks/IsolinesTutorialBlur.xib b/iphone/Maps/TipsAndTricks/IsolinesTutorialBlur.xib new file mode 100644 index 0000000000..89eb0884c5 --- /dev/null +++ b/iphone/Maps/TipsAndTricks/IsolinesTutorialBlur.xib @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iphone/Maps/TipsAndTricks/TutorialViewController.swift b/iphone/Maps/TipsAndTricks/TutorialViewController.swift index 7c66b1befb..9b6319e8c1 100644 --- a/iphone/Maps/TipsAndTricks/TutorialViewController.swift +++ b/iphone/Maps/TipsAndTricks/TutorialViewController.swift @@ -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 + } } diff --git a/xcode/map/map.xcodeproj/project.pbxproj b/xcode/map/map.xcodeproj/project.pbxproj index 6e7f5e6116..ff315fed8a 100644 --- a/xcode/map/map.xcodeproj/project.pbxproj +++ b/xcode/map/map.xcodeproj/project.pbxproj @@ -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 = ""; }; + 3D0D2F7223D854AA00945C8D /* tips_api_delegate.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = tips_api_delegate.hpp; sourceTree = ""; }; 3D1775A22317E2FD00F8889C /* promo_catalog_poi_checker.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = promo_catalog_poi_checker.hpp; sourceTree = ""; }; 3D18DC3922956DD100A583A6 /* framework_light_delegate.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = framework_light_delegate.hpp; sourceTree = ""; }; 3D18DC3A22956DD100A583A6 /* promo_delegate.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = promo_delegate.hpp; sourceTree = ""; }; @@ -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 */,