diff options
author | Ilya Grechuhin <i.grechuhin@mapswithme.com> | 2015-08-07 17:32:00 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 03:00:04 +0300 |
commit | 305990bd0c552aa3604bf9a7b73f33cab9febbde (patch) | |
tree | 99f2a83e123af21bf82a2148a5219d8e2a20d96d /iphone/Maps/Classes/CustomAlert | |
parent | 3a9c947779ddf45aefcec2c323d2c806fc433312 (diff) |
[ios] Added pedestrian route sharing dialog.
Diffstat (limited to 'iphone/Maps/Classes/CustomAlert')
9 files changed, 389 insertions, 49 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> |