Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/iphone
diff options
context:
space:
mode:
authorIlya Grechuhin <i.grechuhin@mapswithme.com>2015-08-07 17:32:00 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 03:00:04 +0300
commit305990bd0c552aa3604bf9a7b73f33cab9febbde (patch)
tree99f2a83e123af21bf82a2148a5219d8e2a20d96d /iphone
parent3a9c947779ddf45aefcec2c323d2c806fc433312 (diff)
[ios] Added pedestrian route sharing dialog.
Diffstat (limited to 'iphone')
-rw-r--r--iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.h1
-rw-r--r--iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.mm43
-rw-r--r--iphone/Maps/Classes/CustomAlert/BaseAlert/MWMAlert.h5
-rw-r--r--iphone/Maps/Classes/CustomAlert/BaseAlert/MWMAlert.mm57
-rw-r--r--iphone/Maps/Classes/CustomAlert/DefaultAlert/MWMDefaultAlert.xib18
-rw-r--r--iphone/Maps/Classes/CustomAlert/FacebookAlert/MWMFacebookAlert.xib8
-rw-r--r--iphone/Maps/Classes/CustomAlert/PedestrianShareAlert/MWMPedestrianShareAlert.h15
-rw-r--r--iphone/Maps/Classes/CustomAlert/PedestrianShareAlert/MWMPedestrianShareAlert.mm95
-rw-r--r--iphone/Maps/Classes/CustomAlert/PedestrianShareAlert/MWMPedestrianShareAlert.xib196
-rw-r--r--iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMLandscapeRoutePreview.xib8
-rw-r--r--iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMPortraitRoutePreview.xib8
-rw-r--r--iphone/Maps/Classes/MapViewController.mm32
-rw-r--r--iphone/Maps/Classes/Share/MWMActivityViewController.h1
-rw-r--r--iphone/Maps/Classes/Share/MWMActivityViewController.m12
-rw-r--r--iphone/Maps/Classes/Share/MWMShareLocationActivityItem.h2
-rw-r--r--iphone/Maps/Classes/Share/MWMSharePedestrianRoutesToastActivityItem.h11
-rw-r--r--iphone/Maps/Classes/Share/MWMSharePedestrianRoutesToastActivityItem.m44
-rw-r--r--iphone/Maps/Images.xcassets/NewDialog/img_achive_pedestrian.imageset/Contents.json23
-rw-r--r--iphone/Maps/Images.xcassets/NewDialog/img_achive_pedestrian.imageset/img_achive_pedestrian.pngbin0 -> 6008 bytes
-rw-r--r--iphone/Maps/Images.xcassets/NewDialog/img_achive_pedestrian.imageset/img_achive_pedestrian@2x.pngbin0 -> 13437 bytes
-rw-r--r--iphone/Maps/Images.xcassets/NewDialog/img_achive_pedestrian.imageset/img_achive_pedestrian@3x.pngbin0 -> 20989 bytes
-rw-r--r--iphone/Maps/Images.xcassets/NewDialog/img_pedestrian.imageset/Contents.json23
-rw-r--r--iphone/Maps/Images.xcassets/NewDialog/img_pedestrian.imageset/img_pedestrian.pngbin0 -> 6180 bytes
-rw-r--r--iphone/Maps/Images.xcassets/NewDialog/img_pedestrian.imageset/img_pedestrian@2x.pngbin0 -> 12121 bytes
-rw-r--r--iphone/Maps/Images.xcassets/NewDialog/img_pedestrian.imageset/img_pedestrian@3x.pngbin0 -> 13936 bytes
-rw-r--r--iphone/Maps/Maps.xcodeproj/project.pbxproj24
-rw-r--r--iphone/Maps/UIColor+MapsMeColor.h1
-rw-r--r--iphone/Maps/UIColor+MapsMeColor.mm5
28 files changed, 578 insertions, 54 deletions
diff --git a/iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.h b/iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.h
index 2f4ef7a94e..6ddb1a161b 100644
--- a/iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.h
+++ b/iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.h
@@ -32,6 +32,7 @@ typedef void (^CloseAlertCompletion)();
- (void)presentLocationServiceNotSupportedAlert;
- (void)presentNoConnectionAlert;
- (void)presentnoWiFiAlertWithName:(nonnull NSString *)name downloadBlock:(nullable RightButtonAction)block;
+- (void)presentPedestrianToastAlert:(BOOL)isFirstLaunch;
- (void)closeAlertWithCompletion:(nullable CloseAlertCompletion)completion;
- (nonnull instancetype)init __attribute__((unavailable("call -initWithViewController: instead!")));
diff --git a/iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.mm b/iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.mm
index c1d1d93737..eb1ed93750 100644
--- a/iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.mm
+++ b/iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.mm
@@ -31,16 +31,8 @@ static NSString * const kAlertControllerNibIdentifier = @"MWMAlertViewController
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
- MWMAlert * alert = [self.view.subviews firstObject];
- if (isIOSVersionLessThan(8) && [alert respondsToSelector:@selector(setTransform:)])
- {
- [UIView animateWithDuration:duration animations:^
- {
- alert.transform = rotation(toInterfaceOrientation);
- }];
- }
- if ([alert respondsToSelector:@selector(willRotateToInterfaceOrientation:)])
- [alert willRotateToInterfaceOrientation:toInterfaceOrientation];
+ MWMAlert * alert = self.view.subviews.firstObject;
+ [alert rotate:toInterfaceOrientation duration:duration];
}
#pragma mark - Actions
@@ -98,6 +90,11 @@ static NSString * const kAlertControllerNibIdentifier = @"MWMAlertViewController
[self displayAlert:[MWMAlert noWiFiAlertWithName:name downloadBlock:block]];
}
+- (void)presentPedestrianToastAlert:(BOOL)isFirstLaunch
+{
+ [self displayAlert:[MWMAlert pedestrianToastShareAlert:isFirstLaunch]];
+}
+
- (void)presentFeedbackAlertWithStarsCount:(NSUInteger)starsCount
{
[self displayAlert:[MWMAlert feedbackAlertWithStarsCount:starsCount]];
@@ -137,16 +134,6 @@ static NSString * const kAlertControllerNibIdentifier = @"MWMAlertViewController
CGFloat const scale = 1.1;
alert.transform = CGAffineTransformMakeScale(scale, scale);
}
- self.view.center = self.ownerViewController.view.center;
- [self.ownerViewController.view addSubview:self.view];
- UIWindow * window = [[[UIApplication sharedApplication] delegate] window];
- [window addSubview:self.view];
- self.view.frame = window.bounds;
- if (iOS7)
- alert.transform = rotation(self.ownerViewController.interfaceOrientation);
- [self.view addSubview:alert];
- alert.bounds = self.view.bounds;
- alert.center = self.view.center;
[UIView animateWithDuration:.15 animations:^
{
self.view.alpha = 1.;
@@ -181,22 +168,6 @@ static NSString * const kAlertControllerNibIdentifier = @"MWMAlertViewController
[a openURL:url];
}
-CGAffineTransform rotation(UIInterfaceOrientation orientation)
-{
- switch (orientation)
- {
- case UIInterfaceOrientationLandscapeLeft:
- return CGAffineTransformMakeRotation(-M_PI_2);
- case UIInterfaceOrientationLandscapeRight:
- return CGAffineTransformMakeRotation(M_PI_2);
- case UIInterfaceOrientationPortraitUpsideDown:
- return CGAffineTransformMakeRotation(M_PI);
- case UIInterfaceOrientationUnknown:
- case UIInterfaceOrientationPortrait:
- return CGAffineTransformIdentity;
- }
-}
-
#pragma mark - UIAlertViewDelegate
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
diff --git a/iphone/Maps/Classes/CustomAlert/BaseAlert/MWMAlert.h b/iphone/Maps/Classes/CustomAlert/BaseAlert/MWMAlert.h
index 7fa8490de0..62428d583c 100644
--- a/iphone/Maps/Classes/CustomAlert/BaseAlert/MWMAlert.h
+++ b/iphone/Maps/Classes/CustomAlert/BaseAlert/MWMAlert.h
@@ -31,9 +31,14 @@ typedef void (^RightButtonAction)();
+ (MWMAlert *)noWiFiAlertWithName:(NSString *)name downloadBlock:(RightButtonAction)block;
+ (MWMAlert *)noConnectionAlert;
+ (MWMAlert *)locationServiceNotSupportedAlert;
++ (MWMAlert *)pedestrianToastShareAlert:(BOOL)isFirstLaunch;
- (void)close;
- (void)setNeedsCloseAlertAfterEnterBackground;
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)orientation;
+- (void)rotate:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration;
+
+- (void)addControllerViewToWindow;
+
@end
diff --git a/iphone/Maps/Classes/CustomAlert/BaseAlert/MWMAlert.mm b/iphone/Maps/Classes/CustomAlert/BaseAlert/MWMAlert.mm
index 0c1f27f99c..2408d4abb7 100644
--- a/iphone/Maps/Classes/CustomAlert/BaseAlert/MWMAlert.mm
+++ b/iphone/Maps/Classes/CustomAlert/BaseAlert/MWMAlert.mm
@@ -6,6 +6,7 @@
// Copyright (c) 2015 MapsWithMe. All rights reserved.
//
+#import "Common.h"
#import "MWMAlert.h"
#import "MWMAlertViewController.h"
#import "MWMDefaultAlert.h"
@@ -13,6 +14,7 @@
#import "MWMFacebookAlert.h"
#import "MWMFeedbackAlert.h"
#import "MWMLocationAlert.h"
+#import "MWMPedestrianShareAlert.h"
#import "MWMRateAlert.h"
#import "MWMRoutingDisclaimerAlert.h"
@@ -97,6 +99,11 @@
}
}
++ (MWMAlert *)pedestrianToastShareAlert:(BOOL)isFirstLaunch
+{
+ return [MWMPedestrianShareAlert alert:isFirstLaunch];
+}
+
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)orientation
{
// Should override this method if you want custom relayout after rotation.
@@ -126,4 +133,54 @@
[self close];
}
+- (void)rotate:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
+{
+ if (isIOSVersionLessThan(8) && [self respondsToSelector:@selector(setTransform:)])
+ {
+ [UIView animateWithDuration:duration animations:^
+ {
+ self.transform = rotation(toInterfaceOrientation);
+ }];
+ }
+ if ([self respondsToSelector:@selector(willRotateToInterfaceOrientation:)])
+ [self willRotateToInterfaceOrientation:toInterfaceOrientation];
+}
+
+CGAffineTransform rotation(UIInterfaceOrientation orientation)
+{
+ switch (orientation)
+ {
+ case UIInterfaceOrientationLandscapeLeft:
+ return CGAffineTransformMakeRotation(-M_PI_2);
+ case UIInterfaceOrientationLandscapeRight:
+ return CGAffineTransformMakeRotation(M_PI_2);
+ case UIInterfaceOrientationPortraitUpsideDown:
+ return CGAffineTransformMakeRotation(M_PI);
+ case UIInterfaceOrientationUnknown:
+ case UIInterfaceOrientationPortrait:
+ return CGAffineTransformIdentity;
+ }
+}
+
+- (void)addControllerViewToWindow
+{
+ UIWindow * window = UIApplication.sharedApplication.delegate.window;
+ UIView * view = self.alertController.view;
+ [window addSubview:view];
+ view.frame = window.bounds;
+}
+
+- (void)setAlertController:(MWMAlertViewController *)alertController
+{
+ _alertController = alertController;
+ UIView * view = alertController.view;
+ UIView * ownerView = alertController.ownerViewController.view;
+ view.frame = ownerView.bounds;
+ [alertController.ownerViewController.view addSubview:view];
+ [self addControllerViewToWindow];
+ [self rotate:alertController.ownerViewController.interfaceOrientation duration:0.0];
+ [view addSubview:self];
+ self.frame = view.bounds;
+}
+
@end
diff --git a/iphone/Maps/Classes/CustomAlert/DefaultAlert/MWMDefaultAlert.xib b/iphone/Maps/Classes/CustomAlert/DefaultAlert/MWMDefaultAlert.xib
index c46389c645..55662cf765 100644
--- a/iphone/Maps/Classes/CustomAlert/DefaultAlert/MWMDefaultAlert.xib
+++ b/iphone/Maps/Classes/CustomAlert/DefaultAlert/MWMDefaultAlert.xib
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="14D131" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="14E46" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment version="2048" identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
@@ -18,10 +18,10 @@
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="zso-DD-6SG" userLabel="ContainerView">
- <rect key="frame" x="20" y="208" width="280" height="138"/>
+ <rect key="frame" x="20" y="215" width="280" height="139"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Title" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Grl-z5-2cE" userLabel="Title">
- <rect key="frame" x="20" y="20" width="240" height="21.5"/>
+ <rect key="frame" x="20" y="20" width="240" height="22"/>
<constraints>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="20" id="0SG-Lk-wkv"/>
<constraint firstAttribute="width" constant="240" id="9rm-Av-9eY"/>
@@ -31,7 +31,7 @@
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Message" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0D6-oV-Lio" userLabel="Message">
- <rect key="frame" x="20" y="53" width="240" height="20"/>
+ <rect key="frame" x="20" y="54" width="240" height="20"/>
<constraints>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="20" id="dG8-qs-ZWQ"/>
<constraint firstAttribute="width" constant="240" id="wbf-hD-V6a"/>
@@ -41,14 +41,14 @@
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="f8D-qe-39W" userLabel="hDivider">
- <rect key="frame" x="0.0" y="93" width="280" height="1"/>
+ <rect key="frame" x="0.0" y="94" width="280" height="1"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.12" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="HTM-C2-dMq"/>
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="jAg-cp-4Ms" userLabel="left">
- <rect key="frame" x="0.0" y="94" width="140" height="44"/>
+ <rect key="frame" x="0.0" y="95" width="140" height="44"/>
<constraints>
<constraint firstAttribute="width" constant="140" id="4bW-b0-naB"/>
<constraint firstAttribute="height" constant="44" id="RRQ-jI-El3"/>
@@ -68,7 +68,7 @@
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="RSB-i6-pEP" userLabel="right">
- <rect key="frame" x="140" y="94" width="140" height="44"/>
+ <rect key="frame" x="140" y="95" width="140" height="44"/>
<constraints>
<constraint firstAttribute="width" constant="140" id="C3i-gd-pxv"/>
<constraint firstAttribute="height" constant="44" id="dta-cI-rDi"/>
@@ -88,7 +88,7 @@
</connections>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="5H4-oD-Dex" userLabel="vDivider">
- <rect key="frame" x="139" y="93" width="1" height="44"/>
+ <rect key="frame" x="139" y="94" width="1" height="44"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.12" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="8r3-72-asP"/>
@@ -134,7 +134,7 @@
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<constraints>
- <constraint firstAttribute="centerY" secondItem="zso-DD-6SG" secondAttribute="centerY" constant="7" id="2Yk-mx-NtS"/>
+ <constraint firstAttribute="centerY" secondItem="zso-DD-6SG" secondAttribute="centerY" id="2Yk-mx-NtS"/>
<constraint firstAttribute="centerX" secondItem="zso-DD-6SG" secondAttribute="centerX" id="rvU-lH-fCc"/>
</constraints>
<connections>
diff --git a/iphone/Maps/Classes/CustomAlert/FacebookAlert/MWMFacebookAlert.xib b/iphone/Maps/Classes/CustomAlert/FacebookAlert/MWMFacebookAlert.xib
index e460341483..633afc1e8b 100644
--- a/iphone/Maps/Classes/CustomAlert/FacebookAlert/MWMFacebookAlert.xib
+++ b/iphone/Maps/Classes/CustomAlert/FacebookAlert/MWMFacebookAlert.xib
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="14D131" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="14E46" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment version="2048" identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
@@ -18,10 +18,10 @@
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="z0H-Rd-9cG" userLabel="ContainerView">
- <rect key="frame" x="20" y="208" width="280" height="138"/>
+ <rect key="frame" x="20" y="215" width="280" height="138"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Title" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wP3-As-2xi" userLabel="Title">
- <rect key="frame" x="20" y="20" width="240" height="21.5"/>
+ <rect key="frame" x="20" y="20" width="240" height="22"/>
<constraints>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="22" id="BzP-sL-4rY"/>
<constraint firstAttribute="width" constant="240" id="E62-zt-CmQ"/>
@@ -137,7 +137,7 @@
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<constraints>
- <constraint firstAttribute="centerY" secondItem="z0H-Rd-9cG" secondAttribute="centerY" constant="7" id="EwN-vC-oZ1"/>
+ <constraint firstAttribute="centerY" secondItem="z0H-Rd-9cG" secondAttribute="centerY" id="EwN-vC-oZ1"/>
<constraint firstAttribute="centerX" secondItem="z0H-Rd-9cG" secondAttribute="centerX" id="fQG-1v-223"/>
</constraints>
<point key="canvasLocation" x="462" y="155"/>
diff --git a/iphone/Maps/Classes/CustomAlert/PedestrianShareAlert/MWMPedestrianShareAlert.h b/iphone/Maps/Classes/CustomAlert/PedestrianShareAlert/MWMPedestrianShareAlert.h
new file mode 100644
index 0000000000..f16cbe2591
--- /dev/null
+++ b/iphone/Maps/Classes/CustomAlert/PedestrianShareAlert/MWMPedestrianShareAlert.h
@@ -0,0 +1,15 @@
+//
+// MWMPedestrianShareAlert.h
+// Maps
+//
+// Created by Ilya Grechuhin on 05.08.15.
+// Copyright (c) 2015 MapsWithMe. All rights reserved.
+//
+
+#import "MWMAlert.h"
+
+@interface MWMPedestrianShareAlert : MWMAlert
+
++ (MWMPedestrianShareAlert *)alert:(BOOL)isFirstLaunch;
+
+@end
diff --git a/iphone/Maps/Classes/CustomAlert/PedestrianShareAlert/MWMPedestrianShareAlert.mm b/iphone/Maps/Classes/CustomAlert/PedestrianShareAlert/MWMPedestrianShareAlert.mm
new file mode 100644
index 0000000000..fab5de5dbb
--- /dev/null
+++ b/iphone/Maps/Classes/CustomAlert/PedestrianShareAlert/MWMPedestrianShareAlert.mm
@@ -0,0 +1,95 @@
+//
+// MWMPedestrianShareAlert.m
+// Maps
+//
+// Created by Ilya Grechuhin on 05.08.15.
+// Copyright (c) 2015 MapsWithMe. All rights reserved.
+//
+
+#import "Common.h"
+#import "Macros.h"
+#import "MWMActivityViewController.h"
+#import "MWMAlertViewController.h"
+#import "MWMPedestrianShareAlert.h"
+#import "UIColor+MapsMeColor.h"
+#import "UIButton+RuntimeAttributes.h"
+
+#import "Statistics.h"
+#import "3party/Alohalytics/src/alohalytics_objc.h"
+
+static NSString * const kShareEventName = @"pedestrianShareEvent";
+
+@interface MWMPedestrianShareAlert ()
+
+@property (weak, nonatomic) IBOutlet UILabel * title;
+@property (weak, nonatomic) IBOutlet UIView * videoView;
+@property (weak, nonatomic) IBOutlet UIImageView * image;
+@property (weak, nonatomic) IBOutlet UILabel * message;
+@property (weak, nonatomic) IBOutlet UIButton * shareButton;
+
+@property (nonatomic) BOOL isFirstLaunch;
+
+@end
+
+@implementation MWMPedestrianShareAlert
+
++ (MWMPedestrianShareAlert *)alert:(BOOL)isFirstLaunch
+{
+ MWMPedestrianShareAlert * view = [NSBundle.mainBundle loadNibNamed:NSStringFromClass(self.class) owner:self
+ options:nil].firstObject;
+ view.isFirstLaunch = isFirstLaunch;
+ if (isFirstLaunch)
+ {
+ view.title.text = L(@"dialog_title_share_walking_routes_first_launch");
+ view.message.text = L(@"dialog_text_share_walking_routes_first_launch");
+ view.image.image = [UIImage imageNamed:@"img_pedestrian"];
+ }
+ else
+ {
+ view.title.text = L(@"dialog_title_share_walking_routes_active_pedestrian");
+ view.message.text = L(@"dialog_text_share_walking_routes_active_pedestrian");
+ view.image.image = [UIImage imageNamed:@"img_achive_pedestrian"];
+ }
+ return view;
+}
+
+#pragma mark - Actions
+
+- (IBAction)shareButtonTap
+{
+ [Alohalytics logEvent:kShareEventName withValue:@"shareTap"];
+ [[Statistics instance] logEvent:[NSString stringWithFormat:@"%@shareTap", kShareEventName]];
+ MWMActivityViewController * shareVC = [MWMActivityViewController shareControllerForPedestrianRoutesToast];
+ if (IPAD && !isIOSVersionLessThan(8))
+ {
+ shareVC.completionWithItemsHandler = ^(NSString * activityType, BOOL completed, NSArray * returnedItems,
+ NSError * activityError)
+ {
+ [self close];
+ };
+ }
+ else
+ {
+ [self close];
+ }
+ [shareVC presentInParentViewController:self.alertController anchorView:self.shareButton];
+}
+
+- (IBAction)doneButtonTap
+{
+ [Alohalytics logEvent:kShareEventName withValue:@"doneTap"];
+ [[Statistics instance] logEvent:[NSString stringWithFormat:@"%@doneTap", kShareEventName]];
+ [self close];
+}
+
+- (void)rotate:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
+{
+ // Overriden implemantation left empty since this view is added to the view controller handling device rotation
+}
+
+- (void)addControllerViewToWindow
+{
+ // Overriden implemantation left empty to let sharing view appear above
+}
+
+@end
diff --git a/iphone/Maps/Classes/CustomAlert/PedestrianShareAlert/MWMPedestrianShareAlert.xib b/iphone/Maps/Classes/CustomAlert/PedestrianShareAlert/MWMPedestrianShareAlert.xib
new file mode 100644
index 0000000000..c01f3b7ba4
--- /dev/null
+++ b/iphone/Maps/Classes/CustomAlert/PedestrianShareAlert/MWMPedestrianShareAlert.xib
@@ -0,0 +1,196 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="14E46" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
+ <dependencies>
+ <deployment identifier="iOS"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
+ </dependencies>
+ <customFonts key="customFonts">
+ <mutableArray key="HelveticaNeue.ttc">
+ <string>HelveticaNeue-Medium</string>
+ </mutableArray>
+ </customFonts>
+ <objects>
+ <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
+ <view contentMode="scaleToFill" id="pWH-NL-pHM" customClass="MWMPedestrianShareAlert">
+ <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
+ <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
+ <subviews>
+ <view opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="pGZ-bY-bgx" userLabel="ContainerView">
+ <rect key="frame" x="160" y="138" width="280" height="324"/>
+ <subviews>
+ <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Congratulations!" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="240" translatesAutoresizingMaskIntoConstraints="NO" id="9PB-XH-zjT">
+ <rect key="frame" x="40" y="12" width="200" height="21.5"/>
+ <fontDescription key="fontDescription" name="HelveticaNeue-Medium" family="Helvetica Neue" pointSize="18"/>
+ <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
+ <nil key="highlightedColor"/>
+ <userDefinedRuntimeAttributes>
+ <userDefinedRuntimeAttribute type="string" keyPath="fontName" value="medium18"/>
+ <userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackPrimaryText"/>
+ <userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="rating_do_like_maps"/>
+ </userDefinedRuntimeAttributes>
+ </label>
+ <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="zDQ-dL-OUk">
+ <rect key="frame" x="60" y="53" width="160" height="160"/>
+ <subviews>
+ <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="img_achive_pedestrian" translatesAutoresizingMaskIntoConstraints="NO" id="9Ej-7o-iGX" userLabel="Image">
+ <rect key="frame" x="0.0" y="0.0" width="160" height="160"/>
+ </imageView>
+ </subviews>
+ <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
+ <constraints>
+ <constraint firstAttribute="bottom" secondItem="9Ej-7o-iGX" secondAttribute="bottom" id="3TZ-db-nlO"/>
+ <constraint firstAttribute="width" constant="160" id="eE4-yi-dMf">
+ <variation key="heightClass=compact" constant="100"/>
+ <variation key="heightClass=regular-widthClass=regular" constant="240"/>
+ </constraint>
+ <constraint firstAttribute="height" constant="160" id="egN-3e-TXd">
+ <variation key="heightClass=compact" constant="100"/>
+ <variation key="heightClass=regular-widthClass=regular" constant="240"/>
+ </constraint>
+ <constraint firstItem="9Ej-7o-iGX" firstAttribute="leading" secondItem="zDQ-dL-OUk" secondAttribute="leading" id="tue-93-Bqw"/>
+ <constraint firstItem="9Ej-7o-iGX" firstAttribute="top" secondItem="zDQ-dL-OUk" secondAttribute="top" id="vN6-0l-3xD"/>
+ <constraint firstAttribute="trailing" secondItem="9Ej-7o-iGX" secondAttribute="trailing" id="veK-iv-zJg"/>
+ </constraints>
+ </view>
+ <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Message" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="240" translatesAutoresizingMaskIntoConstraints="NO" id="Jz3-Ch-ekb" userLabel="Message">
+ <rect key="frame" x="20" y="223" width="240" height="16.5"/>
+ <fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="14"/>
+ <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
+ <nil key="highlightedColor"/>
+ <userDefinedRuntimeAttributes>
+ <userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular14"/>
+ <userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackSecondaryText"/>
+ <userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="rating_do_like_maps"/>
+ </userDefinedRuntimeAttributes>
+ </label>
+ <button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="WnY-H8-xZB" userLabel="Share">
+ <rect key="frame" x="20" y="260" width="240" height="44"/>
+ <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
+ <constraints>
+ <constraint firstAttribute="height" constant="44" id="s0x-cV-c3v"/>
+ </constraints>
+ <fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="17"/>
+ <state key="normal" title="Share">
+ <color key="titleColor" red="0.01176470588" green="0.47843137250000001" blue="1" alpha="1" colorSpace="calibratedRGB"/>
+ <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+ </state>
+ <userDefinedRuntimeAttributes>
+ <userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="share"/>
+ <userDefinedRuntimeAttribute type="string" keyPath="textColorName" value="buttonBlueText"/>
+ <userDefinedRuntimeAttribute type="string" keyPath="fontName" value="medium17"/>
+ <userDefinedRuntimeAttribute type="string" keyPath="textColorHighlightedName" value="whiteColor"/>
+ <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
+ <integer key="value" value="8"/>
+ </userDefinedRuntimeAttribute>
+ <userDefinedRuntimeAttribute type="string" keyPath="layer.borderColorName" value="buttonBlueText"/>
+ <userDefinedRuntimeAttribute type="number" keyPath="layer.borderWidth">
+ <integer key="value" value="1"/>
+ </userDefinedRuntimeAttribute>
+ <userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="clearColor"/>
+ <userDefinedRuntimeAttribute type="string" keyPath="backgroundHighlightedColorName" value="buttonBlueText"/>
+ </userDefinedRuntimeAttributes>
+ <connections>
+ <action selector="shareButtonTap" destination="pWH-NL-pHM" eventType="touchUpInside" id="5Kn-q1-1CP"/>
+ </connections>
+ </button>
+ <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="IhW-S4-r6g" userLabel="Done">
+ <rect key="frame" x="240" y="0.0" width="40" height="40"/>
+ <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
+ <fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="17"/>
+ <state key="normal" image="ic_cancel">
+ <color key="titleColor" red="0.011764705882352941" green="0.47843137254901957" blue="1" alpha="1" colorSpace="calibratedRGB"/>
+ <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+ </state>
+ <connections>
+ <action selector="doneButtonTap" destination="pWH-NL-pHM" eventType="touchUpInside" id="LRz-Yf-PM8"/>
+ </connections>
+ </button>
+ </subviews>
+ <color key="backgroundColor" red="0.84705882349999995" green="0.84705882349999995" blue="0.84705882349999995" alpha="1" colorSpace="calibratedRGB"/>
+ <constraints>
+ <constraint firstAttribute="trailing" secondItem="WnY-H8-xZB" secondAttribute="trailing" constant="20" id="0bP-uH-QOv">
+ <variation key="heightClass=compact" constant="40"/>
+ <variation key="heightClass=regular-widthClass=regular" constant="80"/>
+ </constraint>
+ <constraint firstItem="9PB-XH-zjT" firstAttribute="top" secondItem="pGZ-bY-bgx" secondAttribute="top" constant="12" id="4p5-bE-MGd"/>
+ <constraint firstAttribute="width" constant="280" id="6kb-K4-Vhj">
+ <variation key="heightClass=compact" constant="360"/>
+ <variation key="heightClass=regular-widthClass=regular" constant="400"/>
+ </constraint>
+ <constraint firstItem="9PB-XH-zjT" firstAttribute="centerY" secondItem="IhW-S4-r6g" secondAttribute="centerY" id="9RQ-Er-8ov"/>
+ <constraint firstItem="IhW-S4-r6g" firstAttribute="top" secondItem="pGZ-bY-bgx" secondAttribute="top" id="ANX-0c-y3o"/>
+ <constraint firstItem="WnY-H8-xZB" firstAttribute="top" secondItem="Jz3-Ch-ekb" secondAttribute="bottom" constant="20" id="Awo-l7-UNZ">
+ <variation key="heightClass=compact" constant="10"/>
+ <variation key="heightClass=regular-widthClass=regular" constant="40"/>
+ </constraint>
+ <constraint firstAttribute="bottom" secondItem="WnY-H8-xZB" secondAttribute="bottom" constant="20" id="Gg8-7b-2dW">
+ <variation key="heightClass=regular-widthClass=regular" constant="40"/>
+ </constraint>
+ <constraint firstItem="Jz3-Ch-ekb" firstAttribute="leading" secondItem="pGZ-bY-bgx" secondAttribute="leading" constant="20" id="Nfu-Za-PNh">
+ <variation key="heightClass=regular-widthClass=regular" constant="40"/>
+ </constraint>
+ <constraint firstAttribute="centerX" secondItem="9PB-XH-zjT" secondAttribute="centerX" id="TNo-Kf-Qi9"/>
+ <constraint firstAttribute="trailing" secondItem="9PB-XH-zjT" secondAttribute="trailing" constant="40" id="fb4-Si-VVj"/>
+ <constraint firstAttribute="centerX" secondItem="zDQ-dL-OUk" secondAttribute="centerX" id="g05-5f-7nO"/>
+ <constraint firstItem="WnY-H8-xZB" firstAttribute="leading" secondItem="pGZ-bY-bgx" secondAttribute="leading" constant="20" id="gSQ-cn-GSd">
+ <variation key="heightClass=compact" constant="40"/>
+ <variation key="heightClass=regular-widthClass=regular" constant="80"/>
+ </constraint>
+ <constraint firstAttribute="trailing" secondItem="Jz3-Ch-ekb" secondAttribute="trailing" constant="20" id="j9G-MS-Vjh">
+ <variation key="heightClass=regular-widthClass=regular" constant="40"/>
+ </constraint>
+ <constraint firstAttribute="centerX" secondItem="Jz3-Ch-ekb" secondAttribute="centerX" id="lDa-kN-XLb"/>
+ <constraint firstAttribute="centerX" secondItem="Jz3-Ch-ekb" secondAttribute="centerX" id="mZV-cZ-lbt"/>
+ <constraint firstItem="Jz3-Ch-ekb" firstAttribute="top" secondItem="zDQ-dL-OUk" secondAttribute="bottom" constant="10" id="pnT-2l-ol1">
+ <variation key="heightClass=regular-widthClass=regular" constant="20"/>
+ </constraint>
+ <constraint firstItem="9PB-XH-zjT" firstAttribute="leading" secondItem="pGZ-bY-bgx" secondAttribute="leading" constant="40" id="sLu-Jx-pUC"/>
+ <constraint firstAttribute="trailing" secondItem="IhW-S4-r6g" secondAttribute="trailing" id="svC-Yh-xZj"/>
+ <constraint firstItem="zDQ-dL-OUk" firstAttribute="top" secondItem="9PB-XH-zjT" secondAttribute="bottom" constant="20" id="yEO-Um-xYq">
+ <variation key="heightClass=compact" constant="12"/>
+ <variation key="heightClass=regular-widthClass=regular" constant="12"/>
+ </constraint>
+ </constraints>
+ <userDefinedRuntimeAttributes>
+ <userDefinedRuntimeAttribute type="size" keyPath="layer.shadowOffset">
+ <size key="value" width="0.0" height="3"/>
+ </userDefinedRuntimeAttribute>
+ <userDefinedRuntimeAttribute type="number" keyPath="layer.shadowRadius">
+ <integer key="value" value="6"/>
+ </userDefinedRuntimeAttribute>
+ <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
+ <integer key="value" value="4"/>
+ </userDefinedRuntimeAttribute>
+ <userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="alertBackground"/>
+ </userDefinedRuntimeAttributes>
+ <variation key="default">
+ <mask key="constraints">
+ <exclude reference="9RQ-Er-8ov"/>
+ <exclude reference="TNo-Kf-Qi9"/>
+ <exclude reference="lDa-kN-XLb"/>
+ <exclude reference="mZV-cZ-lbt"/>
+ </mask>
+ </variation>
+ </view>
+ </subviews>
+ <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
+ <constraints>
+ <constraint firstAttribute="centerY" secondItem="pGZ-bY-bgx" secondAttribute="centerY" id="8II-Zw-Sfx"/>
+ <constraint firstAttribute="centerX" secondItem="pGZ-bY-bgx" secondAttribute="centerX" id="Bzb-Vi-8MN"/>
+ </constraints>
+ <connections>
+ <outlet property="image" destination="9Ej-7o-iGX" id="9Vw-ET-NAz"/>
+ <outlet property="message" destination="Jz3-Ch-ekb" id="tMh-i8-TlF"/>
+ <outlet property="shareButton" destination="WnY-H8-xZB" id="FMS-ZI-eSo"/>
+ <outlet property="title" destination="9PB-XH-zjT" id="l2J-TX-8lx"/>
+ <outlet property="videoView" destination="zDQ-dL-OUk" id="PyY-Rc-3DW"/>
+ </connections>
+ <point key="canvasLocation" x="609" y="114"/>
+ </view>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+ </objects>
+ <resources>
+ <image name="ic_cancel" width="40" height="40"/>
+ <image name="img_achive_pedestrian" width="240" height="240"/>
+ </resources>
+</document>
diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMLandscapeRoutePreview.xib b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMLandscapeRoutePreview.xib
index 0c9bcb52c2..5c9097c040 100644
--- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMLandscapeRoutePreview.xib
+++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMLandscapeRoutePreview.xib
@@ -1,9 +1,15 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="14D131" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="14E46" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
</dependencies>
+ <customFonts key="customFonts">
+ <mutableArray key="HelveticaNeue.ttc">
+ <string>HelveticaNeue-Medium</string>
+ <string>HelveticaNeue-Medium</string>
+ </mutableArray>
+ </customFonts>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="MWMNavigationDashboardManager">
<connections>
diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMPortraitRoutePreview.xib b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMPortraitRoutePreview.xib
index f7cee5ab21..f0f91de9b7 100644
--- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMPortraitRoutePreview.xib
+++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMPortraitRoutePreview.xib
@@ -1,9 +1,15 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="14D131" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="14E46" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
</dependencies>
+ <customFonts key="customFonts">
+ <mutableArray key="HelveticaNeue.ttc">
+ <string>HelveticaNeue-Medium</string>
+ <string>HelveticaNeue-Medium</string>
+ </mutableArray>
+ </customFonts>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="MWMNavigationDashboardManager">
<connections>
diff --git a/iphone/Maps/Classes/MapViewController.mm b/iphone/Maps/Classes/MapViewController.mm
index 5800d9c2ae..2b54b48095 100644
--- a/iphone/Maps/Classes/MapViewController.mm
+++ b/iphone/Maps/Classes/MapViewController.mm
@@ -31,6 +31,11 @@
extern NSString * const kAlohalyticsTapEventKey = @"$onClick";
+static NSString * const kShowPedestrianToastKey = @"ShowPedestrianToastKey";
+static NSString * const kShowPedestrianAchieveToastKey = @"ShowPedestrianAchieveToastKey";
+static NSString * const kPedestrianRouteCountKey = @"PedestrianRouteCountKey";
+static NSString * const kFirstPedestrianToastDateKey = @"FirstPedestrianToastDateKey";
+
typedef NS_ENUM(NSUInteger, ForceRoutingStateChange)
{
ForceRoutingStateChangeNone,
@@ -532,6 +537,12 @@ typedef NS_OPTIONS(NSUInteger, MapInfoView)
{
[super viewDidAppear:animated];
self.menuRestoreState = self.controlsManager.menuState;
+ if (![NSUserDefaults.standardUserDefaults boolForKey:kShowPedestrianToastKey])
+ {
+ [NSUserDefaults.standardUserDefaults setBool:YES forKey:kShowPedestrianToastKey];
+ [self.alertController presentPedestrianToastAlert:YES];
+ [[NSUserDefaults standardUserDefaults] setValue:NSDate.date forKey:kFirstPedestrianToastDateKey];
+ }
}
- (void)viewWillDisappear:(BOOL)animated
@@ -659,6 +670,8 @@ typedef NS_OPTIONS(NSUInteger, MapInfoView)
f.SetRouteBuildingListener([self, &f](routing::IRouter::ResultCode code, vector<storage::TIndex> const & absentCountries, vector<storage::TIndex> const & absentRoutes)
{
+ if (f.GetRouter() == routing::RouterType::Pedestrian)
+ [self countPedestrianRoute];
switch (code)
{
case routing::IRouter::ResultCode::NoError:
@@ -711,6 +724,25 @@ typedef NS_OPTIONS(NSUInteger, MapInfoView)
return self;
}
+- (void)countPedestrianRoute
+{
+ if ([NSUserDefaults.standardUserDefaults boolForKey:kShowPedestrianAchieveToastKey])
+ return;
+ NSInteger pedestrianRoutesCount = [NSUserDefaults.standardUserDefaults integerForKey:kPedestrianRouteCountKey];
+ [NSUserDefaults.standardUserDefaults setInteger:++pedestrianRoutesCount forKey:kPedestrianRouteCountKey];
+ // We show pedestrian promotion dialog if user has built at least 3 routes and more than 1 day has passed since
+ // the first pedestrian navigation promotion.
+ if (pedestrianRoutesCount < 3)
+ return;
+ NSDate * firstToastDate = [NSUserDefaults.standardUserDefaults valueForKey:kFirstPedestrianToastDateKey];
+ NSTimeInterval const day = 24 * 60 * 60;
+ NSTimeInterval const timePassed = [NSDate.date timeIntervalSinceDate:firstToastDate];
+ if (timePassed < day)
+ return;
+ [NSUserDefaults.standardUserDefaults setBool:YES forKey:kShowPedestrianAchieveToastKey];
+ [self.alertController presentPedestrianToastAlert:NO];
+}
+
#pragma mark - API bar
- (MWMAPIBar *)apiBar
diff --git a/iphone/Maps/Classes/Share/MWMActivityViewController.h b/iphone/Maps/Classes/Share/MWMActivityViewController.h
index a77da526ed..76accc9d98 100644
--- a/iphone/Maps/Classes/Share/MWMActivityViewController.h
+++ b/iphone/Maps/Classes/Share/MWMActivityViewController.h
@@ -10,6 +10,7 @@
+ (instancetype)shareControllerForLocationTitle:(NSString *)title location:(CLLocationCoordinate2D)location
myPosition:(BOOL)myPosition;
++ (instancetype)shareControllerForPedestrianRoutesToast;
- (void)presentInParentViewController:(UIViewController *)parentVC anchorView:(UIView *)anchorView;
diff --git a/iphone/Maps/Classes/Share/MWMActivityViewController.m b/iphone/Maps/Classes/Share/MWMActivityViewController.m
index 8765a533c7..d4c32ec9c6 100644
--- a/iphone/Maps/Classes/Share/MWMActivityViewController.m
+++ b/iphone/Maps/Classes/Share/MWMActivityViewController.m
@@ -8,6 +8,7 @@
#import "MWMActivityViewController.h"
#import "MWMShareLocationActivityItem.h"
+#import "MWMSharePedestrianRoutesToastActivityItem.h"
@interface MWMActivityViewController ()
@@ -36,6 +37,15 @@
return [[self alloc] initWithActivityItem:item];
}
++ (instancetype)shareControllerForPedestrianRoutesToast
+{
+ MWMSharePedestrianRoutesToastActivityItem * item = [[MWMSharePedestrianRoutesToastActivityItem alloc] init];
+ MWMActivityViewController * vc = [[self alloc] initWithActivityItem:item];
+ if ([vc respondsToSelector:@selector(popoverPresentationController)])
+ vc.popoverPresentationController.permittedArrowDirections = UIPopoverArrowDirectionDown;
+ return vc;
+}
+
- (void)presentInParentViewController:(UIViewController *)parentVC anchorView:(UIView *)anchorView
{
self.ownerViewController = parentVC;
@@ -53,7 +63,7 @@
{
[self dismissViewControllerAnimated:YES completion:nil];
[coordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext> context) {}
- completion:^(id<UIViewControllerTransitionCoordinatorContext> context)
+ completion:^(id<UIViewControllerTransitionCoordinatorContext> context)
{
[self presentInParentViewController:self.ownerViewController anchorView:self.anchorView];
}];
diff --git a/iphone/Maps/Classes/Share/MWMShareLocationActivityItem.h b/iphone/Maps/Classes/Share/MWMShareLocationActivityItem.h
index 7daa8b5b5e..6237d5c38c 100644
--- a/iphone/Maps/Classes/Share/MWMShareLocationActivityItem.h
+++ b/iphone/Maps/Classes/Share/MWMShareLocationActivityItem.h
@@ -6,8 +6,6 @@
// Copyright (c) 2015 MapsWithMe. All rights reserved.
//
-#import <Foundation/Foundation.h>
-
@interface MWMShareLocationActivityItem : NSObject <UIActivityItemSource>
- (instancetype)initWithTitle:(NSString *)title location:(CLLocationCoordinate2D)location myPosition:(BOOL)myPosition;
diff --git a/iphone/Maps/Classes/Share/MWMSharePedestrianRoutesToastActivityItem.h b/iphone/Maps/Classes/Share/MWMSharePedestrianRoutesToastActivityItem.h
new file mode 100644
index 0000000000..cdfb632ad0
--- /dev/null
+++ b/iphone/Maps/Classes/Share/MWMSharePedestrianRoutesToastActivityItem.h
@@ -0,0 +1,11 @@
+//
+// MWMSharePedestrianRoutesToastActivityItem.h
+// Maps
+//
+// Created by Ilya Grechuhin on 06.08.15.
+// Copyright (c) 2015 MapsWithMe. All rights reserved.
+//
+
+@interface MWMSharePedestrianRoutesToastActivityItem : NSObject <UIActivityItemSource>
+
+@end
diff --git a/iphone/Maps/Classes/Share/MWMSharePedestrianRoutesToastActivityItem.m b/iphone/Maps/Classes/Share/MWMSharePedestrianRoutesToastActivityItem.m
new file mode 100644
index 0000000000..500f05104d
--- /dev/null
+++ b/iphone/Maps/Classes/Share/MWMSharePedestrianRoutesToastActivityItem.m
@@ -0,0 +1,44 @@
+//
+// MWMSharePedestrianRoutesToastActivityItem.m
+// Maps
+//
+// Created by Ilya Grechuhin on 06.08.15.
+// Copyright (c) 2015 MapsWithMe. All rights reserved.
+//
+
+#import "Macros.h"
+#import "MWMSharePedestrianRoutesToastActivityItem.h"
+#import "Statistics.h"
+
+#import "3party/Alohalytics/src/alohalytics_objc.h"
+
+@implementation MWMSharePedestrianRoutesToastActivityItem
+
+#pragma mark - UIActivityItemSource
+
+- (id)activityViewControllerPlaceholderItem:(UIActivityViewController *)activityViewController
+{
+ return NSString.string;
+}
+
+- (id)activityViewController:(UIActivityViewController *)activityViewController
+ itemForActivityType:(NSString *)activityType
+{
+ NSString * event = @"MWMSharePedestrianRoutesToastActivityItem:activityViewController:itemForActivityType:";
+ [Alohalytics logEvent:event withValue:activityType];
+ if ([UIActivityTypePostToFacebook isEqualToString:activityType])
+ return [NSURL URLWithString:@"http://maps.me/fb_share"];
+ if ([UIActivityTypeMessage isEqualToString:activityType])
+ return L(@"share_walking_routes_sms");
+ if ([UIActivityTypeMail isEqualToString:activityType])
+ return L(@"share_walking_routes_email_body");
+ return L(@"share_walking_routes_messenger");
+}
+
+- (NSString *)activityViewController:(UIActivityViewController *)activityViewController
+ subjectForActivityType:(NSString *)activityType
+{
+ return L(@"share_walking_routes_email_subject");
+}
+
+@end
diff --git a/iphone/Maps/Images.xcassets/NewDialog/img_achive_pedestrian.imageset/Contents.json b/iphone/Maps/Images.xcassets/NewDialog/img_achive_pedestrian.imageset/Contents.json
new file mode 100644
index 0000000000..dc95753edb
--- /dev/null
+++ b/iphone/Maps/Images.xcassets/NewDialog/img_achive_pedestrian.imageset/Contents.json
@@ -0,0 +1,23 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x",
+ "filename" : "img_achive_pedestrian.png"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x",
+ "filename" : "img_achive_pedestrian@2x.png"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x",
+ "filename" : "img_achive_pedestrian@3x.png"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+} \ No newline at end of file
diff --git a/iphone/Maps/Images.xcassets/NewDialog/img_achive_pedestrian.imageset/img_achive_pedestrian.png b/iphone/Maps/Images.xcassets/NewDialog/img_achive_pedestrian.imageset/img_achive_pedestrian.png
new file mode 100644
index 0000000000..7f0a11abd2
--- /dev/null
+++ b/iphone/Maps/Images.xcassets/NewDialog/img_achive_pedestrian.imageset/img_achive_pedestrian.png
Binary files differ
diff --git a/iphone/Maps/Images.xcassets/NewDialog/img_achive_pedestrian.imageset/img_achive_pedestrian@2x.png b/iphone/Maps/Images.xcassets/NewDialog/img_achive_pedestrian.imageset/img_achive_pedestrian@2x.png
new file mode 100644
index 0000000000..526d42ad8c
--- /dev/null
+++ b/iphone/Maps/Images.xcassets/NewDialog/img_achive_pedestrian.imageset/img_achive_pedestrian@2x.png
Binary files differ
diff --git a/iphone/Maps/Images.xcassets/NewDialog/img_achive_pedestrian.imageset/img_achive_pedestrian@3x.png b/iphone/Maps/Images.xcassets/NewDialog/img_achive_pedestrian.imageset/img_achive_pedestrian@3x.png
new file mode 100644
index 0000000000..39a90ccd64
--- /dev/null
+++ b/iphone/Maps/Images.xcassets/NewDialog/img_achive_pedestrian.imageset/img_achive_pedestrian@3x.png
Binary files differ
diff --git a/iphone/Maps/Images.xcassets/NewDialog/img_pedestrian.imageset/Contents.json b/iphone/Maps/Images.xcassets/NewDialog/img_pedestrian.imageset/Contents.json
new file mode 100644
index 0000000000..cded667a01
--- /dev/null
+++ b/iphone/Maps/Images.xcassets/NewDialog/img_pedestrian.imageset/Contents.json
@@ -0,0 +1,23 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x",
+ "filename" : "img_pedestrian.png"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x",
+ "filename" : "img_pedestrian@2x.png"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x",
+ "filename" : "img_pedestrian@3x.png"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+} \ No newline at end of file
diff --git a/iphone/Maps/Images.xcassets/NewDialog/img_pedestrian.imageset/img_pedestrian.png b/iphone/Maps/Images.xcassets/NewDialog/img_pedestrian.imageset/img_pedestrian.png
new file mode 100644
index 0000000000..cf70c7e8eb
--- /dev/null
+++ b/iphone/Maps/Images.xcassets/NewDialog/img_pedestrian.imageset/img_pedestrian.png
Binary files differ
diff --git a/iphone/Maps/Images.xcassets/NewDialog/img_pedestrian.imageset/img_pedestrian@2x.png b/iphone/Maps/Images.xcassets/NewDialog/img_pedestrian.imageset/img_pedestrian@2x.png
new file mode 100644
index 0000000000..3e072c35e5
--- /dev/null
+++ b/iphone/Maps/Images.xcassets/NewDialog/img_pedestrian.imageset/img_pedestrian@2x.png
Binary files differ
diff --git a/iphone/Maps/Images.xcassets/NewDialog/img_pedestrian.imageset/img_pedestrian@3x.png b/iphone/Maps/Images.xcassets/NewDialog/img_pedestrian.imageset/img_pedestrian@3x.png
new file mode 100644
index 0000000000..6f3da5b383
--- /dev/null
+++ b/iphone/Maps/Images.xcassets/NewDialog/img_pedestrian.imageset/img_pedestrian@3x.png
Binary files differ
diff --git a/iphone/Maps/Maps.xcodeproj/project.pbxproj b/iphone/Maps/Maps.xcodeproj/project.pbxproj
index d0bfed4d29..77f8a008fa 100644
--- a/iphone/Maps/Maps.xcodeproj/project.pbxproj
+++ b/iphone/Maps/Maps.xcodeproj/project.pbxproj
@@ -44,6 +44,8 @@
347274791B0F4FD900756B37 /* me.maps.watchkitextension.production.entitlements in Resources */ = {isa = PBXBuildFile; fileRef = 347274781B0F4FD900756B37 /* me.maps.watchkitextension.production.entitlements */; };
3472747B1B0F4FF100756B37 /* me.maps.production.entitlements in Resources */ = {isa = PBXBuildFile; fileRef = 3472747A1B0F4FF100756B37 /* me.maps.production.entitlements */; };
3472EC051B4D44BE0085CB79 /* UIFont+MapsMeFonts.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3472EC041B4D44BE0085CB79 /* UIFont+MapsMeFonts.mm */; };
+ 347BAC691B733D540010FF78 /* MWMPedestrianShareAlert.xib in Resources */ = {isa = PBXBuildFile; fileRef = 347BAC681B733D540010FF78 /* MWMPedestrianShareAlert.xib */; };
+ 347BAC6E1B736BA70010FF78 /* MWMSharePedestrianRoutesToastActivityItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 347BAC6D1B736BA70010FF78 /* MWMSharePedestrianRoutesToastActivityItem.m */; };
348E578E1B0F3752000FA02A /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EEB7E22111E9079400080A68 /* CoreLocation.framework */; };
3497A93A1B5CF8A900F51E55 /* MWMNavigationDashboardManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3497A9371B5CF8A900F51E55 /* MWMNavigationDashboardManager.mm */; };
349A357A1B53D4C9009677EE /* MWMCircularProgress.m in Sources */ = {isa = PBXBuildFile; fileRef = 349A35761B53D4C9009677EE /* MWMCircularProgress.m */; };
@@ -57,6 +59,7 @@
349A358E1B53EABC009677EE /* MWMSearchDownloadMapRequestView.m in Sources */ = {isa = PBXBuildFile; fileRef = 349A358B1B53EABC009677EE /* MWMSearchDownloadMapRequestView.m */; };
34A742FE1AE5461A00CE15EB /* index.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34A742FD1AE5461A00CE15EB /* index.cpp */; };
34A743001AE5468200CE15EB /* storage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34A742FF1AE5468200CE15EB /* storage.cpp */; };
+ 34B16C451B72655D000D3A0D /* MWMPedestrianShareAlert.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34B16C441B72655D000D3A0D /* MWMPedestrianShareAlert.mm */; };
34BC72211B0DECAE0012A34B /* MWMLocationButton.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34BC720C1B0DECAE0012A34B /* MWMLocationButton.mm */; };
34BC72221B0DECAE0012A34B /* MWMLocationButtonView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34BC720E1B0DECAE0012A34B /* MWMLocationButtonView.mm */; };
34BC72231B0DECAE0012A34B /* MWMLocationButton.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34BC720F1B0DECAE0012A34B /* MWMLocationButton.xib */; };
@@ -379,6 +382,9 @@
3472747A1B0F4FF100756B37 /* me.maps.production.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = me.maps.production.entitlements; sourceTree = "<group>"; };
3472EC031B4D44BE0085CB79 /* UIFont+MapsMeFonts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIFont+MapsMeFonts.h"; sourceTree = "<group>"; };
3472EC041B4D44BE0085CB79 /* UIFont+MapsMeFonts.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "UIFont+MapsMeFonts.mm"; sourceTree = "<group>"; };
+ 347BAC681B733D540010FF78 /* MWMPedestrianShareAlert.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMPedestrianShareAlert.xib; sourceTree = "<group>"; };
+ 347BAC6C1B736BA70010FF78 /* MWMSharePedestrianRoutesToastActivityItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSharePedestrianRoutesToastActivityItem.h; sourceTree = "<group>"; };
+ 347BAC6D1B736BA70010FF78 /* MWMSharePedestrianRoutesToastActivityItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MWMSharePedestrianRoutesToastActivityItem.m; sourceTree = "<group>"; };
348320CC1B6A2C52007EC039 /* MWMNavigationViewProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MWMNavigationViewProtocol.h; sourceTree = "<group>"; };
348E57981B0F49D8000FA02A /* maps.me dbg.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "maps.me dbg.app"; sourceTree = BUILT_PRODUCTS_DIR; };
348E57C81B0F49EE000FA02A /* maps.me WatchKit Extension WatchKit Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "maps.me WatchKit Extension WatchKit Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -402,6 +408,8 @@
349A358B1B53EABC009677EE /* MWMSearchDownloadMapRequestView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MWMSearchDownloadMapRequestView.m; sourceTree = "<group>"; };
34A742FD1AE5461A00CE15EB /* index.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = index.cpp; path = ../../../storage/index.cpp; sourceTree = "<group>"; };
34A742FF1AE5468200CE15EB /* storage.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = storage.cpp; path = ../../../storage/storage.cpp; sourceTree = "<group>"; };
+ 34B16C431B72655D000D3A0D /* MWMPedestrianShareAlert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMPedestrianShareAlert.h; sourceTree = "<group>"; };
+ 34B16C441B72655D000D3A0D /* MWMPedestrianShareAlert.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMPedestrianShareAlert.mm; sourceTree = "<group>"; };
34BC720B1B0DECAE0012A34B /* MWMLocationButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMLocationButton.h; sourceTree = "<group>"; };
34BC720C1B0DECAE0012A34B /* MWMLocationButton.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMLocationButton.mm; sourceTree = "<group>"; };
34BC720D1B0DECAE0012A34B /* MWMLocationButtonView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMLocationButtonView.h; sourceTree = "<group>"; };
@@ -973,6 +981,8 @@
340837121B7243CE00B5C185 /* MWMActivityViewController.m */,
340837141B72451A00B5C185 /* MWMShareLocationActivityItem.h */,
340837151B72451A00B5C185 /* MWMShareLocationActivityItem.mm */,
+ 347BAC6C1B736BA70010FF78 /* MWMSharePedestrianRoutesToastActivityItem.h */,
+ 347BAC6D1B736BA70010FF78 /* MWMSharePedestrianRoutesToastActivityItem.m */,
);
path = Share;
sourceTree = "<group>";
@@ -1132,6 +1142,16 @@
path = CustomViews/SearchDownloadMapRequest;
sourceTree = "<group>";
};
+ 34B16C421B72653B000D3A0D /* PedestrianShareAlert */ = {
+ isa = PBXGroup;
+ children = (
+ 34B16C431B72655D000D3A0D /* MWMPedestrianShareAlert.h */,
+ 34B16C441B72655D000D3A0D /* MWMPedestrianShareAlert.mm */,
+ 347BAC681B733D540010FF78 /* MWMPedestrianShareAlert.xib */,
+ );
+ path = PedestrianShareAlert;
+ sourceTree = "<group>";
+ };
34BC72091B0DECAE0012A34B /* MapViewControls */ = {
isa = PBXGroup;
children = (
@@ -1418,6 +1438,7 @@
F6BBF2C31B4FFB56000CF8E2 /* LocationAlert */,
F64F19801AB81A00006EAF7E /* AlertController */,
F6BC1E4F1ACBF97000EF0360 /* FacebookAlert */,
+ 34B16C421B72653B000D3A0D /* PedestrianShareAlert */,
F67BBB531AC54A7800D162C7 /* FeedbackAlert */,
F64F19841AB81A00006EAF7E /* BaseAlert */,
F61579301AC2CE760032D8E9 /* RateAlert */,
@@ -2073,6 +2094,7 @@
F6588E331B15D73100EE1E58 /* MWMBookmarkColorViewController.xib in Resources */,
F6CB215C1AEE704D00FB8963 /* PlacePageInfoCell.xib in Resources */,
45159BF91B0CA2D5009BFA85 /* resources-6plus in Resources */,
+ 347BAC691B733D540010FF78 /* MWMPedestrianShareAlert.xib in Resources */,
FAF30A95173AB23900818BF6 /* 00_roboto_regular.ttf in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -2228,6 +2250,8 @@
F6DBF9B61AA8779300F2EC2C /* CALayer+RuntimeAttributes.mm in Sources */,
FA36B80D15403A4F004560CC /* BookmarksVC.mm in Sources */,
F6ED135B1B18AA930095C6DE /* MWMExtendedPlacePageView.m in Sources */,
+ 34B16C451B72655D000D3A0D /* MWMPedestrianShareAlert.mm in Sources */,
+ 347BAC6E1B736BA70010FF78 /* MWMSharePedestrianRoutesToastActivityItem.m in Sources */,
F6588E2F1B15D2BC00EE1E58 /* MWMBookmarkColorViewController.mm in Sources */,
349A358E1B53EABC009677EE /* MWMSearchDownloadMapRequestView.m in Sources */,
A32B6D4D1A14980500E54A65 /* iosOGLContextFactory.mm in Sources */,
diff --git a/iphone/Maps/UIColor+MapsMeColor.h b/iphone/Maps/UIColor+MapsMeColor.h
index 4b269c98b5..443c106318 100644
--- a/iphone/Maps/UIColor+MapsMeColor.h
+++ b/iphone/Maps/UIColor+MapsMeColor.h
@@ -27,6 +27,7 @@
+ (UIColor *)whiteHintText;
+ (UIColor *)whiteDividers;
+ (UIColor *)buttonBlueText;
++ (UIColor *)buttonHighlightedBlueText;
+ (UIColor *)alertBackground;
+ (UIColor *)colorWithName:(NSString *)colorName;
diff --git a/iphone/Maps/UIColor+MapsMeColor.mm b/iphone/Maps/UIColor+MapsMeColor.mm
index a5bcecb83c..5c47c2451d 100644
--- a/iphone/Maps/UIColor+MapsMeColor.mm
+++ b/iphone/Maps/UIColor+MapsMeColor.mm
@@ -108,6 +108,11 @@ static CGFloat const alpha100 = 1.;
return [UIColor colorWithRed:scaled(3.) green:scaled(122.) blue:scaled(255.) alpha:alpha100];
}
++ (UIColor *)buttonHighlightedBlueText
+{
+ return [UIColor colorWithRed:scaled(3.) green:scaled(122.) blue:scaled(255.) alpha:alpha54];
+}
+
+ (UIColor *)alertBackground
{
return [UIColor colorWithWhite:1. alpha:.88f];