|
@ -17,6 +17,7 @@ typedef void (^CloseAlertCompletion)();
|
|||
code:(routing::IRouter::ResultCode)code;
|
||||
- (void)presentRateAlert;
|
||||
- (void)presentFacebookAlert;
|
||||
- (void)presentPoint2PointAlertWithOkBlock:(nonnull CloseAlertCompletion)block needToRebuild:(BOOL)needToRebuild;
|
||||
- (void)presentRoutingDisclaimerAlert;
|
||||
- (void)presentDisabledLocationAlert;
|
||||
- (void)presentLocationAlert;
|
||||
|
|
|
@ -61,6 +61,11 @@ static NSString * const kAlertControllerNibIdentifier = @"MWMAlertViewController
|
|||
// });
|
||||
}
|
||||
|
||||
- (void)presentPoint2PointAlertWithOkBlock:(nonnull CloseAlertCompletion)block needToRebuild:(BOOL)needToRebuild
|
||||
{
|
||||
[self displayAlert:[MWMAlert point2PointAlertWithOkBlock:block needToRebuild:needToRebuild]];
|
||||
}
|
||||
|
||||
- (void)presentFacebookAlert
|
||||
{
|
||||
[self displayAlert:MWMAlert.facebookAlert];
|
||||
|
|
|
@ -23,6 +23,7 @@ typedef void (^RightButtonAction)();
|
|||
+ (MWMAlert *)noConnectionAlert;
|
||||
+ (MWMAlert *)locationServiceNotSupportedAlert;
|
||||
+ (MWMAlert *)pedestrianToastShareAlert:(BOOL)isFirstLaunch;
|
||||
+ (MWMAlert *)point2PointAlertWithOkBlock:(RightButtonAction)block needToRebuild:(BOOL)needToRebuild;
|
||||
- (void)close;
|
||||
|
||||
- (void)setNeedsCloseAlertAfterEnterBackground;
|
||||
|
|
|
@ -26,6 +26,11 @@
|
|||
return [MWMFacebookAlert alert];
|
||||
}
|
||||
|
||||
+ (MWMAlert *)point2PointAlertWithOkBlock:(RightButtonAction)block needToRebuild:(BOOL)needToRebuild
|
||||
{
|
||||
return [MWMDefaultAlert point2PointAlertWithOkBlock:block needToRebuild:needToRebuild];
|
||||
}
|
||||
|
||||
+ (MWMAlert *)routingDisclaimerAlertWithInitialOrientation:(UIInterfaceOrientation)orientation
|
||||
{
|
||||
return [MWMRoutingDisclaimerAlert alertWithInitialOrientation:orientation];
|
||||
|
|
|
@ -13,5 +13,6 @@
|
|||
+ (instancetype)noWiFiAlertWithName:(NSString *)name downloadBlock:(RightButtonAction)block;
|
||||
+ (instancetype)noConnectionAlert;
|
||||
+ (instancetype)locationServiceNotSupportedAlert;
|
||||
+ (instancetype)point2PointAlertWithOkBlock:(RightButtonAction)block needToRebuild:(BOOL)needToRebuild;
|
||||
|
||||
@end
|
||||
|
|
|
@ -108,6 +108,21 @@ static NSString * const kDefaultAlertNibName = @"MWMDefaultAlert";
|
|||
return [self defaultAlertWithTitle:@"routing_failed_cross_mwm_building" message:nil rightButtonTitle:@"ok" leftButtonTitle:nil rightButtonAction:nil];
|
||||
}
|
||||
|
||||
+ (instancetype)point2PointAlertWithOkBlock:(RightButtonAction)block needToRebuild:(BOOL)needToRebuild
|
||||
{
|
||||
if (needToRebuild)
|
||||
{
|
||||
return [self defaultAlertWithTitle:@"Navigation is available only from your current location."
|
||||
message:@"Do you want us to recreate/rebuild/ plan the route?"
|
||||
rightButtonTitle:@"ok" leftButtonTitle:@"cancel" rightButtonAction:block];
|
||||
}
|
||||
else
|
||||
{
|
||||
return [self defaultAlertWithTitle:@"dialog_routing_location_unknown"
|
||||
message:nil rightButtonTitle:@"ok" leftButtonTitle:nil rightButtonAction:nil];
|
||||
}
|
||||
}
|
||||
|
||||
+ (instancetype)defaultAlertWithTitle:(nonnull NSString *)title message:(nullable NSString *)message rightButtonTitle:(nonnull NSString *)rightButtonTitle leftButtonTitle:(nullable NSString *)leftButtonTitle rightButtonAction:(nullable RightButtonAction)action
|
||||
{
|
||||
MWMDefaultAlert * alert = [[[NSBundle mainBundle] loadNibNamed:kDefaultAlertNibName owner:self options:nil] firstObject];
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?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="9059" systemVersion="15A284" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES">
|
||||
<dependencies>
|
||||
<deployment version="2048" identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9049"/>
|
||||
</dependencies>
|
||||
<customFonts key="customFonts">
|
||||
<mutableArray key="HelveticaNeue.ttc">
|
||||
|
@ -22,6 +22,7 @@
|
|||
<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="MvX-7q-CIH" userLabel="Title">
|
||||
<rect key="frame" x="20" y="20" width="240" height="29"/>
|
||||
<animations/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="29" id="018-Nz-384"/>
|
||||
<constraint firstAttribute="width" constant="240" id="cHd-lJ-pXe"/>
|
||||
|
@ -36,6 +37,7 @@
|
|||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Message" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Q3X-9G-3PT">
|
||||
<rect key="frame" x="23" y="61" width="234" height="17"/>
|
||||
<animations/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="234" id="YLG-PG-WHS"/>
|
||||
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="17" id="iOI-5t-pEY"/>
|
||||
|
@ -49,6 +51,7 @@
|
|||
</label>
|
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" verticalHuggingPriority="1000" alwaysBounceVertical="YES" scrollEnabled="NO" style="grouped" separatorStyle="none" rowHeight="32" sectionHeaderHeight="44" sectionFooterHeight="1" translatesAutoresizingMaskIntoConstraints="NO" id="1lL-cj-2oS">
|
||||
<rect key="frame" x="0.0" y="98" width="280" height="88"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="88" id="92H-Th-Xgt"/>
|
||||
|
@ -63,6 +66,7 @@
|
|||
</tableView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="2nQ-k3-Rx3" userLabel="hDivider">
|
||||
<rect key="frame" x="0.0" y="186" width="280" height="1"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.12" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="280" id="YGc-0s-8yD"/>
|
||||
|
@ -71,6 +75,7 @@
|
|||
</view>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="q87-qQ-0rn">
|
||||
<rect key="frame" x="140" y="186" width="140" height="44"/>
|
||||
<animations/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="140" id="1Io-1t-Odn"/>
|
||||
<constraint firstAttribute="height" constant="44" id="CeP-fJ-qZs"/>
|
||||
|
@ -91,6 +96,7 @@
|
|||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="dhS-fg-rNl">
|
||||
<rect key="frame" x="0.0" y="186" width="140" height="44"/>
|
||||
<animations/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="44" id="7gw-Uu-UEK"/>
|
||||
<constraint firstAttribute="width" constant="140" id="EMA-LM-Zje"/>
|
||||
|
@ -111,6 +117,7 @@
|
|||
</button>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Jjh-VP-emP" userLabel="vDivider">
|
||||
<rect key="frame" x="139" y="186" width="1" height="44"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.12" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="1" id="8kQ-Yd-0D3"/>
|
||||
|
@ -118,6 +125,7 @@
|
|||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="1" alpha="0.88" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="dhS-fg-rNl" firstAttribute="top" secondItem="1lL-cj-2oS" secondAttribute="bottom" id="2aT-au-ilL"/>
|
||||
|
@ -156,6 +164,7 @@
|
|||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
</subviews>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerY" secondItem="Hay-Qx-kVw" secondAttribute="centerY" id="5Z9-NF-BEW"/>
|
||||
|
@ -173,9 +182,4 @@
|
|||
<resources>
|
||||
<image name="dialog_btn_press" width="280" height="44"/>
|
||||
</resources>
|
||||
<simulatedMetricsContainer key="defaultSimulatedMetrics">
|
||||
<simulatedStatusBarMetrics key="statusBar"/>
|
||||
<simulatedOrientationMetrics key="orientation"/>
|
||||
<simulatedScreenMetrics key="destination" type="retina4"/>
|
||||
</simulatedMetricsContainer>
|
||||
</document>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?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="9059" systemVersion="15A284" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9049"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
|
@ -11,10 +11,12 @@
|
|||
<rect key="frame" x="0.0" y="0.0" width="280" height="33"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="LWd-Zy-XGd" id="gf8-bS-tvq">
|
||||
<rect key="frame" x="0.0" y="0.0" width="280" height="32.5"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1B4-T1-g4X">
|
||||
<rect key="frame" x="20" y="8" width="240" height="17"/>
|
||||
<animations/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="17" id="u5A-6l-INO"/>
|
||||
</constraints>
|
||||
|
@ -23,7 +25,8 @@
|
|||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" red="0.90196078431372551" green="0.90196078431372551" blue="0.90196078431372551" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerX" secondItem="1B4-T1-g4X" secondAttribute="centerX" id="2AW-qe-sgg"/>
|
||||
<constraint firstAttribute="centerY" secondItem="1B4-T1-g4X" secondAttribute="centerY" id="TD9-6y-WM8"/>
|
||||
|
@ -31,16 +34,12 @@
|
|||
<constraint firstItem="1B4-T1-g4X" firstAttribute="leading" secondItem="gf8-bS-tvq" secondAttribute="leading" constant="20" id="sZo-pt-LJL"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.059999999999999998" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" red="0.90196078431372551" green="0.90196078431372551" blue="0.90196078431372551" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<connections>
|
||||
<outlet property="titleLabel" destination="1B4-T1-g4X" id="m4n-H9-1Ta"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="235" y="180.5"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
<simulatedMetricsContainer key="defaultSimulatedMetrics">
|
||||
<simulatedStatusBarMetrics key="statusBar"/>
|
||||
<simulatedOrientationMetrics key="orientation"/>
|
||||
<simulatedScreenMetrics key="destination" type="retina4"/>
|
||||
</simulatedMetricsContainer>
|
||||
</document>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?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="9059" systemVersion="15A284" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9049"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
|
@ -13,6 +13,7 @@
|
|||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Title" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hh9-2l-gu2">
|
||||
<rect key="frame" x="20" y="14" width="160" height="16"/>
|
||||
<animations/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="160" id="4WE-p5-RdF"/>
|
||||
<constraint firstAttribute="height" constant="16" id="FQE-Zk-gXr"/>
|
||||
|
@ -23,6 +24,7 @@
|
|||
</label>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_iexpand_more" translatesAutoresizingMaskIntoConstraints="NO" id="eqn-NQ-zOk">
|
||||
<rect key="frame" x="254" y="19" width="12" height="8"/>
|
||||
<animations/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="12" id="CkX-aX-oaf"/>
|
||||
<constraint firstAttribute="height" constant="8" id="mLX-ow-5er"/>
|
||||
|
@ -30,6 +32,7 @@
|
|||
</imageView>
|
||||
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="tqG-fM-g6J">
|
||||
<rect key="frame" x="0.0" y="43" width="280" height="1"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.12" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="1" id="Vc3-uM-vHv"/>
|
||||
|
@ -37,6 +40,7 @@
|
|||
</view>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="size" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="m8f-ps-pFV">
|
||||
<rect key="frame" x="180" y="14" width="64" height="16"/>
|
||||
<animations/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="16" id="7Hg-8z-e56"/>
|
||||
<constraint firstAttribute="width" constant="64" id="hct-Jz-zGl"/>
|
||||
|
@ -47,6 +51,7 @@
|
|||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="eIt-Yb-1Yl">
|
||||
<rect key="frame" x="0.0" y="0.0" width="280" height="44"/>
|
||||
<animations/>
|
||||
<state key="normal">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
|
@ -56,6 +61,7 @@
|
|||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<animations/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.059999999999999998" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="eIt-Yb-1Yl" secondAttribute="bottom" id="61x-d3-FtO"/>
|
||||
|
@ -89,9 +95,4 @@
|
|||
<image name="dialog_btn_press" width="280" height="44"/>
|
||||
<image name="ic_iexpand_more" width="12" height="8"/>
|
||||
</resources>
|
||||
<simulatedMetricsContainer key="defaultSimulatedMetrics">
|
||||
<simulatedStatusBarMetrics key="statusBar"/>
|
||||
<simulatedOrientationMetrics key="orientation"/>
|
||||
<simulatedScreenMetrics key="destination" type="retina4"/>
|
||||
</simulatedMetricsContainer>
|
||||
</document>
|
||||
|
|
|
@ -1,8 +1,20 @@
|
|||
#import <Foundation/Foundation.h>
|
||||
|
||||
typedef NS_ENUM(NSInteger, MWMCircularProgressState)
|
||||
{
|
||||
MWMCircularProgressStateNormal,
|
||||
MWMCircularProgressStateHighlighted,
|
||||
MWMCircularProgressStateSelected,
|
||||
MWMCircularProgressStateSelectedHighlighted,
|
||||
MWMCircularProgressStateProgress,
|
||||
MWMCircularProgressStateProgressHighlighted,
|
||||
MWMCircularProgressStateFailed,
|
||||
MWMCircularProgressStateFailedHighlighted,
|
||||
MWMCircularProgressStateCompleted
|
||||
};
|
||||
|
||||
@class MWMCircularProgress;
|
||||
|
||||
@protocol MWMCircularProgressDelegate <NSObject>
|
||||
@protocol MWMCircularProgressProtocol <NSObject>
|
||||
|
||||
- (void)progressButtonPressed:(nonnull MWMCircularProgress *)progress;
|
||||
|
||||
|
@ -11,10 +23,16 @@
|
|||
@interface MWMCircularProgress : NSObject
|
||||
|
||||
@property (nonatomic) CGFloat progress;
|
||||
@property (nonatomic) BOOL failed;
|
||||
@property (nonatomic) MWMCircularProgressState state;
|
||||
@property (weak, nonatomic) id<MWMCircularProgressProtocol> delegate;
|
||||
|
||||
- (void)setImage:(nonnull UIImage *)image forState:(MWMCircularProgressState)state;
|
||||
- (void)setColor:(nonnull UIColor *)color forState:(MWMCircularProgressState)state;
|
||||
|
||||
- (nonnull instancetype)init __attribute__((unavailable("init is not available")));
|
||||
- (nonnull instancetype)initWithParentView:(nonnull UIView *)parentView delegate:(nonnull id <MWMCircularProgressDelegate>)delegate;
|
||||
- (nonnull instancetype)initWithParentView:(nonnull UIView *)parentView;
|
||||
- (void)reset;
|
||||
- (void)startSpinner;
|
||||
- (void)stopSpinner;
|
||||
|
||||
@end
|
||||
|
|
|
@ -4,24 +4,19 @@
|
|||
@interface MWMCircularProgress ()
|
||||
|
||||
@property (nonatomic) IBOutlet MWMCircularProgressView * rootView;
|
||||
@property (nonatomic) IBOutlet UIButton * button;
|
||||
|
||||
@property (nonatomic) NSNumber * nextProgressToAnimate;
|
||||
|
||||
@property (weak, nonatomic) id <MWMCircularProgressDelegate> delegate;
|
||||
|
||||
@end
|
||||
|
||||
@implementation MWMCircularProgress
|
||||
|
||||
- (nonnull instancetype)initWithParentView:(nonnull UIView *)parentView delegate:(nonnull id <MWMCircularProgressDelegate>)delegate
|
||||
- (nonnull instancetype)initWithParentView:(nonnull UIView *)parentView
|
||||
{
|
||||
self = [super init];
|
||||
if (self)
|
||||
{
|
||||
[[NSBundle mainBundle] loadNibNamed:self.class.className owner:self options:nil];
|
||||
[parentView addSubview:self.rootView];
|
||||
self.delegate = delegate;
|
||||
[self reset];
|
||||
}
|
||||
return self;
|
||||
|
@ -33,6 +28,28 @@
|
|||
self.nextProgressToAnimate = nil;
|
||||
}
|
||||
|
||||
- (void)setImage:(nonnull UIImage *)image forState:(MWMCircularProgressState)state
|
||||
{
|
||||
[self.rootView setImage:image forState:state];
|
||||
}
|
||||
|
||||
- (void)setColor:(nonnull UIColor *)color forState:(MWMCircularProgressState)state
|
||||
{
|
||||
[self.rootView setColor:color forState:state];
|
||||
}
|
||||
|
||||
#pragma mark - Spinner
|
||||
|
||||
- (void)startSpinner
|
||||
{
|
||||
[self.rootView startSpinner];
|
||||
}
|
||||
|
||||
- (void)stopSpinner
|
||||
{
|
||||
[self.rootView stopSpinner];
|
||||
}
|
||||
|
||||
#pragma mark - Animation
|
||||
|
||||
- (void)animationDidStop:(CABasicAnimation *)anim finished:(BOOL)flag
|
||||
|
@ -66,18 +83,14 @@
|
|||
}
|
||||
}
|
||||
|
||||
- (void)setFailed:(BOOL)failed
|
||||
- (void)setState:(MWMCircularProgressState)state
|
||||
{
|
||||
if (self.button.selected == failed)
|
||||
return;
|
||||
self.button.selected = failed;
|
||||
[self.rootView refreshProgress];
|
||||
[self.rootView updatePath:self.progress];
|
||||
self.rootView.state = state;
|
||||
}
|
||||
|
||||
- (BOOL)failed
|
||||
- (MWMCircularProgressState)state
|
||||
{
|
||||
return self.button.selected;
|
||||
return self.rootView.state;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
<?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">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9059" systemVersion="15B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9049"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="MWMCircularProgress">
|
||||
<connections>
|
||||
<outlet property="button" destination="viF-Ee-7h0" id="v7b-pM-V7X"/>
|
||||
<outlet property="rootView" destination="2DE-Qh-89K" id="1DR-Lj-Wv9"/>
|
||||
</connections>
|
||||
</placeholder>
|
||||
|
@ -18,32 +17,39 @@
|
|||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" adjustsImageWhenDisabled="NO" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="viF-Ee-7h0">
|
||||
<rect key="frame" x="-6" y="-6" width="44" height="44"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<state key="normal" image="ic_stop_spinner">
|
||||
<state key="normal">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<state key="selected" image="ic_download_continue"/>
|
||||
<connections>
|
||||
<action selector="buttonTouchUpInside:" destination="-1" eventType="touchUpInside" id="aPG-4e-uSw"/>
|
||||
</connections>
|
||||
</button>
|
||||
<imageView hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="aMt-XV-9UK" userLabel="Spinner">
|
||||
<rect key="frame" x="0.0" y="0.0" width="32" height="32"/>
|
||||
<animations/>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="viF-Ee-7h0" firstAttribute="top" secondItem="2DE-Qh-89K" secondAttribute="top" constant="-6" id="3gS-24-Olj"/>
|
||||
<constraint firstItem="aMt-XV-9UK" firstAttribute="leading" secondItem="2DE-Qh-89K" secondAttribute="leading" id="JK6-QX-JcI"/>
|
||||
<constraint firstAttribute="bottom" secondItem="aMt-XV-9UK" secondAttribute="bottom" id="VFI-Yh-q1q"/>
|
||||
<constraint firstAttribute="trailing" secondItem="viF-Ee-7h0" secondAttribute="trailing" constant="-6" id="fQT-G3-rJF"/>
|
||||
<constraint firstItem="aMt-XV-9UK" firstAttribute="top" secondItem="2DE-Qh-89K" secondAttribute="top" id="fbs-bw-DIs"/>
|
||||
<constraint firstAttribute="bottom" secondItem="viF-Ee-7h0" secondAttribute="bottom" constant="-6" id="j4s-7V-lg9"/>
|
||||
<constraint firstAttribute="trailing" secondItem="aMt-XV-9UK" secondAttribute="trailing" id="k01-wU-25n"/>
|
||||
<constraint firstItem="viF-Ee-7h0" firstAttribute="leading" secondItem="2DE-Qh-89K" secondAttribute="leading" constant="-6" id="sHS-iu-Url"/>
|
||||
</constraints>
|
||||
<nil key="simulatedStatusBarMetrics"/>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<connections>
|
||||
<outlet property="button" destination="viF-Ee-7h0" id="0zP-Ye-sRs"/>
|
||||
<outlet property="owner" destination="-1" id="0n7-PI-5tO"/>
|
||||
<outlet property="spinner" destination="aMt-XV-9UK" id="bmp-bV-h3C"/>
|
||||
</connections>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="ic_download_continue" width="32" height="32"/>
|
||||
<image name="ic_stop_spinner" width="32" height="32"/>
|
||||
</resources>
|
||||
</document>
|
||||
|
|
|
@ -1,15 +1,19 @@
|
|||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface MWMCircularProgressView : UIView
|
||||
|
||||
@property (nonatomic, readonly) BOOL animating;
|
||||
|
||||
@property (nonatomic) MWMCircularProgressState state;
|
||||
|
||||
- (nonnull instancetype)initWithFrame:(CGRect)frame __attribute__((unavailable("initWithFrame is not available")));
|
||||
- (nonnull instancetype)init __attribute__((unavailable("init is not available")));
|
||||
|
||||
- (void)setImage:(nonnull UIImage *)image forState:(MWMCircularProgressState)state;
|
||||
- (void)setColor:(nonnull UIColor *)color forState:(MWMCircularProgressState)state;
|
||||
|
||||
- (void)animateFromValue:(CGFloat)fromValue toValue:(CGFloat)toValue;
|
||||
|
||||
- (void)refreshProgress;
|
||||
- (void)updatePath:(CGFloat)progress;
|
||||
- (void)startSpinner;
|
||||
- (void)stopSpinner;
|
||||
|
||||
@end
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#import "Common.h"
|
||||
#import "MWMCircularProgress.h"
|
||||
#import "MWMCircularProgressView.h"
|
||||
#import "UIColor+MapsMeColor.h"
|
||||
|
@ -15,7 +16,15 @@ static inline CGFloat angleWithProgress(CGFloat progress)
|
|||
@property (nonatomic) CAShapeLayer * backgroundLayer;
|
||||
@property (nonatomic) CAShapeLayer * progressLayer;
|
||||
|
||||
@property (nonatomic, readonly) CGColorRef backgroundColor;
|
||||
@property (nonatomic, readonly) CGColorRef progressColor;
|
||||
|
||||
@property (nonatomic) NSMutableDictionary * images;
|
||||
@property (nonatomic) NSMutableDictionary * colors;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet MWMCircularProgress * owner;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView * spinner;
|
||||
@property (weak, nonatomic) IBOutlet UIButton * button;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -23,53 +32,9 @@ static inline CGFloat angleWithProgress(CGFloat progress)
|
|||
|
||||
- (void)awakeFromNib
|
||||
{
|
||||
self.backgroundLayer = [CAShapeLayer layer];
|
||||
[self refreshBackground];
|
||||
[self.layer addSublayer:self.backgroundLayer];
|
||||
|
||||
self.progressLayer = [CAShapeLayer layer];
|
||||
[self refreshProgress];
|
||||
[self.layer addSublayer:self.progressLayer];
|
||||
}
|
||||
|
||||
- (void)refreshBackground
|
||||
{
|
||||
self.backgroundLayer.fillColor = UIColor.clearColor.CGColor;
|
||||
self.backgroundLayer.lineWidth = kLineWidth;
|
||||
self.backgroundLayer.strokeColor = UIColor.pressBackground.CGColor;
|
||||
CGRect rect = CGRectInset(self.bounds, kLineWidth, kLineWidth);
|
||||
self.backgroundLayer.path = [UIBezierPath bezierPathWithOvalInRect:rect].CGPath;
|
||||
}
|
||||
|
||||
- (void)refreshProgress
|
||||
{
|
||||
self.progressLayer.fillColor = UIColor.clearColor.CGColor;
|
||||
self.progressLayer.lineWidth = kLineWidth;
|
||||
self.progressLayer.strokeColor = self.owner.failed ? UIColor.red.CGColor : UIColor.linkBlue.CGColor;
|
||||
}
|
||||
|
||||
- (void)updatePath:(CGFloat)progress
|
||||
{
|
||||
CGFloat const outerRadius = self.width / 2.0;
|
||||
CGPoint const center = CGPointMake(outerRadius, outerRadius);
|
||||
CGFloat const radius = outerRadius - kLineWidth;
|
||||
UIBezierPath * path = [UIBezierPath bezierPathWithArcCenter:center radius:radius startAngle:angleWithProgress(0.0) endAngle:angleWithProgress(progress) clockwise:YES];
|
||||
self.progressLayer.path = path.CGPath;
|
||||
}
|
||||
|
||||
#pragma mark - Animation
|
||||
|
||||
- (void)animateFromValue:(CGFloat)fromValue toValue:(CGFloat)toValue
|
||||
{
|
||||
[self updatePath:toValue];
|
||||
CABasicAnimation * animation = [CABasicAnimation animationWithKeyPath:@"strokeEnd"];
|
||||
animation.duration = 0.3;
|
||||
animation.repeatCount = 1;
|
||||
animation.fromValue = @(fromValue / toValue);
|
||||
animation.toValue = @1;
|
||||
animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
|
||||
animation.delegate = self.owner;
|
||||
[self.progressLayer addAnimation:animation forKey:kAnimationKey];
|
||||
self.images = [NSMutableDictionary dictionary];
|
||||
[self setupColors];
|
||||
[self setupAnimationLayers];
|
||||
}
|
||||
|
||||
- (void)layoutSubviews
|
||||
|
@ -78,14 +43,190 @@ static inline CGFloat angleWithProgress(CGFloat progress)
|
|||
[super layoutSubviews];
|
||||
}
|
||||
|
||||
#pragma mark - Setup
|
||||
|
||||
- (void)setupColors
|
||||
{
|
||||
self.colors = [NSMutableDictionary dictionary];
|
||||
UIColor * progressColor = [UIColor linkBlue];
|
||||
UIColor * clearColor = [UIColor clearColor];
|
||||
[self setColor:clearColor forState:MWMCircularProgressStateNormal];
|
||||
[self setColor:clearColor forState:MWMCircularProgressStateHighlighted];
|
||||
[self setColor:clearColor forState:MWMCircularProgressStateSelected];
|
||||
[self setColor:clearColor forState:MWMCircularProgressStateSelectedHighlighted];
|
||||
[self setColor:progressColor forState:MWMCircularProgressStateProgress];
|
||||
[self setColor:progressColor forState:MWMCircularProgressStateProgressHighlighted];
|
||||
[self setColor:clearColor forState:MWMCircularProgressStateFailed];
|
||||
[self setColor:clearColor forState:MWMCircularProgressStateFailedHighlighted];
|
||||
[self setColor:clearColor forState:MWMCircularProgressStateCompleted];
|
||||
}
|
||||
|
||||
- (void)setupAnimationLayers
|
||||
{
|
||||
self.backgroundLayer = [CAShapeLayer layer];
|
||||
self.progressLayer = [CAShapeLayer layer];
|
||||
|
||||
[self refresh];
|
||||
[self.layer addSublayer:self.backgroundLayer];
|
||||
[self.layer addSublayer:self.progressLayer];
|
||||
}
|
||||
|
||||
- (void)setImage:(nonnull UIImage *)image forState:(MWMCircularProgressState)state
|
||||
{
|
||||
self.images[@(state)] = image;
|
||||
[self refresh];
|
||||
}
|
||||
|
||||
- (void)setColor:(nonnull UIColor *)color forState:(MWMCircularProgressState)state
|
||||
{
|
||||
self.colors[@(state)] = color;
|
||||
[self refresh];
|
||||
}
|
||||
|
||||
#pragma mark - Progress
|
||||
|
||||
- (void)refresh
|
||||
{
|
||||
self.backgroundLayer.fillColor = self.progressLayer.fillColor = UIColor.clearColor.CGColor;
|
||||
self.backgroundLayer.lineWidth = self.progressLayer.lineWidth = kLineWidth;
|
||||
self.backgroundLayer.strokeColor = self.backgroundColor;
|
||||
self.progressLayer.strokeColor = self.progressColor;
|
||||
CGRect rect = CGRectInset(self.bounds, kLineWidth, kLineWidth);
|
||||
self.backgroundLayer.path = [UIBezierPath bezierPathWithOvalInRect:rect].CGPath;
|
||||
UIImage * normalImage, * highlightedImage;
|
||||
switch (self.state)
|
||||
{
|
||||
case MWMCircularProgressStateNormal:
|
||||
case MWMCircularProgressStateHighlighted:
|
||||
normalImage = self.images[@(MWMCircularProgressStateNormal)];
|
||||
highlightedImage = self.images[@(MWMCircularProgressStateHighlighted)];
|
||||
break;
|
||||
case MWMCircularProgressStateSelected:
|
||||
case MWMCircularProgressStateSelectedHighlighted:
|
||||
normalImage = self.images[@(MWMCircularProgressStateSelected)];
|
||||
highlightedImage = self.images[@(MWMCircularProgressStateSelectedHighlighted)];
|
||||
break;
|
||||
case MWMCircularProgressStateProgress:
|
||||
case MWMCircularProgressStateProgressHighlighted:
|
||||
normalImage = self.images[@(MWMCircularProgressStateProgress)];
|
||||
highlightedImage = self.images[@(MWMCircularProgressStateProgressHighlighted)];
|
||||
break;
|
||||
case MWMCircularProgressStateFailed:
|
||||
case MWMCircularProgressStateFailedHighlighted:
|
||||
normalImage = self.images[@(MWMCircularProgressStateFailed)];
|
||||
highlightedImage = self.images[@(MWMCircularProgressStateFailedHighlighted)];
|
||||
break;
|
||||
case MWMCircularProgressStateCompleted:
|
||||
normalImage = self.images[@(MWMCircularProgressStateCompleted)];
|
||||
highlightedImage = self.images[@(MWMCircularProgressStateCompleted)];
|
||||
break;
|
||||
}
|
||||
[self.button setImage:normalImage forState:UIControlStateNormal];
|
||||
[self.button setImage:highlightedImage forState:UIControlStateHighlighted];
|
||||
}
|
||||
|
||||
- (void)updatePath:(CGFloat)progress
|
||||
{
|
||||
if (progress > 0.0)
|
||||
{
|
||||
self.state = progress < 1.0 ? MWMCircularProgressStateProgress : MWMCircularProgressStateCompleted;
|
||||
[self stopSpinner];
|
||||
}
|
||||
CGFloat const outerRadius = self.width / 2.0;
|
||||
CGPoint const center = {outerRadius, outerRadius};
|
||||
CGFloat const radius = outerRadius - kLineWidth;
|
||||
UIBezierPath * path = [UIBezierPath bezierPathWithArcCenter:center
|
||||
radius:radius
|
||||
startAngle:angleWithProgress(0.0)
|
||||
endAngle:angleWithProgress(progress)
|
||||
clockwise:YES];
|
||||
self.progressLayer.path = path.CGPath;
|
||||
}
|
||||
|
||||
#pragma mark - Spinner
|
||||
|
||||
- (void)startSpinner
|
||||
{
|
||||
if (!self.spinner.hidden)
|
||||
return;
|
||||
self.spinner.hidden = NO;
|
||||
dispatch_async(dispatch_get_main_queue(), ^
|
||||
{
|
||||
self.backgroundLayer.hidden = self.progressLayer.hidden = YES;
|
||||
NSUInteger const animationImagesCount = 12;
|
||||
NSMutableArray * animationImages = [NSMutableArray arrayWithCapacity:animationImagesCount];
|
||||
for (NSUInteger i = 0; i < animationImagesCount; ++i)
|
||||
animationImages[i] = [UIImage imageNamed:[NSString stringWithFormat:@"Spinner_%@", @(i+1)]];
|
||||
|
||||
self.spinner.animationImages = animationImages;
|
||||
[self.spinner startAnimating];
|
||||
});
|
||||
}
|
||||
|
||||
- (void)stopSpinner
|
||||
{
|
||||
if (self.spinner.hidden)
|
||||
return;
|
||||
self.spinner.hidden = YES;
|
||||
dispatch_async(dispatch_get_main_queue(), ^
|
||||
{
|
||||
self.backgroundLayer.hidden = self.progressLayer.hidden = NO;
|
||||
[self.spinner.layer removeAllAnimations];
|
||||
});
|
||||
}
|
||||
|
||||
#pragma mark - Animation
|
||||
|
||||
- (void)animateFromValue:(CGFloat)fromValue toValue:(CGFloat)toValue
|
||||
{
|
||||
dispatch_async(dispatch_get_main_queue(), ^
|
||||
{
|
||||
[self updatePath:toValue];
|
||||
CABasicAnimation * animation = [CABasicAnimation animationWithKeyPath:@"strokeEnd"];
|
||||
animation.duration = kDefaultAnimationDuration;
|
||||
animation.repeatCount = 1;
|
||||
animation.fromValue = @(fromValue / toValue);
|
||||
animation.toValue = @1;
|
||||
animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
|
||||
animation.delegate = self.owner;
|
||||
[self.progressLayer addAnimation:animation forKey:kAnimationKey];
|
||||
});
|
||||
}
|
||||
|
||||
#pragma mark - Properties
|
||||
|
||||
- (void)setState:(MWMCircularProgressState)state
|
||||
{
|
||||
if (_state == state)
|
||||
return;
|
||||
_state = state;
|
||||
[self refresh];
|
||||
}
|
||||
|
||||
- (CGColorRef)backgroundColor
|
||||
{
|
||||
switch (self.state)
|
||||
{
|
||||
case MWMCircularProgressStateProgress:
|
||||
case MWMCircularProgressStateProgressHighlighted:
|
||||
return [UIColor pressBackground].CGColor;
|
||||
default:
|
||||
return [UIColor clearColor].CGColor;
|
||||
}
|
||||
}
|
||||
|
||||
- (CGColorRef)progressColor
|
||||
{
|
||||
UIColor * color = self.colors[@(self.state)];
|
||||
return color.CGColor;
|
||||
}
|
||||
|
||||
- (void)setFrame:(CGRect)frame
|
||||
{
|
||||
BOOL const needRefreshBackground = !CGRectEqualToRect(self.frame, frame);
|
||||
BOOL const needRefresh = !CGRectEqualToRect(self.frame, frame);
|
||||
super.frame = frame;
|
||||
if (needRefreshBackground)
|
||||
[self refreshBackground];
|
||||
if (needRefresh)
|
||||
[self refresh];
|
||||
}
|
||||
|
||||
- (BOOL)animating
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include "Framework.h"
|
||||
#include "storage/index.hpp"
|
||||
|
||||
@interface MWMDownloadMapRequest () <MWMCircularProgressDelegate>
|
||||
@interface MWMDownloadMapRequest () <MWMCircularProgressProtocol>
|
||||
|
||||
@property (nonatomic) IBOutlet MWMDownloadMapRequestView * rootView;
|
||||
@property (nonatomic) IBOutlet UILabel * mapTitleLabel;
|
||||
|
@ -37,13 +37,28 @@
|
|||
{
|
||||
[[NSBundle mainBundle] loadNibNamed:self.class.className owner:self options:nil];
|
||||
[parentView addSubview:self.rootView];
|
||||
self.progressView = [[MWMCircularProgress alloc] initWithParentView:self.progressViewWrapper delegate:self];
|
||||
self.progressView = [[MWMCircularProgress alloc] initWithParentView:self.progressViewWrapper];
|
||||
self.progressView.delegate = self;
|
||||
[self setupProgressImages];
|
||||
self.delegate = delegate;
|
||||
[self showRequest];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)setupProgressImages
|
||||
{
|
||||
[self.progressView setImage:[UIImage imageNamed:@"ic_download"] forState:MWMCircularProgressStateNormal];
|
||||
[self.progressView setImage:[UIImage imageNamed:@"ic_download_press"] forState:MWMCircularProgressStateHighlighted];
|
||||
[self.progressView setImage:[UIImage imageNamed:@"ic_download"] forState:MWMCircularProgressStateSelected];
|
||||
[self.progressView setImage:[UIImage imageNamed:@"ic_download_press"] forState:MWMCircularProgressStateSelectedHighlighted];
|
||||
[self.progressView setImage:[UIImage imageNamed:@"ic_close_spinner"] forState:MWMCircularProgressStateProgress];
|
||||
[self.progressView setImage:[UIImage imageNamed:@"ic_close_spinner_press"] forState:MWMCircularProgressStateProgressHighlighted];
|
||||
[self.progressView setImage:[UIImage imageNamed:@"ic_download_error"] forState:MWMCircularProgressStateFailed];
|
||||
[self.progressView setImage:[UIImage imageNamed:@"ic_download_error_press"] forState:MWMCircularProgressStateFailedHighlighted];
|
||||
[self.progressView setImage:[UIImage imageNamed:@"ic_check"] forState:MWMCircularProgressStateCompleted];
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[self.rootView removeFromSuperview];
|
||||
|
@ -56,7 +71,7 @@
|
|||
if (activeMapLayout.IsDownloadingActive())
|
||||
{
|
||||
self.currentCountryIndex = activeMapLayout.GetCurrentDownloadingCountryIndex();
|
||||
self.progressView.failed = NO;
|
||||
self.progressView.state = MWMCircularProgressStateProgress;
|
||||
[self updateState:MWMDownloadMapRequestStateDownload];
|
||||
}
|
||||
else
|
||||
|
@ -96,7 +111,8 @@
|
|||
|
||||
- (void)setDownloadFailed
|
||||
{
|
||||
self.progressView.failed = YES;
|
||||
self.progressView.state = MWMCircularProgressStateFailed;
|
||||
[self.progressView stopSpinner];
|
||||
}
|
||||
|
||||
#pragma mark - MWMCircularProgressDelegate
|
||||
|
@ -104,10 +120,15 @@
|
|||
- (void)progressButtonPressed:(nonnull MWMCircularProgress *)progress
|
||||
{
|
||||
auto & activeMapLayout = GetFramework().GetCountryTree().GetActiveMapLayout();
|
||||
if (progress.failed)
|
||||
if (progress.state == MWMCircularProgressStateFailed)
|
||||
{
|
||||
activeMapLayout.RetryDownloading(self.currentCountryIndex);
|
||||
[self.progressView startSpinner];
|
||||
}
|
||||
else
|
||||
{
|
||||
activeMapLayout.CancelDownloading(self.currentCountryIndex);
|
||||
}
|
||||
[self showRequest];
|
||||
}
|
||||
|
||||
|
@ -119,6 +140,7 @@
|
|||
GetFramework().GetCountryTree().GetActiveMapLayout().DownloadMap(self.currentCountryIndex, mapType);
|
||||
self.progressView.progress = 0.0;
|
||||
[self showRequest];
|
||||
[self.progressView startSpinner];
|
||||
}
|
||||
|
||||
- (IBAction)downloadRoutesTouchUpInside:(nonnull UIButton *)sender
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
#pragma once
|
||||
|
||||
class MWMRoutePoint
|
||||
{
|
||||
public:
|
||||
MWMRoutePoint() {}
|
||||
|
||||
MWMRoutePoint(m2::PointD const & p, NSString * n) : m_point(p), m_name(n), m_isMyPosition(false) {}
|
||||
|
||||
explicit MWMRoutePoint(m2::PointD const & p) : m_point(p), m_name(L(@"my_position")), m_isMyPosition(true) {}
|
||||
|
||||
bool operator ==(MWMRoutePoint const & p) const
|
||||
{
|
||||
return m_point.EqualDxDy(p.m_point, 0.00000001) && [m_name isEqualToString:p.m_name] && m_isMyPosition == p.m_isMyPosition;
|
||||
}
|
||||
|
||||
bool operator !=(MWMRoutePoint const & p) const
|
||||
{
|
||||
return !(*this == p);
|
||||
}
|
||||
|
||||
static MWMRoutePoint MWMRoutePointZero()
|
||||
{
|
||||
return MWMRoutePoint(m2::PointD::Zero(), @"");
|
||||
}
|
||||
|
||||
m2::PointD const & Point() const
|
||||
{
|
||||
return m_point;
|
||||
}
|
||||
|
||||
NSString * Name() const
|
||||
{
|
||||
return m_name;
|
||||
}
|
||||
|
||||
bool IsMyPosition() const
|
||||
{
|
||||
return m_isMyPosition;
|
||||
}
|
||||
|
||||
private:
|
||||
m2::PointD m_point;
|
||||
NSString * m_name;
|
||||
bool m_isMyPosition;
|
||||
};
|
|
@ -1,4 +1,5 @@
|
|||
#import "Common.h"
|
||||
#import "MapsAppDelegate.h"
|
||||
#import "MWMBottomMenuView.h"
|
||||
#import "UIButton+RuntimeAttributes.h"
|
||||
#import "UIColor+MapsMeColor.h"
|
||||
|
@ -93,12 +94,12 @@
|
|||
self.goButton.alpha = 0.0;
|
||||
self.streetLabel.alpha = 0.0;
|
||||
break;
|
||||
case MWMBottomMenuStatePlanning:
|
||||
case MWMBottomMenuStateGo:
|
||||
self.p2pButton.alpha = self.searchButton.alpha = self.bookmarksButton.alpha = 0.0;
|
||||
self.goButton.alpha = 1.0;
|
||||
self.streetLabel.alpha = 0.0;
|
||||
break;
|
||||
case MWMBottomMenuStatePlanning:
|
||||
case MWMBottomMenuStateText:
|
||||
self.p2pButton.alpha = self.searchButton.alpha = self.bookmarksButton.alpha = 0.0;
|
||||
self.goButton.alpha = 0.0;
|
||||
|
@ -131,9 +132,6 @@
|
|||
self.streetLabel.hidden = YES;
|
||||
break;
|
||||
case MWMBottomMenuStatePlanning:
|
||||
self.p2pButton.hidden = self.searchButton.hidden = self.bookmarksButton.hidden = YES;
|
||||
self.streetLabel.hidden = YES;
|
||||
break;
|
||||
case MWMBottomMenuStateGo:
|
||||
self.p2pButton.hidden = self.searchButton.hidden = self.bookmarksButton.hidden = YES;
|
||||
[self.goButton setBackgroundColor:[UIColor linkBlue] forState:UIControlStateNormal];
|
||||
|
@ -143,6 +141,7 @@
|
|||
case MWMBottomMenuStateText:
|
||||
self.p2pButton.hidden = self.searchButton.hidden = self.bookmarksButton.hidden = YES;
|
||||
self.goButton.hidden = YES;
|
||||
self.streetLabel.hidden = NO;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -272,7 +271,8 @@
|
|||
case MWMBottomMenuStateHidden:
|
||||
break;
|
||||
case MWMBottomMenuStateInactive:
|
||||
_leftBound = 0.0;
|
||||
if (MapsAppDelegate.theApp.routingPlaneMode == MWMRoutingPlaneModeNone)
|
||||
_leftBound = 0.0;
|
||||
self.downloadBadge.hidden =
|
||||
GetFramework().GetCountryTree().GetActiveMapLayout().GetOutOfDateCount() == 0;
|
||||
self.p2pButton.hidden = self.searchButton.hidden = self.bookmarksButton.hidden = NO;
|
||||
|
@ -293,13 +293,12 @@
|
|||
[self updateMenuButtonFromState:_state toState:state];
|
||||
break;
|
||||
case MWMBottomMenuStatePlanning:
|
||||
self.streetLabel.font = [UIFont regular17];
|
||||
self.streetLabel.textColor = [UIColor blackHintText];
|
||||
self.streetLabel.text = L(@"routing_planning");
|
||||
self.streetLabel.hidden = NO;
|
||||
self.goButton.enabled = NO;
|
||||
self.goButton.hidden = NO;
|
||||
[self updateMenuButtonFromState:_state toState:state];
|
||||
break;
|
||||
case MWMBottomMenuStateGo:
|
||||
self.goButton.enabled = YES;
|
||||
self.goButton.hidden = NO;
|
||||
[self updateMenuButtonFromState:_state toState:state];
|
||||
break;
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
@interface MWMBottomMenuViewController : UIViewController
|
||||
|
||||
@property(nonatomic) MWMBottomMenuState state;
|
||||
|
||||
@property(weak, nonatomic) IBOutlet UIButton * p2pButton;
|
||||
@property(nonatomic) CGFloat leftBound;
|
||||
|
||||
- (instancetype)initWithParentController:(MapViewController *)controller
|
||||
|
@ -22,6 +22,7 @@
|
|||
- (void)onEnterForeground;
|
||||
|
||||
- (void)setStreetName:(NSString *)streetName;
|
||||
- (void)setInactive;
|
||||
- (void)setPlanning;
|
||||
- (void)setGo;
|
||||
|
||||
|
|
|
@ -130,6 +130,12 @@ typedef NS_ENUM(NSUInteger, MWMBottomMenuViewCell)
|
|||
self.streetLabel.text = streetName;
|
||||
}
|
||||
|
||||
- (void)setInactive
|
||||
{
|
||||
self.p2pButton.selected = NO;
|
||||
self.state = self.restoreState = MWMBottomMenuStateInactive;
|
||||
}
|
||||
|
||||
- (void)setPlanning
|
||||
{
|
||||
if (IPAD)
|
||||
|
@ -376,18 +382,33 @@ typedef NS_ENUM(NSUInteger, MWMBottomMenuViewCell)
|
|||
|
||||
- (IBAction)point2PointButtonTouchUpInside:(UIButton *)sender
|
||||
{
|
||||
self.state = self.restoreState;
|
||||
BOOL const isSelected = !sender.isSelected;
|
||||
sender.selected = isSelected;
|
||||
MapsAppDelegate * theApp = [MapsAppDelegate theApp];
|
||||
if (isSelected)
|
||||
{
|
||||
theApp.routingPlaneMode = MWMRoutingPlaneModePlacePage;
|
||||
[self.controller.controlsManager routingPrepare];
|
||||
}
|
||||
else
|
||||
{
|
||||
if (theApp.routingPlaneMode == MWMRoutingPlaneModeSearchDestination || theApp.routingPlaneMode == MWMRoutingPlaneModeSearchSource)
|
||||
self.controller.controlsManager.searchHidden = YES;
|
||||
[self.controller.controlsManager routingHidden];
|
||||
}
|
||||
}
|
||||
|
||||
- (IBAction)searchButtonTouchUpInside:(UIButton *)sender
|
||||
{
|
||||
self.state = MWMBottomMenuStateInactive;
|
||||
self.state = self.restoreState;
|
||||
[Alohalytics logEvent:kAlohalyticsTapEventKey withValue:@"search"];
|
||||
self.controller.controlsManager.searchHidden = self.searchIsActive;
|
||||
}
|
||||
|
||||
- (IBAction)bookmarksButtonTouchUpInside:(UIButton *)sender
|
||||
{
|
||||
self.state = MWMBottomMenuStateInactive;
|
||||
self.state = self.restoreState;
|
||||
[Alohalytics logEvent:kAlohalyticsTapEventKey withValue:@"bookmarks"];
|
||||
BookmarksRootVC * const vc = [[BookmarksRootVC alloc] init];
|
||||
[self.controller.navigationController pushViewController:vc animated:YES];
|
||||
|
@ -416,6 +437,7 @@ typedef NS_ENUM(NSUInteger, MWMBottomMenuViewCell)
|
|||
}
|
||||
- (IBAction)goButtonTouchUpInside:(UIButton *)sender
|
||||
{
|
||||
[self.controller.controlsManager routingNavigation];
|
||||
}
|
||||
|
||||
- (void)dimBackgroundTap
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
<outlet property="additionalButtons" destination="hSd-fM-qKd" id="tT1-ml-chk"/>
|
||||
<outlet property="buttonsCollectionView" destination="hSd-fM-qKd" id="Qrb-GJ-Buz"/>
|
||||
<outlet property="locationButton" destination="s0b-7N-YrO" id="6ko-iv-WDQ"/>
|
||||
<outlet property="p2pButton" destination="xQ0-ZK-UXk" id="LdY-Rt-Dh4"/>
|
||||
<outlet property="streetLabel" destination="xr9-L5-hTa" id="BXb-CM-RK2"/>
|
||||
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
|
||||
</connections>
|
||||
|
@ -46,6 +47,7 @@
|
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<accessibility key="accessibilityConfiguration" identifier="p2pButton"/>
|
||||
<state key="normal" image="ic_menu_point_to_point"/>
|
||||
<state key="selected" image="ic_menu_point_to_point_press"/>
|
||||
<state key="highlighted" image="ic_menu_point_to_point_press"/>
|
||||
<connections>
|
||||
<action selector="point2PointButtonTouchUpInside:" destination="-1" eventType="touchUpInside" id="s4j-nH-gFP"/>
|
||||
|
@ -121,7 +123,7 @@
|
|||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular17"/>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
|
||||
<integer key="value" value="8"/>
|
||||
<integer key="value" value="4"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="routing_go"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="textColorName" value="whiteColor"/>
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
#import "MWMBottomMenuViewController.h"
|
||||
#import "MWMNavigationDashboardManager.h"
|
||||
#import "MWMRoutingProtocol.h"
|
||||
|
||||
#include "map/user_mark.hpp"
|
||||
#include "platform/location.hpp"
|
||||
|
||||
@class MapViewController;
|
||||
|
||||
@interface MWMMapViewControlsManager : NSObject
|
||||
@interface MWMMapViewControlsManager : NSObject <MWMRoutingProtocol>
|
||||
|
||||
@property (nonatomic) BOOL hidden;
|
||||
@property (nonatomic) BOOL zoomHidden;
|
||||
|
@ -37,7 +38,9 @@
|
|||
|
||||
- (void)setupRoutingDashboard:(location::FollowingInfo const &)info;
|
||||
- (void)playTurnNotifications;
|
||||
- (void)routingHidden;
|
||||
- (void)routingReady;
|
||||
- (void)routingPrepare;
|
||||
- (void)routingNavigation;
|
||||
- (void)handleRoutingError;
|
||||
- (void)setRouteBuildingProgress:(CGFloat)progress;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#import "Common.h"
|
||||
#import "CountryTreeVC.h"
|
||||
#import "MapsAppDelegate.h"
|
||||
#import "MapViewController.h"
|
||||
|
@ -7,6 +8,7 @@
|
|||
#import "MWMMapViewControlsManager.h"
|
||||
#import "MWMPlacePageViewManager.h"
|
||||
#import "MWMPlacePageViewManagerDelegate.h"
|
||||
#import "MWMRoutePreview.h"
|
||||
#import "MWMSearchManager.h"
|
||||
#import "MWMSearchView.h"
|
||||
#import "MWMZoomButtons.h"
|
||||
|
@ -20,7 +22,7 @@ extern NSString * const kAlohalyticsTapEventKey;
|
|||
|
||||
@interface MWMMapViewControlsManager ()<
|
||||
MWMPlacePageViewManagerProtocol, MWMNavigationDashboardManagerProtocol,
|
||||
MWMSearchManagerProtocol, MWMSearchViewProtocol, MWMBottomMenuControllerProtocol>
|
||||
MWMSearchManagerProtocol, MWMSearchViewProtocol, MWMBottomMenuControllerProtocol, MWMRoutePreviewDataSource>
|
||||
|
||||
@property (nonatomic) MWMZoomButtons * zoomButtons;
|
||||
@property (nonatomic) MWMBottomMenuViewController * menuController;
|
||||
|
@ -31,7 +33,8 @@ extern NSString * const kAlohalyticsTapEventKey;
|
|||
@property (weak, nonatomic) MapViewController * ownerController;
|
||||
|
||||
@property (nonatomic) BOOL disableStandbyOnRouteFollowing;
|
||||
@property (nonatomic) m2::PointD routeDestination;
|
||||
@property (nonatomic) MWMRoutePoint routeSource;
|
||||
@property (nonatomic) MWMRoutePoint routeDestination;
|
||||
|
||||
@property (nonatomic) CGFloat topBound;
|
||||
@property (nonatomic) CGFloat leftBound;
|
||||
|
@ -49,13 +52,17 @@ extern NSString * const kAlohalyticsTapEventKey;
|
|||
return nil;
|
||||
self.ownerController = controller;
|
||||
self.zoomButtons = [[MWMZoomButtons alloc] initWithParentView:controller.view];
|
||||
self.menuController = [[MWMBottomMenuViewController alloc] initWithParentController:controller delegate:self];
|
||||
self.placePageManager = [[MWMPlacePageViewManager alloc] initWithViewController:controller delegate:self];
|
||||
self.navigationManager = [[MWMNavigationDashboardManager alloc] initWithParentView:controller.view delegate:self];
|
||||
self.searchManager = [[MWMSearchManager alloc] initWithParentView:controller.view delegate:self];
|
||||
self.menuController = [[MWMBottomMenuViewController alloc] initWithParentController:controller delegate:self];
|
||||
self.hidden = NO;
|
||||
self.zoomHidden = NO;
|
||||
self.menuState = MWMBottomMenuStateInactive;
|
||||
LocationManager * m = MapsAppDelegate.theApp.m_locationManager;
|
||||
self.routeSource = m.lastLocationIsValid ? MWMRoutePoint(ToMercator(m.lastLocation.coordinate)) :
|
||||
MWMRoutePoint::MWMRoutePointZero();
|
||||
self.routeDestination = MWMRoutePoint::MWMRoutePointZero();
|
||||
return self;
|
||||
}
|
||||
|
||||
|
@ -120,19 +127,58 @@ extern NSString * const kAlohalyticsTapEventKey;
|
|||
{
|
||||
if (state == MWMSearchManagerStateHidden)
|
||||
{
|
||||
self.hidden = NO;
|
||||
self.leftBound = self.topBound = 0.0;
|
||||
if (!IPAD || MapsAppDelegate.theApp.routingPlaneMode == MWMRoutingPlaneModeNone)
|
||||
{
|
||||
self.hidden = NO;
|
||||
self.leftBound = self.topBound = 0.0;
|
||||
}
|
||||
}
|
||||
[self.ownerController setNeedsStatusBarAppearanceUpdate];
|
||||
if (!IPAD || (state != MWMSearchManagerStateDefault && state != MWMSearchManagerStateHidden))
|
||||
return;
|
||||
MWMRoutingPlaneMode const m = MapsAppDelegate.theApp.routingPlaneMode;
|
||||
if (m == MWMRoutingPlaneModeSearchSource || m == MWMRoutingPlaneModeSearchDestination)
|
||||
{
|
||||
[UIView animateWithDuration:kDefaultAnimationDuration animations:^
|
||||
{
|
||||
if (state == MWMSearchManagerStateHidden)
|
||||
{
|
||||
self.navigationManager.routePreview.alpha = 1.;
|
||||
MapsAppDelegate.theApp.routingPlaneMode = MWMRoutingPlaneModePlacePage;
|
||||
}
|
||||
else
|
||||
{
|
||||
self.navigationManager.routePreview.alpha = 0.;
|
||||
}
|
||||
}];
|
||||
}
|
||||
else if (m == MWMRoutingPlaneModePlacePage)
|
||||
{
|
||||
if (state == MWMSearchManagerStateHidden)
|
||||
return;
|
||||
[UIView animateWithDuration:kDefaultAnimationDuration animations:^
|
||||
{
|
||||
self.navigationManager.routePreview.alpha = 0.;
|
||||
}
|
||||
completion:^(BOOL finished)
|
||||
{
|
||||
MapsAppDelegate.theApp.routingPlaneMode = MWMRoutingPlaneModeNone;
|
||||
self.navigationManager.routePreview.alpha = 1.;
|
||||
[self.navigationManager.routePreview removeFromSuperview];
|
||||
[self didCancelRouting];
|
||||
self.navigationManager.state = MWMNavigationDashboardStateHidden;
|
||||
self.menuController.p2pButton.selected = NO;
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - MWMSearchViewProtocol
|
||||
|
||||
- (void)searchFrameUpdated:(CGRect)frame
|
||||
{
|
||||
UIView * searchView = self.searchManager.view;
|
||||
self.leftBound = searchView.width;
|
||||
self.topBound = searchView.height;
|
||||
CGSize const s = frame.size;
|
||||
self.leftBound = s.width;
|
||||
self.topBound = s.height;
|
||||
}
|
||||
|
||||
#pragma mark - MWMSearchManagerProtocol & MWMBottomMenuControllerProtocol
|
||||
|
@ -150,7 +196,10 @@ extern NSString * const kAlohalyticsTapEventKey;
|
|||
{
|
||||
if (IPAD)
|
||||
{
|
||||
self.searchManager.state = MWMSearchManagerStateHidden;
|
||||
if (!self.searchHidden)
|
||||
self.searchManager.state = MWMSearchManagerStateHidden;
|
||||
else if (MapsAppDelegate.theApp.routingPlaneMode != MWMRoutingPlaneModeNone)
|
||||
[self routingHidden];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -186,7 +235,10 @@ extern NSString * const kAlohalyticsTapEventKey;
|
|||
[ownerView addSubview:view];
|
||||
[ownerView bringSubviewToFront:self.searchManager.view];
|
||||
if (IPAD)
|
||||
{
|
||||
[ownerView bringSubviewToFront:self.menuController.view];
|
||||
[ownerView bringSubviewToFront:self.navigationManager.routePreview];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)updateStatusBarStyle
|
||||
|
@ -194,18 +246,80 @@ extern NSString * const kAlohalyticsTapEventKey;
|
|||
[self.ownerController updateStatusBarStyle];
|
||||
}
|
||||
|
||||
- (void)buildRoute:(m2::PointD)destination
|
||||
- (void)setupBestRouter
|
||||
{
|
||||
self.routeDestination = destination;
|
||||
// Determine route type
|
||||
[self buildRouteWithType:GetFramework().GetRouter()];
|
||||
auto & f = GetFramework();
|
||||
if (self.isPossibleToBuildRoute)
|
||||
f.SetRouter(f.GetBestRouter(self.routeSource.Point(), self.routeDestination.Point()));
|
||||
}
|
||||
|
||||
- (void)buildRouteFrom:(MWMRoutePoint const &)from to:(MWMRoutePoint const &)to
|
||||
{
|
||||
self.routeSource = from;
|
||||
self.routeDestination = to;
|
||||
self.navigationManager.routePreview.extendButton.selected = NO;
|
||||
self.menuController.p2pButton.selected = YES;
|
||||
MapsAppDelegate.theApp.routingPlaneMode = MWMRoutingPlaneModePlacePage;
|
||||
[self setupBestRouter];
|
||||
[self buildRoute];
|
||||
}
|
||||
|
||||
- (void)buildRouteFrom:(MWMRoutePoint const &)from
|
||||
{
|
||||
self.routeSource = from;
|
||||
if ((from.IsMyPosition() && self.routeDestination.IsMyPosition()) || from == self.routeDestination)
|
||||
self.routeDestination = MWMRoutePoint::MWMRoutePointZero();
|
||||
|
||||
if (IPAD)
|
||||
self.searchManager.state = MWMSearchManagerStateHidden;
|
||||
[self buildRoute];
|
||||
}
|
||||
|
||||
- (void)buildRouteTo:(MWMRoutePoint const &)to
|
||||
{
|
||||
self.routeDestination = to;
|
||||
if ((to.IsMyPosition() && self.routeSource.IsMyPosition()) || to == self.routeSource)
|
||||
self.routeSource = MWMRoutePoint::MWMRoutePointZero();
|
||||
|
||||
if (IPAD)
|
||||
self.searchManager.state = MWMSearchManagerStateHidden;
|
||||
[self buildRoute];
|
||||
}
|
||||
|
||||
#pragma mark - MWMNavigationDashboardManager
|
||||
|
||||
- (void)routePreviewDidChangeFrame:(CGRect)newFrame
|
||||
{
|
||||
if (!IPAD)
|
||||
{
|
||||
CGFloat const bound = newFrame.origin.y + newFrame.size.height;
|
||||
self.placePageManager.topBound = self.zoomButtons.topBound = bound;
|
||||
return;
|
||||
}
|
||||
|
||||
CGFloat const bound = newFrame.origin.x + newFrame.size.width;
|
||||
if (self.searchManager.state == MWMSearchManagerStateHidden)
|
||||
{
|
||||
self.placePageManager.leftBound = self.menuController.leftBound = newFrame.origin.x + newFrame.size.width;
|
||||
}
|
||||
else
|
||||
{
|
||||
[UIView animateWithDuration:kDefaultAnimationDuration animations:^
|
||||
{
|
||||
self.searchManager.view.alpha = bound > 0 ? 0. : 1.;
|
||||
}
|
||||
completion:^(BOOL finished)
|
||||
{
|
||||
self.searchManager.state = MWMSearchManagerStateHidden;
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setupRoutingDashboard:(location::FollowingInfo const &)info
|
||||
{
|
||||
[self.navigationManager setupDashboard:info];
|
||||
if (self.menuController.state == MWMBottomMenuStateText)
|
||||
[self.menuController setStreetName:@(info.m_sourceName.c_str())];
|
||||
}
|
||||
|
||||
- (void)playTurnNotifications
|
||||
|
@ -216,30 +330,43 @@ extern NSString * const kAlohalyticsTapEventKey;
|
|||
- (void)handleRoutingError
|
||||
{
|
||||
self.navigationManager.state = MWMNavigationDashboardStateError;
|
||||
MapsAppDelegate.theApp.routingPlaneMode = MWMRoutingPlaneModePlacePage;
|
||||
}
|
||||
|
||||
- (void)buildRouteWithType:(enum routing::RouterType)type
|
||||
- (void)buildRoute
|
||||
{
|
||||
[self.navigationManager.routePreview reloadData];
|
||||
if (!self.isPossibleToBuildRoute)
|
||||
return;
|
||||
|
||||
LocationManager * locMgr = [MapsAppDelegate theApp].m_locationManager;
|
||||
if (![locMgr lastLocationIsValid])
|
||||
if (!locMgr.lastLocationIsValid && self.routeSource.IsMyPosition())
|
||||
{
|
||||
MWMAlertViewController * alert =
|
||||
[[MWMAlertViewController alloc] initWithViewController:self.ownerController];
|
||||
[alert presentLocationAlert];
|
||||
return;
|
||||
}
|
||||
[locMgr start:self.navigationManager];
|
||||
self.navigationManager.state = MWMNavigationDashboardStatePlanning;
|
||||
GetFramework().BuildRoute(
|
||||
ToMercator([MapsAppDelegate theApp].m_locationManager.lastLocation.coordinate),
|
||||
self.routeDestination, 0 /* timeoutSec */);
|
||||
// This hack is needed to instantly show initial progress.
|
||||
// Because user may think that nothing happens when he is building a route.
|
||||
dispatch_async(dispatch_get_main_queue(), ^
|
||||
|
||||
m2::PointD const locationPoint = ToMercator(locMgr.lastLocation.coordinate);
|
||||
if (self.routeSource.IsMyPosition())
|
||||
{
|
||||
CGFloat const initialRoutingProgress = 5.;
|
||||
[self setRouteBuildingProgress:initialRoutingProgress];
|
||||
});
|
||||
self.routeSource = MWMRoutePoint(locationPoint);
|
||||
[locMgr start:self.navigationManager];
|
||||
}
|
||||
else if (self.routeDestination.IsMyPosition())
|
||||
self.routeDestination = MWMRoutePoint(locationPoint);
|
||||
|
||||
self.navigationManager.state = MWMNavigationDashboardStatePlanning;
|
||||
[self.menuController setPlanning];
|
||||
GetFramework().BuildRoute(self.routeSource.Point(), self.routeDestination.Point(), 0 /* timeoutSec */);
|
||||
[self.navigationManager setRouteBuildingProgress:0.];
|
||||
}
|
||||
|
||||
- (BOOL)isPossibleToBuildRoute
|
||||
{
|
||||
MWMRoutePoint const zeroPoint = MWMRoutePoint::MWMRoutePointZero();
|
||||
return self.routeSource != zeroPoint && self.routeDestination != zeroPoint;
|
||||
}
|
||||
|
||||
- (void)navigationDashBoardDidUpdate
|
||||
|
@ -250,32 +377,97 @@ extern NSString * const kAlohalyticsTapEventKey;
|
|||
[self.placePageManager setTopBound:topBound];
|
||||
}
|
||||
|
||||
- (void)didStartFollowing
|
||||
- (BOOL)didStartFollowing
|
||||
{
|
||||
if (!self.routeSource.IsMyPosition())
|
||||
{
|
||||
MWMAlertViewController * controller = [[MWMAlertViewController alloc] initWithViewController:self.ownerController];
|
||||
LocationManager * manager = MapsAppDelegate.theApp.m_locationManager;
|
||||
auto const m = GetFramework().GetLocationState()->GetMode();
|
||||
BOOL const needToRebuild = manager.lastLocationIsValid &&
|
||||
m != location::State::Mode::PendingPosition &&
|
||||
m != location::State::Mode::UnknownPosition;
|
||||
[controller presentPoint2PointAlertWithOkBlock:^
|
||||
{
|
||||
m2::PointD const locationPoint = ToMercator(manager.lastLocation.coordinate);
|
||||
self.routeSource = MWMRoutePoint(locationPoint);
|
||||
[self buildRoute];
|
||||
} needToRebuild:needToRebuild];
|
||||
return NO;
|
||||
}
|
||||
self.hidden = NO;
|
||||
self.zoomHidden = NO;
|
||||
GetFramework().FollowRoute();
|
||||
self.disableStandbyOnRouteFollowing = YES;
|
||||
[self.menuController setStreetName:@""];
|
||||
MapsAppDelegate.theApp.routingPlaneMode = MWMRoutingPlaneModeNone;
|
||||
[RouteState save];
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)didCancelRouting
|
||||
{
|
||||
[[MapsAppDelegate theApp].m_locationManager stop:self.navigationManager];
|
||||
self.navigationManager.state = MWMNavigationDashboardStateHidden;
|
||||
GetFramework().CloseRouting();
|
||||
self.disableStandbyOnRouteFollowing = NO;
|
||||
[MapsAppDelegate theApp].routingPlaneMode = MWMRoutingPlaneModeNone;
|
||||
[RouteState remove];
|
||||
[self.menuController setInactive];
|
||||
[self resetRoutingPoint];
|
||||
}
|
||||
|
||||
- (void)swapPointsAndRebuildRouteIfPossible
|
||||
{
|
||||
swap(_routeSource, _routeDestination);
|
||||
[self buildRoute];
|
||||
}
|
||||
|
||||
- (void)didStartEditingRoutePoint:(BOOL)isSource
|
||||
{
|
||||
MapsAppDelegate.theApp.routingPlaneMode = isSource ? MWMRoutingPlaneModeSearchSource : MWMRoutingPlaneModeSearchDestination;
|
||||
self.searchManager.state = MWMSearchManagerStateDefault;
|
||||
}
|
||||
|
||||
- (void)resetRoutingPoint
|
||||
{
|
||||
LocationManager * m = MapsAppDelegate.theApp.m_locationManager;
|
||||
self.routeSource = m.lastLocationIsValid ? MWMRoutePoint(ToMercator(m.lastLocation.coordinate)) :
|
||||
MWMRoutePoint::MWMRoutePointZero();
|
||||
self.routeDestination = MWMRoutePoint::MWMRoutePointZero();
|
||||
}
|
||||
|
||||
- (void)routingReady
|
||||
{
|
||||
if (!self.routeSource.IsMyPosition())
|
||||
{
|
||||
dispatch_async(dispatch_get_main_queue(), ^
|
||||
{
|
||||
GetFramework().DisableFollowMode();
|
||||
[self.navigationManager updateDashboard];
|
||||
});
|
||||
}
|
||||
self.navigationManager.state = MWMNavigationDashboardStateReady;
|
||||
[self.menuController setGo];
|
||||
}
|
||||
|
||||
- (void)routingHidden
|
||||
{
|
||||
[self didCancelRouting];
|
||||
}
|
||||
|
||||
- (void)routingPrepare
|
||||
{
|
||||
self.navigationManager.state = MWMNavigationDashboardStatePrepare;
|
||||
MapsAppDelegate.theApp.routingPlaneMode = MWMRoutingPlaneModePlacePage;
|
||||
}
|
||||
|
||||
- (void)routingNavigation
|
||||
{
|
||||
if (![self didStartFollowing])
|
||||
return;
|
||||
self.navigationManager.state = MWMNavigationDashboardStateNavigation;
|
||||
[self didStartFollowing];
|
||||
MapsAppDelegate.theApp.routingPlaneMode = MWMRoutingPlaneModeNone;
|
||||
}
|
||||
|
||||
- (void)setDisableStandbyOnRouteFollowing:(BOOL)disableStandbyOnRouteFollowing
|
||||
|
@ -294,6 +486,18 @@ extern NSString * const kAlohalyticsTapEventKey;
|
|||
[self.navigationManager setRouteBuildingProgress:progress];
|
||||
}
|
||||
|
||||
#pragma mark - MWMRoutePreviewDataSource
|
||||
|
||||
- (NSString *)source
|
||||
{
|
||||
return self.routeSource.Name();
|
||||
}
|
||||
|
||||
- (NSString *)destination
|
||||
{
|
||||
return self.routeDestination.Name();
|
||||
}
|
||||
|
||||
#pragma mark - Properties
|
||||
|
||||
@synthesize menuState = _menuState;
|
||||
|
@ -349,6 +553,9 @@ extern NSString * const kAlohalyticsTapEventKey;
|
|||
{
|
||||
if (!IPAD)
|
||||
return;
|
||||
MWMRoutingPlaneMode const m = MapsAppDelegate.theApp.routingPlaneMode;
|
||||
if (m != MWMRoutingPlaneModeNone)
|
||||
return;
|
||||
_leftBound = self.placePageManager.leftBound = self.navigationManager.leftBound = self.menuController.leftBound = leftBound;
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
#include "MWMRoutePoint.h"
|
||||
|
||||
@protocol MWMRoutingProtocol <NSObject>
|
||||
|
||||
- (void)buildRouteFrom:(MWMRoutePoint const &)from to:(MWMRoutePoint const &)to;
|
||||
- (void)buildRouteTo:(MWMRoutePoint const &)to;
|
||||
- (void)buildRouteFrom:(MWMRoutePoint const &)from;
|
||||
|
||||
@end
|
|
@ -16,9 +16,11 @@ typedef NS_ENUM(NSUInteger, MWMSearchManagerState)
|
|||
|
||||
@end
|
||||
|
||||
@protocol MWMRoutingProtocol;
|
||||
|
||||
@interface MWMSearchManager : NSObject
|
||||
|
||||
@property (weak, nonatomic) id <MWMSearchManagerProtocol> delegate;
|
||||
@property (weak, nonatomic) id <MWMSearchManagerProtocol, MWMRoutingProtocol> delegate;
|
||||
@property (weak, nonatomic) IBOutlet MWMSearchTextField * searchTextField;
|
||||
|
||||
@property (nonatomic) MWMSearchManagerState state;
|
||||
|
@ -27,7 +29,7 @@ typedef NS_ENUM(NSUInteger, MWMSearchManagerState)
|
|||
|
||||
- (nullable instancetype)init __attribute__((unavailable("init is not available")));
|
||||
- (nullable instancetype)initWithParentView:(nonnull UIView *)view
|
||||
delegate:(nonnull id<MWMSearchManagerProtocol, MWMSearchViewProtocol>)delegate;
|
||||
delegate:(nonnull id<MWMSearchManagerProtocol, MWMSearchViewProtocol, MWMRoutingProtocol>)delegate;
|
||||
|
||||
#pragma mark - Layout
|
||||
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
#import "LocationManager.h"
|
||||
#import "MapsAppDelegate.h"
|
||||
#import "MapsObservers.h"
|
||||
#import "MWMConsole.h"
|
||||
#import "MWMRoutingProtocol.h"
|
||||
#import "MWMSearchDownloadViewController.h"
|
||||
#import "MWMSearchManager.h"
|
||||
#import "MWMSearchTabbedViewController.h"
|
||||
|
@ -41,7 +44,7 @@ extern NSString * const kSearchStateKey = @"SearchStateKey";
|
|||
}
|
||||
|
||||
- (nullable instancetype)initWithParentView:(nonnull UIView *)view
|
||||
delegate:(nonnull id<MWMSearchManagerProtocol, MWMSearchViewProtocol>)delegate
|
||||
delegate:(nonnull id<MWMSearchManagerProtocol, MWMSearchViewProtocol, MWMRoutingProtocol>)delegate
|
||||
{
|
||||
self = [super init];
|
||||
if (self)
|
||||
|
@ -107,6 +110,10 @@ extern NSString * const kSearchStateKey = @"SearchStateKey";
|
|||
{
|
||||
[Alohalytics logEvent:kAlohalyticsTapEventKey withValue:@"searchCancel"];
|
||||
self.state = MWMSearchManagerStateHidden;
|
||||
MapsAppDelegate * a = MapsAppDelegate.theApp;
|
||||
MWMRoutingPlaneMode const m = a.routingPlaneMode;
|
||||
if (m == MWMRoutingPlaneModeSearchDestination || m == MWMRoutingPlaneModeSearchSource)
|
||||
a.routingPlaneMode = MWMRoutingPlaneModePlacePage;
|
||||
}
|
||||
|
||||
- (void)tabButtonPressed:(MWMSearchTabButtonsView *)sender
|
||||
|
@ -150,6 +157,39 @@ extern NSString * const kSearchStateKey = @"SearchStateKey";
|
|||
[self.tableViewController searchText:text forInputLocale:inputLocale];
|
||||
}
|
||||
|
||||
- (void)tapMyPositionFromHistory
|
||||
{
|
||||
MapsAppDelegate * a = MapsAppDelegate.theApp;
|
||||
MWMRoutePoint const p = MWMRoutePoint::MWMRoutePoint(ToMercator(a.m_locationManager.lastLocation.coordinate));
|
||||
if (a.routingPlaneMode == MWMRoutingPlaneModeSearchSource)
|
||||
[self.delegate buildRouteFrom:p];
|
||||
else if (a.routingPlaneMode == MWMRoutingPlaneModeSearchDestination)
|
||||
[self.delegate buildRouteTo:p];
|
||||
else
|
||||
NSAssert(false, @"Incorrect state for process my position tap");
|
||||
if (!IPAD)
|
||||
a.routingPlaneMode = MWMRoutingPlaneModePlacePage;
|
||||
self.state = MWMSearchManagerStateHidden;
|
||||
}
|
||||
|
||||
- (void)processSearchWithResult:(search::Result const &)result query:(search::QuerySaver::TSearchRequest const &)query
|
||||
{
|
||||
auto & f = GetFramework();
|
||||
f.SaveSearchQuery(query);
|
||||
MapsAppDelegate * a = MapsAppDelegate.theApp;
|
||||
MWMRoutingPlaneMode const m = a.routingPlaneMode;
|
||||
MWMRoutePoint const p = {result.GetFeatureCenter(), @(result.GetString())};
|
||||
if (m == MWMRoutingPlaneModeSearchSource)
|
||||
[self.delegate buildRouteFrom:p];
|
||||
else if (m == MWMRoutingPlaneModeSearchDestination)
|
||||
[self.delegate buildRouteTo:p];
|
||||
else
|
||||
f.ShowSearchResult(result);
|
||||
if (!IPAD)
|
||||
a.routingPlaneMode = MWMRoutingPlaneModePlacePage;
|
||||
self.state = MWMSearchManagerStateHidden;
|
||||
}
|
||||
|
||||
#pragma mark - MWMSearchDownloadMapRequest
|
||||
|
||||
- (void)selectMapsAction
|
||||
|
@ -221,6 +261,7 @@ extern NSString * const kSearchStateKey = @"SearchStateKey";
|
|||
|
||||
- (void)changeToDefaultState
|
||||
{
|
||||
self.view.alpha = 1.;
|
||||
GetFramework().PrepareSearch();
|
||||
[self updateTopController];
|
||||
[self.navigationController popToRootViewControllerAnimated:NO];
|
||||
|
|
|
@ -6,5 +6,6 @@
|
|||
@property (weak, nonatomic) id<MWMSearchTabbedViewProtocol> delegate;
|
||||
|
||||
- (void)attachCell:(MWMSearchTabbedCollectionViewCell *)cell;
|
||||
- (BOOL)isRouteSearchMode;
|
||||
|
||||
@end
|
||||
|
|
|
@ -1,13 +1,17 @@
|
|||
#import "Common.h"
|
||||
#import "LocationManager.h"
|
||||
#import "Macros.h"
|
||||
#import "MapsAppDelegate.h"
|
||||
#import "MWMSearchHistoryClearCell.h"
|
||||
#import "MWMSearchHistoryManager.h"
|
||||
#import "MWMSearchHistoryMyPositionCell.h"
|
||||
#import "MWMSearchHistoryRequestCell.h"
|
||||
|
||||
#include "Framework.h"
|
||||
|
||||
static NSString * const kRequestCellIdentifier = @"MWMSearchHistoryRequestCell";
|
||||
static NSString * const kClearCellIdentifier = @"MWMSearchHistoryClearCell";
|
||||
static NSString * const kMyPositionCellIdentifier = @"MWMSearchHistoryMyPositionCell";
|
||||
|
||||
@interface MWMSearchHistoryManager ()
|
||||
|
||||
|
@ -19,12 +23,21 @@ static NSString * const kClearCellIdentifier = @"MWMSearchHistoryClearCell";
|
|||
|
||||
@implementation MWMSearchHistoryManager
|
||||
|
||||
- (BOOL)isRouteSearchMode
|
||||
{
|
||||
MWMRoutingPlaneMode const m = MapsAppDelegate.theApp.routingPlaneMode;
|
||||
return (m == MWMRoutingPlaneModeSearchSource ||
|
||||
m == MWMRoutingPlaneModeSearchDestination) &&
|
||||
MapsAppDelegate.theApp.m_locationManager.lastLocationIsValid;
|
||||
}
|
||||
|
||||
- (void)attachCell:(MWMSearchTabbedCollectionViewCell *)cell
|
||||
{
|
||||
self.cell = cell;
|
||||
UITableView * tableView = cell.tableView;
|
||||
tableView.alpha = cell.noResultsView.alpha = 1.0;
|
||||
if (GetFramework().GetLastSearchQueries().empty())
|
||||
BOOL const isRouteSearch = self.isRouteSearchMode;
|
||||
if (GetFramework().GetLastSearchQueries().empty() && !isRouteSearch)
|
||||
{
|
||||
tableView.hidden = YES;
|
||||
cell.noResultsView.hidden = NO;
|
||||
|
@ -39,6 +52,11 @@ static NSString * const kClearCellIdentifier = @"MWMSearchHistoryClearCell";
|
|||
forCellReuseIdentifier:kRequestCellIdentifier];
|
||||
[tableView registerNib:[UINib nibWithNibName:kClearCellIdentifier bundle:nil]
|
||||
forCellReuseIdentifier:kClearCellIdentifier];
|
||||
if (isRouteSearch)
|
||||
{
|
||||
[tableView registerNib:[UINib nibWithNibName:kMyPositionCellIdentifier bundle:nil]
|
||||
forCellReuseIdentifier:kMyPositionCellIdentifier];
|
||||
}
|
||||
[tableView reloadData];
|
||||
}
|
||||
cell.noResultsImage.image = [UIImage imageNamed:@"img_no_history_light"];
|
||||
|
@ -57,7 +75,8 @@ static NSString * const kClearCellIdentifier = @"MWMSearchHistoryClearCell";
|
|||
|
||||
- (NSString *)stringAtIndex:(NSInteger)index
|
||||
{
|
||||
return @([self queryAtIndex:index].second.c_str());
|
||||
NSUInteger const i = self.isRouteSearchMode ? index - 1 : index;
|
||||
return @([self queryAtIndex:i].second.c_str());
|
||||
}
|
||||
|
||||
#pragma mark - UITableViewDataSource
|
||||
|
@ -69,50 +88,70 @@ static NSString * const kClearCellIdentifier = @"MWMSearchHistoryClearCell";
|
|||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
if (indexPath.row < GetFramework().GetLastSearchQueries().size())
|
||||
NSUInteger const row = indexPath.row;
|
||||
BOOL const isRouteSearch = self.isRouteSearchMode;
|
||||
BOOL const isRequestCell = isRouteSearch ? row > 0 : row < GetFramework().GetLastSearchQueries().size();
|
||||
if (isRequestCell)
|
||||
return [tableView dequeueReusableCellWithIdentifier:kRequestCellIdentifier];
|
||||
else
|
||||
return [tableView dequeueReusableCellWithIdentifier:kClearCellIdentifier];
|
||||
return [tableView dequeueReusableCellWithIdentifier:isRouteSearch ? kMyPositionCellIdentifier : kClearCellIdentifier];
|
||||
}
|
||||
|
||||
#pragma mark - UITableViewDelegate
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView estimatedHeightForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
if (indexPath.row < GetFramework().GetLastSearchQueries().size())
|
||||
NSUInteger const row = indexPath.row;
|
||||
BOOL const isRouteSearch = self.isRouteSearchMode;
|
||||
BOOL const isRequestCell = isRouteSearch ? row > 0 : row < GetFramework().GetLastSearchQueries().size();
|
||||
if (isRequestCell)
|
||||
return MWMSearchHistoryRequestCell.defaultCellHeight;
|
||||
else
|
||||
return MWMSearchHistoryClearCell.cellHeight;
|
||||
return isRouteSearch ? MWMSearchHistoryMyPositionCell.cellHeight : MWMSearchHistoryClearCell.cellHeight;
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
if (indexPath.row < GetFramework().GetLastSearchQueries().size())
|
||||
NSUInteger const row = indexPath.row;
|
||||
BOOL const isRouteSearch = self.isRouteSearchMode;
|
||||
BOOL const isRequestCell = isRouteSearch ? row > 0 : row < GetFramework().GetLastSearchQueries().size();
|
||||
if (isRequestCell)
|
||||
{
|
||||
[self.sizingCell config:[self stringAtIndex:indexPath.row]];
|
||||
[self.sizingCell config:[self stringAtIndex:row]];
|
||||
return self.sizingCell.cellHeight;
|
||||
}
|
||||
else
|
||||
return MWMSearchHistoryClearCell.cellHeight;
|
||||
return isRouteSearch ? MWMSearchHistoryMyPositionCell.cellHeight : MWMSearchHistoryClearCell.cellHeight;
|
||||
}
|
||||
|
||||
- (void)tableView:(UITableView *)tableView willDisplayCell:(MWMSearchHistoryRequestCell *)cell
|
||||
forRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
if (indexPath.row < GetFramework().GetLastSearchQueries().size())
|
||||
size_t const size = GetFramework().GetLastSearchQueries().size() + (self.isRouteSearchMode ? 1 : 0);
|
||||
NSUInteger const row = indexPath.row;
|
||||
BOOL const isRequestCell = self.isRouteSearchMode ? row != 0 : row < size;
|
||||
if (isRequestCell)
|
||||
[cell config:[self stringAtIndex:indexPath.row]];
|
||||
}
|
||||
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
Framework & f = GetFramework();
|
||||
if (indexPath.row < f.GetLastSearchQueries().size())
|
||||
NSUInteger const row = indexPath.row;
|
||||
BOOL const isRouteSearch = self.isRouteSearchMode;
|
||||
BOOL const isRequestCell = isRouteSearch ? row != 0 : row < f.GetLastSearchQueries().size();
|
||||
if (isRequestCell)
|
||||
{
|
||||
search::QuerySaver::TSearchRequest const & query = [self queryAtIndex:indexPath.row];
|
||||
search::QuerySaver::TSearchRequest const & query = [self queryAtIndex:isRouteSearch ? indexPath.row - 1 : indexPath.row];
|
||||
[self.delegate searchText:@(query.second.c_str()) forInputLocale:@(query.first.c_str())];
|
||||
}
|
||||
else
|
||||
{
|
||||
if (isRouteSearch)
|
||||
{
|
||||
[self.delegate tapMyPositionFromHistory];
|
||||
return;
|
||||
}
|
||||
f.ClearSearchHistory();
|
||||
MWMSearchTabbedCollectionViewCell * cell = self.cell;
|
||||
[UIView animateWithDuration:kDefaultAnimationDuration animations:^
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
@interface MWMSearchHistoryMyPositionCell : UITableViewCell
|
||||
|
||||
+ (CGFloat)cellHeight;
|
||||
|
||||
@end
|
|
@ -0,0 +1,17 @@
|
|||
#import "MWMSearchHistoryMyPositionCell.h"
|
||||
|
||||
@implementation MWMSearchHistoryMyPositionCell
|
||||
|
||||
- (void)awakeFromNib
|
||||
{
|
||||
CALayer * sl = self.layer;
|
||||
sl.shouldRasterize = YES;
|
||||
sl.rasterizationScale = UIScreen.mainScreen.scale;
|
||||
}
|
||||
|
||||
+ (CGFloat)cellHeight
|
||||
{
|
||||
return 44.;
|
||||
}
|
||||
|
||||
@end
|
|
@ -0,0 +1,64 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9059" systemVersion="15A284" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9049"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="MWMSearchHistoryMyPositionCell" id="uvh-nl-Yob" customClass="MWMSearchHistoryMyPositionCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<tableViewCellContentView key="contentView" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="uvh-nl-Yob" id="JF3-jd-gfD">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="43.5"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_current_position" translatesAutoresizingMaskIntoConstraints="NO" id="hik-Fn-AeJ" userLabel="Icon">
|
||||
<rect key="frame" x="16" y="8" width="28" height="28"/>
|
||||
<animations/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="28" id="AHc-bb-adQ"/>
|
||||
<constraint firstAttribute="height" constant="28" id="da4-xG-m0E"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="5vp-WU-ZFN" userLabel="Separator">
|
||||
<rect key="frame" x="60" y="43" width="260" height="1"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.12" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="1" id="br6-hl-Ecq"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="My position" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ruc-o5-hBy" userLabel="Clear label">
|
||||
<rect key="frame" x="60" y="12" width="244" height="20"/>
|
||||
<animations/>
|
||||
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="17"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.54000000000000004" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="my_position"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular17"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackPrimaryText"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
</subviews>
|
||||
<animations/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="ruc-o5-hBy" secondAttribute="trailing" constant="16" id="6Np-wk-maE"/>
|
||||
<constraint firstItem="hik-Fn-AeJ" firstAttribute="leading" secondItem="JF3-jd-gfD" secondAttribute="leading" constant="16" id="HnE-gR-icX"/>
|
||||
<constraint firstAttribute="trailing" secondItem="5vp-WU-ZFN" secondAttribute="trailing" id="QRt-IT-JVQ"/>
|
||||
<constraint firstItem="5vp-WU-ZFN" firstAttribute="leading" secondItem="hik-Fn-AeJ" secondAttribute="trailing" constant="16" id="QWm-Nu-2te"/>
|
||||
<constraint firstAttribute="bottom" secondItem="5vp-WU-ZFN" secondAttribute="bottom" id="bV6-fB-tRN"/>
|
||||
<constraint firstItem="ruc-o5-hBy" firstAttribute="leading" secondItem="5vp-WU-ZFN" secondAttribute="leading" id="nI4-uc-JV4"/>
|
||||
<constraint firstAttribute="centerY" secondItem="ruc-o5-hBy" secondAttribute="centerY" id="obu-BB-qEf"/>
|
||||
<constraint firstAttribute="centerY" secondItem="hik-Fn-AeJ" secondAttribute="centerY" id="wP9-mz-caJ"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<animations/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="ic_current_position" width="28" height="28"/>
|
||||
</resources>
|
||||
</document>
|
|
@ -57,12 +57,13 @@ BOOL isOffsetInButton(CGFloat offset, MWMSearchTabButtonsView * button)
|
|||
|
||||
- (void)resetSelectedTab
|
||||
{
|
||||
self.selectedButtonTag = GetFramework().GetLastSearchQueries().empty() ? 1 : 0;
|
||||
self.selectedButtonTag = GetFramework().GetLastSearchQueries().empty() && !self.historyManager.isRouteSearchMode ? 1 : 0;
|
||||
}
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated
|
||||
{
|
||||
[self.tablesCollectionView reloadData];
|
||||
[self resetSelectedTab];
|
||||
[self refreshScrollPosition];
|
||||
[super viewWillAppear:animated];
|
||||
}
|
||||
|
|
|
@ -3,5 +3,6 @@
|
|||
@required
|
||||
|
||||
- (void)searchText:(NSString *)text forInputLocale:(NSString *)locale;
|
||||
- (void)tapMyPositionFromHistory;
|
||||
|
||||
@end
|
||||
|
|
|
@ -8,6 +8,9 @@
|
|||
|
||||
@property (nonatomic) MWMSearchManagerState state;
|
||||
|
||||
- (void)processSearchWithResult:(search::Result const &)result
|
||||
query:(search::QuerySaver::TSearchRequest const &)query;
|
||||
|
||||
@end
|
||||
|
||||
@interface MWMSearchTableViewController : UIViewController
|
||||
|
|
|
@ -114,7 +114,8 @@ LocationObserver>
|
|||
}
|
||||
else
|
||||
{
|
||||
if (IPAD)
|
||||
MWMRoutingPlaneMode const m = MapsAppDelegate.theApp.routingPlaneMode;
|
||||
if (IPAD || m == MWMRoutingPlaneModeSearchSource || m == MWMRoutingPlaneModeSearchDestination)
|
||||
return MWMSearchTableCellTypeCommon;
|
||||
else
|
||||
return indexPath.row == 0 ? MWMSearchTableCellTypeOnMap : MWMSearchTableCellTypeCommon;
|
||||
|
@ -235,16 +236,9 @@ forRowAtIndexPath:(NSIndexPath *)indexPath
|
|||
{
|
||||
search::Result const & result = [self searchResultForIndexPath:indexPath];
|
||||
if (cellType == MWMSearchTableCellTypeSuggestion)
|
||||
{
|
||||
[self.delegate searchText:@(result.GetSuggestionString()) forInputLocale:nil];
|
||||
}
|
||||
else
|
||||
{
|
||||
Framework & f = GetFramework();
|
||||
f.ShowSearchResult(result);
|
||||
f.SaveSearchQuery(make_pair(searchParams.m_inputLocale, searchParams.m_query));
|
||||
self.delegate.state = MWMSearchManagerStateHidden;
|
||||
}
|
||||
[self.delegate processSearchWithResult:result query:make_pair(searchParams.m_inputLocale, searchParams.m_query)];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#import "LocationManager.h"
|
||||
#import "MWMNavigationViewProtocol.h"
|
||||
#import "MWMRoutePreview.h"
|
||||
|
||||
#include "Framework.h"
|
||||
#include "platform/location.hpp"
|
||||
|
@ -7,6 +8,7 @@
|
|||
typedef NS_ENUM(NSUInteger, MWMNavigationDashboardState)
|
||||
{
|
||||
MWMNavigationDashboardStateHidden,
|
||||
MWMNavigationDashboardStatePrepare,
|
||||
MWMNavigationDashboardStatePlanning,
|
||||
MWMNavigationDashboardStateError,
|
||||
MWMNavigationDashboardStateReady,
|
||||
|
@ -15,10 +17,13 @@ typedef NS_ENUM(NSUInteger, MWMNavigationDashboardState)
|
|||
|
||||
@protocol MWMNavigationDashboardManagerProtocol <MWMNavigationViewProtocol>
|
||||
|
||||
- (void)buildRouteWithType:(enum routing::RouterType)type;
|
||||
- (void)didStartFollowing;
|
||||
- (void)buildRoute;
|
||||
- (BOOL)isPossibleToBuildRoute;
|
||||
- (BOOL)didStartFollowing;
|
||||
- (void)didCancelRouting;
|
||||
- (void)updateStatusBarStyle;
|
||||
- (void)didStartEditingRoutePoint:(BOOL)isSource;
|
||||
- (void)swapPointsAndRebuildRouteIfPossible;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -27,14 +32,17 @@ typedef NS_ENUM(NSUInteger, MWMNavigationDashboardState)
|
|||
@interface MWMNavigationDashboardManager : NSObject <LocationObserver>
|
||||
|
||||
@property (nonatomic, readonly) MWMNavigationDashboardEntity * entity;
|
||||
@property (weak, nonatomic, readonly) MWMRoutePreview * routePreview;
|
||||
@property (nonatomic) MWMNavigationDashboardState state;
|
||||
@property (weak, nonatomic, readonly) id<MWMNavigationDashboardManagerProtocol> delegate;
|
||||
@property (nonatomic) CGFloat topBound;
|
||||
@property (nonatomic) CGFloat leftBound;
|
||||
@property (nonatomic, readonly) CGFloat height;
|
||||
|
||||
- (instancetype)init __attribute__((unavailable("init is not available")));
|
||||
- (instancetype)initWithParentView:(UIView *)view delegate:(id<MWMNavigationDashboardManagerProtocol>)delegate;
|
||||
- (instancetype)initWithParentView:(UIView *)view delegate:(id<MWMNavigationDashboardManagerProtocol, MWMRoutePreviewDataSource>)delegate;
|
||||
- (void)setupDashboard:(location::FollowingInfo const &)info;
|
||||
- (void)updateDashboard;
|
||||
- (void)playTurnNotifications;
|
||||
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)orientation;
|
||||
- (void)viewWillTransitionToSize:(CGSize)size
|
||||
|
@ -42,5 +50,6 @@ typedef NS_ENUM(NSUInteger, MWMNavigationDashboardState)
|
|||
- (void)setRouteBuildingProgress:(CGFloat)progress;
|
||||
- (void)showHelperPanels;
|
||||
- (void)hideHelperPanels;
|
||||
- (void)setupActualRoute;
|
||||
|
||||
@end
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#import "Common.h"
|
||||
#import "Macros.h"
|
||||
#import "MapsAppDelegate.h"
|
||||
#import "MWMCircularProgress.h"
|
||||
#import "MWMLanesPanel.h"
|
||||
#import "MWMNavigationDashboard.h"
|
||||
#import "MWMNavigationDashboardEntity.h"
|
||||
|
@ -10,18 +11,25 @@
|
|||
#import "MWMRoutePreview.h"
|
||||
#import "MWMTextToSpeech.h"
|
||||
|
||||
@interface MWMNavigationDashboardManager ()
|
||||
static NSString * const kRoutePreviewXibName = @"MWMRoutePreview";
|
||||
static NSString * const kRoutePreviewIPADXibName = @"MWMiPadRoutePreview";
|
||||
static NSString * const kNavigationDashboardPortraitXibName = @"MWMPortraitNavigationDashboard";
|
||||
static NSString * const kNavigationDashboardLandscapeXibName = @"MWMLandscapeNavigationDashboard";
|
||||
static NSString * const kNavigationDashboardIPADXibName = @"MWMNiPadNavigationDashboard";
|
||||
|
||||
@property (nonatomic) IBOutlet MWMRoutePreview * routePreviewLandscape;
|
||||
@property (nonatomic) IBOutlet MWMRoutePreview * routePreviewPortrait;
|
||||
@property (weak, nonatomic) MWMRoutePreview * routePreview;
|
||||
|
||||
@interface MWMNavigationDashboardManager () <MWMCircularProgressProtocol>
|
||||
|
||||
@property (nonatomic) IBOutlet MWMRoutePreview * iPhoneRoutePreview;
|
||||
@property (nonatomic) IBOutlet MWMRoutePreview * iPadRoutePreview;
|
||||
@property (weak, nonatomic, readwrite) MWMRoutePreview * routePreview;
|
||||
|
||||
@property (nonatomic) IBOutlet MWMNavigationDashboard * navigationDashboardLandscape;
|
||||
@property (nonatomic) IBOutlet MWMNavigationDashboard * navigationDashboardPortrait;
|
||||
@property (weak, nonatomic) MWMNavigationDashboard * navigationDashboard;
|
||||
@property (weak, nonatomic) MWMCircularProgress * activeRouteTypeButton;
|
||||
|
||||
@property (weak, nonatomic) UIView * ownerView;
|
||||
@property (weak, nonatomic) id<MWMNavigationDashboardManagerProtocol> delegate;
|
||||
|
||||
@property (nonatomic) MWMNavigationDashboardEntity * entity;
|
||||
@property (nonatomic) MWMTextToSpeech * tts;
|
||||
|
@ -34,34 +42,44 @@
|
|||
|
||||
@implementation MWMNavigationDashboardManager
|
||||
|
||||
- (instancetype)initWithParentView:(UIView *)view delegate:(id<MWMNavigationDashboardManagerProtocol>)delegate
|
||||
- (instancetype)initWithParentView:(UIView *)view delegate:(id<MWMNavigationDashboardManagerProtocol, MWMRoutePreviewDataSource>)delegate
|
||||
{
|
||||
self = [super init];
|
||||
if (self)
|
||||
{
|
||||
self.ownerView = view;
|
||||
self.delegate = delegate;
|
||||
BOOL const isPortrait = self.ownerView.width < self.ownerView.height;
|
||||
|
||||
[NSBundle.mainBundle loadNibNamed:@"MWMPortraitRoutePreview" owner:self options:nil];
|
||||
[NSBundle.mainBundle loadNibNamed:@"MWMLandscapeRoutePreview" owner:self options:nil];
|
||||
self.routePreview = isPortrait ? self.routePreviewPortrait : self.routePreviewLandscape;
|
||||
self.routePreviewPortrait.delegate = self.routePreviewLandscape.delegate = delegate;
|
||||
_ownerView = view;
|
||||
_delegate = delegate;
|
||||
BOOL const isPortrait = _ownerView.width < _ownerView.height;
|
||||
if (IPAD)
|
||||
{
|
||||
[NSBundle.mainBundle loadNibNamed:@"MWMNiPadNavigationDashboard" owner:self options:nil];
|
||||
self.navigationDashboard = self.navigationDashboardPortrait;
|
||||
self.navigationDashboard.delegate = delegate;
|
||||
[NSBundle.mainBundle loadNibNamed:kRoutePreviewIPADXibName owner:self options:nil];
|
||||
_routePreview = _iPadRoutePreview;
|
||||
}
|
||||
else
|
||||
{
|
||||
[NSBundle.mainBundle loadNibNamed:@"MWMPortraitNavigationDashboard" owner:self options:nil];
|
||||
[NSBundle.mainBundle loadNibNamed:@"MWMLandscapeNavigationDashboard" owner:self options:nil];
|
||||
self.navigationDashboard = isPortrait ? self.navigationDashboardPortrait : self.navigationDashboardLandscape;
|
||||
self.navigationDashboardPortrait.delegate = self.navigationDashboardLandscape.delegate = delegate;
|
||||
[NSBundle.mainBundle loadNibNamed:kRoutePreviewXibName owner:self options:nil];
|
||||
_routePreview = _iPhoneRoutePreview;
|
||||
}
|
||||
self.tts = [[MWMTextToSpeech alloc] init];
|
||||
self.helperPanels = [NSMutableArray array];
|
||||
|
||||
_routePreview.dashboardManager = self;
|
||||
_routePreview.pedestrianProgressView.delegate = _routePreview.vehicleProgressView.delegate = self;
|
||||
_routePreview.delegate = delegate;
|
||||
_routePreview.dataSource = delegate;
|
||||
if (IPAD)
|
||||
{
|
||||
[NSBundle.mainBundle loadNibNamed:kNavigationDashboardIPADXibName owner:self options:nil];
|
||||
_navigationDashboard = _navigationDashboardPortrait;
|
||||
_navigationDashboard.delegate = delegate;
|
||||
}
|
||||
else
|
||||
{
|
||||
[NSBundle.mainBundle loadNibNamed:kNavigationDashboardPortraitXibName owner:self options:nil];
|
||||
[NSBundle.mainBundle loadNibNamed:kNavigationDashboardLandscapeXibName owner:self options:nil];
|
||||
_navigationDashboard = isPortrait ? _navigationDashboardPortrait : _navigationDashboardLandscape;
|
||||
_navigationDashboardPortrait.delegate = _navigationDashboardLandscape.delegate = delegate;
|
||||
}
|
||||
_tts = [[MWMTextToSpeech alloc] init];
|
||||
_helperPanels = [NSMutableArray array];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
@ -81,13 +99,6 @@
|
|||
|
||||
- (void)updateInterface:(BOOL)isPortrait
|
||||
{
|
||||
MWMRoutePreview * routePreview = isPortrait ? self.routePreviewPortrait : self.routePreviewLandscape;
|
||||
if (self.routePreview.isVisible && ![routePreview isEqual:self.routePreview])
|
||||
{
|
||||
[self.routePreview remove];
|
||||
[routePreview addToView:self.ownerView];
|
||||
}
|
||||
self.routePreview = routePreview;
|
||||
if (IPAD)
|
||||
return;
|
||||
|
||||
|
@ -133,19 +144,20 @@
|
|||
|
||||
- (void)playTurnNotifications
|
||||
{
|
||||
[self.tts playTurnNotifications];
|
||||
if (self.state == MWMNavigationDashboardStateNavigation)
|
||||
[self.tts playTurnNotifications];
|
||||
}
|
||||
|
||||
- (void)handleError
|
||||
{
|
||||
[self.routePreviewPortrait stateError];
|
||||
[self.routePreviewLandscape stateError];
|
||||
[self.routePreview stateError];
|
||||
self.activeRouteTypeButton.state = MWMCircularProgressStateFailed;
|
||||
[self.activeRouteTypeButton stopSpinner];
|
||||
}
|
||||
|
||||
- (void)updateDashboard
|
||||
{
|
||||
[self.routePreviewLandscape configureWithEntity:self.entity];
|
||||
[self.routePreviewPortrait configureWithEntity:self.entity];
|
||||
[self.routePreview configureWithEntity:self.entity];
|
||||
[self.navigationDashboardLandscape configureWithEntity:self.entity];
|
||||
[self.navigationDashboardPortrait configureWithEntity:self.entity];
|
||||
if (self.state != MWMNavigationDashboardStateNavigation)
|
||||
|
@ -169,7 +181,6 @@
|
|||
[self removePanel:self.nextTurnPanel];
|
||||
}
|
||||
[self.drawer invalidateTopBounds:self.helperPanels topView:self.navigationDashboard];
|
||||
[self.navigationDashboard setNeedsLayout];
|
||||
}
|
||||
|
||||
- (void)addPanel:(MWMRouteHelperPanel *)panel
|
||||
|
@ -212,40 +223,49 @@
|
|||
panel.hidden = YES;
|
||||
}
|
||||
|
||||
#pragma mark - MWMRoutePreview
|
||||
#pragma mark - MWMCircularProgressDelegate
|
||||
|
||||
- (IBAction)routePreviewChange:(UIButton *)sender
|
||||
- (void)progressButtonPressed:(nonnull MWMCircularProgress *)progress
|
||||
{
|
||||
if (sender.selected)
|
||||
MWMCircularProgressState const s = progress.state;
|
||||
if (s == MWMCircularProgressStateSelected || s == MWMCircularProgressStateCompleted)
|
||||
return;
|
||||
sender.selected = YES;
|
||||
self.activeRouteTypeButton = progress;
|
||||
auto & f = GetFramework();
|
||||
if ([sender isEqual:self.routePreview.pedestrian])
|
||||
routing::RouterType type;
|
||||
if ([progress isEqual:self.routePreview.pedestrianProgressView])
|
||||
{
|
||||
self.routePreview.vehicle.selected = NO;
|
||||
f.SetRouter(routing::RouterType::Pedestrian);
|
||||
[self.routePreview.vehicleProgressView stopSpinner];
|
||||
type = routing::RouterType::Pedestrian;
|
||||
}
|
||||
else
|
||||
{
|
||||
self.routePreview.pedestrian.selected = NO;
|
||||
f.SetRouter(routing::RouterType::Vehicle);
|
||||
[self.routePreview.pedestrianProgressView stopSpinner];
|
||||
type = routing::RouterType::Vehicle;
|
||||
}
|
||||
f.CloseRouting();
|
||||
[self showStatePlanning];
|
||||
[self.delegate buildRouteWithType:f.GetRouter()];
|
||||
f.SetRouter(type);
|
||||
f.SetLastUsedRouter(type);
|
||||
[self.routePreview selectProgress:progress];
|
||||
if (!self.delegate.isPossibleToBuildRoute)
|
||||
return;
|
||||
[progress startSpinner];
|
||||
[self.delegate buildRoute];
|
||||
}
|
||||
|
||||
#pragma mark - MWMRoutePreview
|
||||
|
||||
- (void)setRouteBuildingProgress:(CGFloat)progress
|
||||
{
|
||||
[self.routePreviewLandscape setRouteBuildingProgress:progress];
|
||||
[self.routePreviewPortrait setRouteBuildingProgress:progress];
|
||||
[self.activeRouteTypeButton setProgress:progress / 100.];
|
||||
}
|
||||
|
||||
#pragma mark - MWMNavigationDashboard
|
||||
|
||||
- (IBAction)navigationCancelPressed:(UIButton *)sender
|
||||
{
|
||||
self.state = MWMNavigationDashboardStateHidden;
|
||||
if (IPAD && self.state != MWMNavigationDashboardStateNavigation)
|
||||
[self.delegate routePreviewDidChangeFrame:{}];
|
||||
[self removePanel:self.nextTurnPanel];
|
||||
// [self removePanel:self.lanesPanel];
|
||||
self.helperPanels = [NSMutableArray array];
|
||||
|
@ -256,8 +276,8 @@
|
|||
|
||||
- (IBAction)navigationGoPressed:(UIButton *)sender
|
||||
{
|
||||
self.state = MWMNavigationDashboardStateNavigation;
|
||||
[self.delegate didStartFollowing];
|
||||
if ([self.delegate didStartFollowing])
|
||||
self.state = MWMNavigationDashboardStateNavigation;
|
||||
}
|
||||
|
||||
#pragma mark - State changes
|
||||
|
@ -270,35 +290,27 @@
|
|||
// [self removePanel:self.lanesPanel];
|
||||
}
|
||||
|
||||
- (void)showStatePrepare
|
||||
{
|
||||
[self.routePreview addToView:self.ownerView];
|
||||
[self.routePreview statePrepare];
|
||||
[self setupActualRoute];
|
||||
}
|
||||
|
||||
- (void)showStatePlanning
|
||||
{
|
||||
[self.navigationDashboard remove];
|
||||
[self.routePreview addToView:self.ownerView];
|
||||
[self.routePreviewLandscape statePlaning];
|
||||
[self.routePreviewPortrait statePlaning];
|
||||
[self.routePreview statePlanning];
|
||||
[self removePanel:self.nextTurnPanel];
|
||||
// [self removePanel:self.lanesPanel];
|
||||
auto const state = GetFramework().GetRouter();
|
||||
switch (state)
|
||||
{
|
||||
case routing::RouterType::Pedestrian:
|
||||
self.routePreviewLandscape.pedestrian.selected = YES;
|
||||
self.routePreviewPortrait.pedestrian.selected = YES;
|
||||
self.routePreviewPortrait.vehicle.selected = NO;
|
||||
self.routePreviewLandscape.vehicle.selected = NO;
|
||||
break;
|
||||
case routing::RouterType::Vehicle:
|
||||
self.routePreviewLandscape.vehicle.selected = YES;
|
||||
self.routePreviewPortrait.vehicle.selected = YES;
|
||||
self.routePreviewLandscape.pedestrian.selected = NO;
|
||||
self.routePreviewPortrait.pedestrian.selected = NO;
|
||||
break;
|
||||
}
|
||||
[self setupActualRoute];
|
||||
[self.activeRouteTypeButton startSpinner];
|
||||
}
|
||||
|
||||
- (void)showStateReady
|
||||
{
|
||||
[self showGoButton:YES];
|
||||
[self.routePreview stateReady];
|
||||
}
|
||||
|
||||
- (void)showStateNavigation
|
||||
|
@ -307,10 +319,22 @@
|
|||
[self.navigationDashboard addToView:self.ownerView];
|
||||
}
|
||||
|
||||
- (void)showGoButton:(BOOL)show
|
||||
- (void)setupActualRoute
|
||||
{
|
||||
[self.routePreviewPortrait showGoButtonAnimated:show];
|
||||
[self.routePreviewLandscape showGoButtonAnimated:show];
|
||||
switch (GetFramework().GetRouter())
|
||||
{
|
||||
case routing::RouterType::Pedestrian:
|
||||
// self.routePreview.pedestrianProgressView.state = MWMCircularProgressStateSelected;
|
||||
// self.routePreview.vehicleProgressView.state = MWMCircularProgressStateNormal;
|
||||
self.activeRouteTypeButton = self.routePreview.pedestrianProgressView;
|
||||
break;
|
||||
case routing::RouterType::Vehicle:
|
||||
// self.routePreview.vehicleProgressView.state = MWMCircularProgressStateSelected;
|
||||
// self.routePreview.pedestrianProgressView.state = MWMCircularProgressStateNormal;
|
||||
self.activeRouteTypeButton = self.routePreview.vehicleProgressView;
|
||||
break;
|
||||
}
|
||||
[self.routePreview selectProgress:self.activeRouteTypeButton];
|
||||
}
|
||||
|
||||
#pragma mark - Properties
|
||||
|
@ -342,23 +366,26 @@
|
|||
return;
|
||||
switch (state)
|
||||
{
|
||||
case MWMNavigationDashboardStateHidden:
|
||||
[self hideState];
|
||||
break;
|
||||
case MWMNavigationDashboardStatePlanning:
|
||||
[self showStatePlanning];
|
||||
break;
|
||||
case MWMNavigationDashboardStateError:
|
||||
NSAssert(_state == MWMNavigationDashboardStatePlanning || _state == MWMNavigationDashboardStateReady, @"Invalid state change (error)");
|
||||
[self handleError];
|
||||
break;
|
||||
case MWMNavigationDashboardStateReady:
|
||||
NSAssert(_state == MWMNavigationDashboardStatePlanning, @"Invalid state change (ready)");
|
||||
[self showStateReady];
|
||||
break;
|
||||
case MWMNavigationDashboardStateNavigation:
|
||||
[self showStateNavigation];
|
||||
break;
|
||||
case MWMNavigationDashboardStateHidden:
|
||||
[self hideState];
|
||||
break;
|
||||
case MWMNavigationDashboardStatePrepare:
|
||||
[self showStatePrepare];
|
||||
break;
|
||||
case MWMNavigationDashboardStatePlanning:
|
||||
[self showStatePlanning];
|
||||
break;
|
||||
case MWMNavigationDashboardStateError:
|
||||
NSAssert(_state == MWMNavigationDashboardStatePlanning || _state == MWMNavigationDashboardStateReady, @"Invalid state change (error)");
|
||||
[self handleError];
|
||||
break;
|
||||
case MWMNavigationDashboardStateReady:
|
||||
NSAssert(_state == MWMNavigationDashboardStatePlanning, @"Invalid state change (ready)");
|
||||
[self showStateReady];
|
||||
break;
|
||||
case MWMNavigationDashboardStateNavigation:
|
||||
[self showStateNavigation];
|
||||
break;
|
||||
}
|
||||
_state = state;
|
||||
[self.delegate updateStatusBarStyle];
|
||||
|
@ -366,14 +393,14 @@
|
|||
|
||||
- (void)setTopBound:(CGFloat)topBound
|
||||
{
|
||||
_topBound = self.routePreviewLandscape.topBound = self.routePreviewPortrait.topBound =
|
||||
_topBound = self.routePreview.topBound =
|
||||
self.navigationDashboardLandscape.topBound = self.navigationDashboardPortrait.topBound = topBound;
|
||||
[self.drawer invalidateTopBounds:self.helperPanels topView:self.navigationDashboard];
|
||||
}
|
||||
|
||||
- (void)setLeftBound:(CGFloat)leftBound
|
||||
{
|
||||
_leftBound = self.routePreviewLandscape.leftBound = self.routePreviewPortrait.leftBound =
|
||||
_leftBound = self.routePreview.leftBound =
|
||||
self.navigationDashboardLandscape.leftBound = self.navigationDashboardPortrait.leftBound = leftBound;
|
||||
}
|
||||
|
||||
|
@ -381,14 +408,17 @@
|
|||
{
|
||||
switch (self.state)
|
||||
{
|
||||
case MWMNavigationDashboardStateHidden:
|
||||
return 0.0;
|
||||
case MWMNavigationDashboardStatePlanning:
|
||||
case MWMNavigationDashboardStateReady:
|
||||
case MWMNavigationDashboardStateError:
|
||||
return self.routePreview.visibleHeight;
|
||||
case MWMNavigationDashboardStateNavigation:
|
||||
return self.navigationDashboard.visibleHeight;
|
||||
case MWMNavigationDashboardStateHidden:
|
||||
return 0.0;
|
||||
case MWMNavigationDashboardStatePlanning:
|
||||
case MWMNavigationDashboardStateReady:
|
||||
case MWMNavigationDashboardStateError:
|
||||
case MWMNavigationDashboardStatePrepare:
|
||||
if (IPAD)
|
||||
return self.topBound;
|
||||
return self.routePreview.visibleHeight;
|
||||
case MWMNavigationDashboardStateNavigation:
|
||||
return self.navigationDashboard.visibleHeight;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -69,7 +69,6 @@
|
|||
{
|
||||
if (!v.hidden)
|
||||
height += v.height;
|
||||
continue;
|
||||
}
|
||||
return height;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#import "MWMNavigationViewProtocol.h"
|
||||
|
||||
@interface MWMNavigationView : UIView
|
||||
@interface MWMNavigationView : SolidTouchView
|
||||
|
||||
@property (nonatomic) CGFloat topBound;
|
||||
@property (nonatomic) CGFloat leftBound;
|
||||
|
|
|
@ -27,9 +27,14 @@ static CGFloat const kStatusbarHeight = 20.0;
|
|||
- (void)addToView:(UIView *)superview
|
||||
{
|
||||
NSAssert(superview != nil, @"Superview can't be nil");
|
||||
if ([superview.subviews containsObject:self])
|
||||
return;
|
||||
dispatch_async(dispatch_get_main_queue(), ^
|
||||
{
|
||||
[superview insertSubview:self atIndex:0];
|
||||
if (IPAD)
|
||||
[superview addSubview:self];
|
||||
else
|
||||
[superview insertSubview:self atIndex:0];
|
||||
self.frame = self.defaultFrame;
|
||||
self.isVisible = YES;
|
||||
});
|
||||
|
|
|
@ -3,5 +3,6 @@
|
|||
@protocol MWMNavigationViewProtocol <NSObject>
|
||||
|
||||
- (void)navigationDashBoardDidUpdate;
|
||||
- (void)routePreviewDidChangeFrame:(CGRect)newFrame;
|
||||
|
||||
@end
|
||||
|
|
|
@ -1,290 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="14F27" 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>
|
||||
<outlet property="routePreviewLandscape" destination="EvQ-CH-5qC" id="s8e-5T-iGB"/>
|
||||
</connections>
|
||||
</placeholder>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="EvQ-CH-5qC" customClass="MWMRoutePreview">
|
||||
<rect key="frame" x="0.0" y="0.0" width="736" height="88"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<button contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="0m5-cD-yfC">
|
||||
<rect key="frame" x="0.0" y="0.0" width="736" height="44"/>
|
||||
<color key="backgroundColor" red="0.12549019610000001" green="0.58823529409999997" blue="0.95294117649999999" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="44" id="O48-rs-xGy"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" name="HelveticaNeue-Medium" family="Helvetica Neue" pointSize="14"/>
|
||||
<state key="normal" title="Start">
|
||||
<color key="titleColor" red="1" green="1" blue="1" alpha="0.87" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</state>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="layer.shadowRadius">
|
||||
<integer key="value" value="2"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="layer.shadowUIColor">
|
||||
<color key="value" red="0.0" green="0.0" blue="0.0" alpha="0.23999999999999999" colorSpace="calibratedRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="routing_start"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="textColorName" value="whitePrimaryText"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="medium14"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="navigationGoPressed:" destination="-1" eventType="touchUpInside" id="oB1-g0-g7y"/>
|
||||
</connections>
|
||||
</button>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bfG-c5-fMl" customClass="SolidTouchView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="736" height="44"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="T3a-Uc-t4C" userLabel="Progress">
|
||||
<rect key="frame" x="0.0" y="2" width="40" height="40"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Eh1-Uy-Sq5" userLabel="Progress Indicator">
|
||||
<rect key="frame" x="8" y="8" width="24" height="24"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="24" id="hc5-du-YLU"/>
|
||||
<constraint firstAttribute="width" constant="24" id="vEt-9V-90f"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<gestureRecognizers/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="40" id="Fhd-uI-aii"/>
|
||||
<constraint firstAttribute="centerY" secondItem="Eh1-Uy-Sq5" secondAttribute="centerY" id="Ni5-Xo-huC"/>
|
||||
<constraint firstAttribute="centerX" secondItem="Eh1-Uy-Sq5" secondAttribute="centerX" id="hp5-v7-zHm"/>
|
||||
<constraint firstAttribute="width" constant="40" id="l76-Dn-9ce"/>
|
||||
</constraints>
|
||||
<connections>
|
||||
<outletCollection property="gestureRecognizers" destination="WGE-3l-as1" appends="YES" id="nX2-IU-UF8"/>
|
||||
</connections>
|
||||
</view>
|
||||
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="eGS-Xr-GDV" userLabel="Cancel Button">
|
||||
<rect key="frame" x="0.0" y="2" width="40" height="40"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="40" id="1oI-UW-T3s"/>
|
||||
<constraint firstAttribute="height" constant="40" id="M2D-g6-ioS"/>
|
||||
</constraints>
|
||||
<state key="normal" image="ic_cancel">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<connections>
|
||||
<action selector="navigationCancelPressed:" destination="-1" eventType="touchUpInside" id="pyU-Pc-KC2"/>
|
||||
</connections>
|
||||
</button>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ECz-mP-xyb" userLabel="Planning Route Box">
|
||||
<rect key="frame" x="56" y="12" width="588" height="20"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Creating route..." lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wzR-lf-hDI">
|
||||
<rect key="frame" x="0.0" y="0.0" width="588" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="20" id="a91-oh-DfU"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="17"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.26000000000000001" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackHintText"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular17"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="20" id="17f-3M-fBi"/>
|
||||
<constraint firstItem="wzR-lf-hDI" firstAttribute="leading" secondItem="ECz-mP-xyb" secondAttribute="leading" id="GK6-mP-16G"/>
|
||||
<constraint firstItem="wzR-lf-hDI" firstAttribute="top" secondItem="ECz-mP-xyb" secondAttribute="top" id="oFf-ns-ksJ"/>
|
||||
<constraint firstAttribute="trailing" secondItem="wzR-lf-hDI" secondAttribute="trailing" id="ytf-Dd-Bd0"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="EfU-nE-6L9" userLabel="Complete Route Box">
|
||||
<rect key="frame" x="56" y="12" width="588" height="20"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="time" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Tw5-0C-086">
|
||||
<rect key="frame" x="0.0" y="0.0" width="35" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="35" id="uCf-6K-3Iw"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" name="HelveticaNeue-Medium" family="Helvetica Neue" pointSize="17"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.87" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackPrimaryText"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="medium17"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="dist" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ziN-lg-ual">
|
||||
<rect key="frame" x="66" y="0.0" width="31" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="31" id="lgu-YA-uXa"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="17"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.87" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackPrimaryText"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular17"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Arrivals time in progress" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0NR-QB-wCJ">
|
||||
<rect key="frame" x="135" y="0.0" width="183" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="50" id="Wa6-9K-MFp"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="17"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.87" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackPrimaryText"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular17"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="0NR-QB-wCJ" secondAttribute="trailing" priority="250" constant="396.5" id="0e9-nG-KCA"/>
|
||||
<constraint firstAttribute="bottom" secondItem="0NR-QB-wCJ" secondAttribute="bottom" id="0q6-9b-n76"/>
|
||||
<constraint firstAttribute="bottom" secondItem="ziN-lg-ual" secondAttribute="bottom" id="1H4-wg-PYA"/>
|
||||
<constraint firstItem="ziN-lg-ual" firstAttribute="top" secondItem="EfU-nE-6L9" secondAttribute="top" id="876-18-bwv"/>
|
||||
<constraint firstItem="Tw5-0C-086" firstAttribute="leading" secondItem="EfU-nE-6L9" secondAttribute="leading" id="Cdb-pB-9Ob"/>
|
||||
<constraint firstItem="0NR-QB-wCJ" firstAttribute="leading" secondItem="ziN-lg-ual" secondAttribute="trailing" constant="38" id="RFy-07-ZSJ"/>
|
||||
<constraint firstItem="Tw5-0C-086" firstAttribute="top" secondItem="EfU-nE-6L9" secondAttribute="top" id="TjF-vm-SC1"/>
|
||||
<constraint firstAttribute="height" constant="20" id="YPp-YJ-xeQ"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Tw5-0C-086" secondAttribute="bottom" id="hwx-Vd-9Qo"/>
|
||||
<constraint firstItem="ziN-lg-ual" firstAttribute="leading" secondItem="Tw5-0C-086" secondAttribute="trailing" constant="31" id="wUi-tY-faO"/>
|
||||
<constraint firstItem="0NR-QB-wCJ" firstAttribute="top" secondItem="EfU-nE-6L9" secondAttribute="top" id="x2A-oT-PLO"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Oe3-Op-uEp" userLabel="Buttons Box">
|
||||
<rect key="frame" x="648" y="2" width="80" height="40"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="0dd-I8-xaK" userLabel="Walk Button">
|
||||
<rect key="frame" x="0.0" y="0.0" width="40" height="40"/>
|
||||
<state key="normal" image="ic_walk_off">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<state key="selected" image="ic_walk_on"/>
|
||||
<connections>
|
||||
<action selector="routePreviewChange:" destination="-1" eventType="touchUpInside" id="bf4-fQ-DLf"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="yNr-DG-8Hu" userLabel="Drive Button">
|
||||
<rect key="frame" x="40" y="0.0" width="40" height="40"/>
|
||||
<state key="normal" image="ic_drive_off">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<state key="selected" image="ic_drive_on"/>
|
||||
<connections>
|
||||
<action selector="routePreviewChange:" destination="-1" eventType="touchUpInside" id="XHs-7h-PYO"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="yNr-DG-8Hu" firstAttribute="leading" secondItem="0dd-I8-xaK" secondAttribute="trailing" id="A2v-Wd-ekq"/>
|
||||
<constraint firstAttribute="width" constant="80" id="CWs-S1-Q3d"/>
|
||||
<constraint firstItem="yNr-DG-8Hu" firstAttribute="leading" secondItem="0dd-I8-xaK" secondAttribute="trailing" id="HgM-AD-lb8"/>
|
||||
<constraint firstItem="0dd-I8-xaK" firstAttribute="leading" secondItem="Oe3-Op-uEp" secondAttribute="leading" id="T9Y-hU-9Do"/>
|
||||
<constraint firstAttribute="bottom" secondItem="0dd-I8-xaK" secondAttribute="bottom" id="Yp7-rD-6h3"/>
|
||||
<constraint firstItem="yNr-DG-8Hu" firstAttribute="top" secondItem="Oe3-Op-uEp" secondAttribute="top" id="cIV-hA-FGQ"/>
|
||||
<constraint firstAttribute="height" constant="40" id="hGs-kN-l8Z"/>
|
||||
<constraint firstAttribute="bottom" secondItem="yNr-DG-8Hu" secondAttribute="bottom" id="rUs-Fr-0Nh"/>
|
||||
<constraint firstItem="0dd-I8-xaK" firstAttribute="top" secondItem="Oe3-Op-uEp" secondAttribute="top" id="uOg-Rd-X6M"/>
|
||||
<constraint firstAttribute="trailing" secondItem="yNr-DG-8Hu" secondAttribute="trailing" id="yZ5-4G-SLq"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="EfU-nE-6L9" firstAttribute="top" secondItem="bfG-c5-fMl" secondAttribute="top" constant="12" id="5Bd-yt-hv4"/>
|
||||
<constraint firstItem="ECz-mP-xyb" firstAttribute="leading" secondItem="eGS-Xr-GDV" secondAttribute="trailing" constant="16" id="6Ll-tL-zxE"/>
|
||||
<constraint firstItem="T3a-Uc-t4C" firstAttribute="leading" secondItem="bfG-c5-fMl" secondAttribute="leading" id="B8L-xg-vFd"/>
|
||||
<constraint firstItem="T3a-Uc-t4C" firstAttribute="top" secondItem="bfG-c5-fMl" secondAttribute="top" constant="2" id="Ofb-1J-dFh"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Oe3-Op-uEp" secondAttribute="bottom" constant="2" id="Res-ht-qAb"/>
|
||||
<constraint firstItem="Oe3-Op-uEp" firstAttribute="leading" secondItem="EfU-nE-6L9" secondAttribute="trailing" constant="4" id="W3N-0v-ZMF"/>
|
||||
<constraint firstItem="eGS-Xr-GDV" firstAttribute="top" secondItem="bfG-c5-fMl" secondAttribute="top" constant="2" id="deE-9T-acf"/>
|
||||
<constraint firstItem="ECz-mP-xyb" firstAttribute="top" secondItem="bfG-c5-fMl" secondAttribute="top" constant="12" id="g9u-yA-Bzr"/>
|
||||
<constraint firstItem="EfU-nE-6L9" firstAttribute="leading" secondItem="eGS-Xr-GDV" secondAttribute="trailing" constant="16" id="nVJ-HW-CyX"/>
|
||||
<constraint firstItem="eGS-Xr-GDV" firstAttribute="leading" secondItem="bfG-c5-fMl" secondAttribute="leading" id="nym-lw-48E"/>
|
||||
<constraint firstAttribute="height" constant="44" id="qFf-mT-U9d"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Oe3-Op-uEp" secondAttribute="trailing" constant="8" id="rTj-VC-TKj"/>
|
||||
<constraint firstItem="Oe3-Op-uEp" firstAttribute="leading" secondItem="ECz-mP-xyb" secondAttribute="trailing" constant="4" id="vXX-Ac-Sac"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="bfG-c5-fMl" secondAttribute="trailing" id="BtB-CZ-LoT"/>
|
||||
<constraint firstAttribute="bottom" secondItem="0m5-cD-yfC" secondAttribute="bottom" constant="44" id="C4v-nE-10G"/>
|
||||
<constraint firstItem="0m5-cD-yfC" firstAttribute="leading" secondItem="EvQ-CH-5qC" secondAttribute="leading" id="Czx-5O-b1N"/>
|
||||
<constraint firstItem="bfG-c5-fMl" firstAttribute="top" secondItem="EvQ-CH-5qC" secondAttribute="top" id="Zkj-D8-VKg"/>
|
||||
<constraint firstItem="bfG-c5-fMl" firstAttribute="leading" secondItem="EvQ-CH-5qC" secondAttribute="leading" id="hrq-5X-Lkg"/>
|
||||
<constraint firstAttribute="trailing" secondItem="0m5-cD-yfC" secondAttribute="trailing" id="x24-aP-iq2"/>
|
||||
</constraints>
|
||||
<nil key="simulatedStatusBarMetrics"/>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="layer.shadowRadius">
|
||||
<integer key="value" value="2"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="layer.shadowUIColor">
|
||||
<color key="value" red="0.0" green="0.0" blue="0.0" alpha="0.23999999999999999" colorSpace="calibratedRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="layer.shadowOpacity">
|
||||
<integer key="value" value="1"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="size" keyPath="layer.shadowOffset">
|
||||
<size key="value" width="0.0" height="1"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<outlet property="arrivalsLabel" destination="0NR-QB-wCJ" id="E3B-xd-DiO"/>
|
||||
<outlet property="cancelButton" destination="eGS-Xr-GDV" id="9gQ-5b-oIX"/>
|
||||
<outlet property="completeBox" destination="EfU-nE-6L9" id="0eS-Nq-1OX"/>
|
||||
<outlet property="contentView" destination="bfG-c5-fMl" id="kaA-Q0-THS"/>
|
||||
<outlet property="distanceLabel" destination="ziN-lg-ual" id="tVN-kZ-kgK"/>
|
||||
<outlet property="goButtonHeight" destination="O48-rs-xGy" id="IGX-3J-58V"/>
|
||||
<outlet property="goButtonVerticalOffset" destination="C4v-nE-10G" id="YCG-GD-szj"/>
|
||||
<outlet property="pedestrian" destination="0dd-I8-xaK" id="0p2-T2-1MD"/>
|
||||
<outlet property="progress" destination="T3a-Uc-t4C" id="3NF-I4-27n"/>
|
||||
<outlet property="progressIndicator" destination="Eh1-Uy-Sq5" id="puB-PV-EGe"/>
|
||||
<outlet property="status" destination="wzR-lf-hDI" id="FXn-1Y-15m"/>
|
||||
<outlet property="statusBox" destination="ECz-mP-xyb" id="iuO-KL-p0U"/>
|
||||
<outlet property="timeLabel" destination="Tw5-0C-086" id="KJL-hQ-Tcp"/>
|
||||
<outlet property="vehicle" destination="yNr-DG-8Hu" id="nVZ-KV-Icf"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="369" y="452"/>
|
||||
</view>
|
||||
<tapGestureRecognizer id="WGE-3l-as1">
|
||||
<connections>
|
||||
<action selector="navigationCancelPressed:" destination="-1" id="od8-br-EaV"/>
|
||||
</connections>
|
||||
</tapGestureRecognizer>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="ic_cancel" width="40" height="40"/>
|
||||
<image name="ic_drive_off" width="40" height="40"/>
|
||||
<image name="ic_drive_on" width="40" height="40"/>
|
||||
<image name="ic_walk_off" width="40" height="40"/>
|
||||
<image name="ic_walk_on" width="40" height="40"/>
|
||||
</resources>
|
||||
<simulatedMetricsContainer key="defaultSimulatedMetrics">
|
||||
<simulatedStatusBarMetrics key="statusBar"/>
|
||||
<simulatedOrientationMetrics key="orientation"/>
|
||||
<simulatedScreenMetrics key="destination" type="retina4"/>
|
||||
</simulatedMetricsContainer>
|
||||
</document>
|
|
@ -1,279 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="14F27" 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>
|
||||
<outlet property="routePreviewPortrait" destination="88L-VX-bE9" id="cmc-WF-YnF"/>
|
||||
</connections>
|
||||
</placeholder>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="88L-VX-bE9" customClass="MWMRoutePreview">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="88"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<button contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="z2d-B1-i2q">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
|
||||
<color key="backgroundColor" red="0.12549019610000001" green="0.58823529409999997" blue="0.95294117649999999" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="44" id="1mg-dZ-WyP"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" name="HelveticaNeue-Medium" family="Helvetica Neue" pointSize="14"/>
|
||||
<state key="normal" title="Start">
|
||||
<color key="titleColor" red="1" green="1" blue="1" alpha="0.87" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</state>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="layer.shadowRadius">
|
||||
<integer key="value" value="2"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="layer.shadowUIColor">
|
||||
<color key="value" red="0.0" green="0.0" blue="0.0" alpha="0.23999999999999999" colorSpace="calibratedRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="routing_start"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="textColorName" value="whitePrimaryText"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="medium14"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="navigationGoPressed:" destination="-1" eventType="touchUpInside" id="Ftg-bM-Sht"/>
|
||||
</connections>
|
||||
</button>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="q2t-0L-2K9" customClass="SolidTouchView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="pT2-o1-o2w" userLabel="Progress">
|
||||
<rect key="frame" x="0.0" y="2" width="40" height="40"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="GZA-Mt-Lx4" userLabel="Progress Indicator">
|
||||
<rect key="frame" x="8" y="8" width="24" height="24"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="24" id="DhW-aY-KNR"/>
|
||||
<constraint firstAttribute="width" constant="24" id="IEq-Cd-iAT"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<gestureRecognizers/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerX" secondItem="GZA-Mt-Lx4" secondAttribute="centerX" id="h7L-nw-s6H"/>
|
||||
<constraint firstAttribute="height" constant="40" id="mpa-fk-lSz"/>
|
||||
<constraint firstAttribute="centerY" secondItem="GZA-Mt-Lx4" secondAttribute="centerY" id="uSw-vY-JGT"/>
|
||||
<constraint firstAttribute="width" constant="40" id="vfO-MP-5dL"/>
|
||||
</constraints>
|
||||
<connections>
|
||||
<outletCollection property="gestureRecognizers" destination="NSr-rt-Wir" appends="YES" id="rU1-8c-mXt"/>
|
||||
</connections>
|
||||
</view>
|
||||
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="d2m-Mj-kxw" userLabel="Cancel Button">
|
||||
<rect key="frame" x="0.0" y="2" width="40" height="40"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="40" id="ULq-q0-KBT"/>
|
||||
<constraint firstAttribute="width" constant="40" id="qew-DV-5Og"/>
|
||||
</constraints>
|
||||
<state key="normal" image="ic_cancel">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<connections>
|
||||
<action selector="navigationCancelPressed:" destination="-1" eventType="touchUpInside" id="Rnw-Di-BNW"/>
|
||||
</connections>
|
||||
</button>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="sxx-mC-hOX" userLabel="Buttons Box">
|
||||
<rect key="frame" x="232" y="2" width="80" height="40"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="p2P-UP-rWT" userLabel="Walk Button">
|
||||
<rect key="frame" x="0.0" y="0.0" width="40" height="40"/>
|
||||
<state key="normal" image="ic_walk_off">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<state key="selected" image="ic_walk_on"/>
|
||||
<connections>
|
||||
<action selector="routePreviewChange:" destination="-1" eventType="touchUpInside" id="p1B-We-5Eo"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="q46-6u-Dnz" userLabel="Drive Button">
|
||||
<rect key="frame" x="40" y="0.0" width="40" height="40"/>
|
||||
<state key="normal" image="ic_drive_off">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<state key="selected" image="ic_drive_on"/>
|
||||
<connections>
|
||||
<action selector="routePreviewChange:" destination="-1" eventType="touchUpInside" id="PmK-Z7-ySd"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="80" id="5NG-pz-QUZ"/>
|
||||
<constraint firstItem="q46-6u-Dnz" firstAttribute="leading" secondItem="p2P-UP-rWT" secondAttribute="trailing" id="6yy-fM-M3E"/>
|
||||
<constraint firstItem="p2P-UP-rWT" firstAttribute="top" secondItem="sxx-mC-hOX" secondAttribute="top" id="LEp-xZ-T7Y"/>
|
||||
<constraint firstAttribute="trailing" secondItem="q46-6u-Dnz" secondAttribute="trailing" id="Lju-Gd-XEP"/>
|
||||
<constraint firstItem="p2P-UP-rWT" firstAttribute="leading" secondItem="sxx-mC-hOX" secondAttribute="leading" id="Sbx-A6-emP"/>
|
||||
<constraint firstAttribute="height" constant="40" id="V0B-37-g8u"/>
|
||||
<constraint firstItem="q46-6u-Dnz" firstAttribute="leading" secondItem="p2P-UP-rWT" secondAttribute="trailing" id="jZS-Ie-OAb"/>
|
||||
<constraint firstAttribute="bottom" secondItem="q46-6u-Dnz" secondAttribute="bottom" id="laZ-K8-PEC"/>
|
||||
<constraint firstItem="q46-6u-Dnz" firstAttribute="top" secondItem="sxx-mC-hOX" secondAttribute="top" id="ubn-Pk-LO5"/>
|
||||
<constraint firstAttribute="bottom" secondItem="p2P-UP-rWT" secondAttribute="bottom" id="wRs-1r-64a"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="FjK-vt-keq" userLabel="Planning Route Box">
|
||||
<rect key="frame" x="56" y="12" width="172" height="20"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Creating route..." lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="e6W-cv-xtL">
|
||||
<rect key="frame" x="0.0" y="0.0" width="172" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="20" id="JUk-KJ-2Ic"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="17"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.26000000000000001" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackHintText"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular17"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="20" id="aUI-v0-6JP"/>
|
||||
<constraint firstAttribute="trailing" secondItem="e6W-cv-xtL" secondAttribute="trailing" id="hfA-ld-dkD"/>
|
||||
<constraint firstItem="e6W-cv-xtL" firstAttribute="top" secondItem="FjK-vt-keq" secondAttribute="top" id="mIw-vv-PWE"/>
|
||||
<constraint firstItem="e6W-cv-xtL" firstAttribute="leading" secondItem="FjK-vt-keq" secondAttribute="leading" id="s0Z-Cq-vMr"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="TAN-st-OOM" userLabel="Complete Route Box">
|
||||
<rect key="frame" x="56" y="12" width="172" height="20"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="time" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yfW-D7-qCl">
|
||||
<rect key="frame" x="0.0" y="0.0" width="35" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="35" id="bjk-nU-17W"/>
|
||||
<constraint firstAttribute="height" constant="20" id="wjP-4J-wPY"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" name="HelveticaNeue-Medium" family="Helvetica Neue" pointSize="17"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.87" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackPrimaryText"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="medium17"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="dist" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Z2M-yN-YAq">
|
||||
<rect key="frame" x="66" y="0.0" width="80" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="80" id="1wO-Od-txW"/>
|
||||
<constraint firstAttribute="width" constant="30" id="HJX-Qb-nzT"/>
|
||||
<constraint firstAttribute="height" constant="20" id="YiU-YU-rRF"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="17"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.87" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackPrimaryText"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular17"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<variation key="default">
|
||||
<mask key="constraints">
|
||||
<exclude reference="HJX-Qb-nzT"/>
|
||||
</mask>
|
||||
</variation>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="Z2M-yN-YAq" firstAttribute="top" secondItem="TAN-st-OOM" secondAttribute="top" id="1jt-IM-Tmj"/>
|
||||
<constraint firstItem="Z2M-yN-YAq" firstAttribute="leading" secondItem="yfW-D7-qCl" secondAttribute="trailing" constant="31" id="RML-mi-P6Y"/>
|
||||
<constraint firstAttribute="height" constant="20" id="SzU-CF-ccV"/>
|
||||
<constraint firstItem="yfW-D7-qCl" firstAttribute="leading" secondItem="TAN-st-OOM" secondAttribute="leading" id="rN7-ae-Jhv"/>
|
||||
<constraint firstItem="yfW-D7-qCl" firstAttribute="top" secondItem="TAN-st-OOM" secondAttribute="top" id="uvr-uq-WLZ"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Z2M-yN-YAq" secondAttribute="trailing" id="wla-ar-F2T"/>
|
||||
</constraints>
|
||||
<variation key="default">
|
||||
<mask key="constraints">
|
||||
<exclude reference="wla-ar-F2T"/>
|
||||
</mask>
|
||||
</variation>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="pT2-o1-o2w" firstAttribute="leading" secondItem="q2t-0L-2K9" secondAttribute="leading" id="0VC-lQ-s1U"/>
|
||||
<constraint firstItem="TAN-st-OOM" firstAttribute="leading" secondItem="d2m-Mj-kxw" secondAttribute="trailing" constant="16" id="GWz-6U-MgH"/>
|
||||
<constraint firstItem="FjK-vt-keq" firstAttribute="leading" secondItem="d2m-Mj-kxw" secondAttribute="trailing" constant="16" id="IPB-gM-ZY6"/>
|
||||
<constraint firstAttribute="trailing" secondItem="sxx-mC-hOX" secondAttribute="trailing" constant="8" id="JOi-7b-AiY"/>
|
||||
<constraint firstItem="sxx-mC-hOX" firstAttribute="leading" secondItem="FjK-vt-keq" secondAttribute="trailing" constant="4" id="KrQ-4v-V2R"/>
|
||||
<constraint firstItem="sxx-mC-hOX" firstAttribute="leading" secondItem="TAN-st-OOM" secondAttribute="trailing" constant="4" id="L4M-1z-8S1"/>
|
||||
<constraint firstItem="pT2-o1-o2w" firstAttribute="top" secondItem="q2t-0L-2K9" secondAttribute="top" constant="2" id="LBq-SA-kdr"/>
|
||||
<constraint firstAttribute="height" constant="44" id="Si4-S0-e6Y"/>
|
||||
<constraint firstItem="FjK-vt-keq" firstAttribute="top" secondItem="q2t-0L-2K9" secondAttribute="top" constant="12" id="Ybi-xR-Cb9"/>
|
||||
<constraint firstItem="d2m-Mj-kxw" firstAttribute="leading" secondItem="q2t-0L-2K9" secondAttribute="leading" id="dNR-t0-0MG"/>
|
||||
<constraint firstItem="TAN-st-OOM" firstAttribute="top" secondItem="q2t-0L-2K9" secondAttribute="top" constant="12" id="gFK-VL-5cQ"/>
|
||||
<constraint firstItem="d2m-Mj-kxw" firstAttribute="top" secondItem="q2t-0L-2K9" secondAttribute="top" constant="2" id="gsp-3g-pwS"/>
|
||||
<constraint firstAttribute="bottom" secondItem="sxx-mC-hOX" secondAttribute="bottom" constant="2" id="jaO-c5-e6f"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="q2t-0L-2K9" firstAttribute="top" secondItem="88L-VX-bE9" secondAttribute="top" id="07X-xX-x4t"/>
|
||||
<constraint firstAttribute="bottom" secondItem="z2d-B1-i2q" secondAttribute="bottom" constant="44" id="2ei-gn-88c"/>
|
||||
<constraint firstAttribute="trailing" secondItem="z2d-B1-i2q" secondAttribute="trailing" id="IjZ-xi-pGs"/>
|
||||
<constraint firstItem="z2d-B1-i2q" firstAttribute="leading" secondItem="88L-VX-bE9" secondAttribute="leading" id="KTW-jo-jFp"/>
|
||||
<constraint firstAttribute="trailing" secondItem="q2t-0L-2K9" secondAttribute="trailing" id="WJB-ey-lTk"/>
|
||||
<constraint firstItem="q2t-0L-2K9" firstAttribute="leading" secondItem="88L-VX-bE9" secondAttribute="leading" id="mcO-vF-Zih"/>
|
||||
</constraints>
|
||||
<nil key="simulatedStatusBarMetrics"/>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="layer.shadowRadius">
|
||||
<integer key="value" value="2"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="layer.shadowUIColor">
|
||||
<color key="value" red="0.0" green="0.0" blue="0.0" alpha="0.23999999999999999" colorSpace="calibratedRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="layer.shadowOpacity">
|
||||
<integer key="value" value="1"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="size" keyPath="layer.shadowOffset">
|
||||
<size key="value" width="0.0" height="1"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<outlet property="cancelButton" destination="d2m-Mj-kxw" id="tOI-vU-NUz"/>
|
||||
<outlet property="completeBox" destination="TAN-st-OOM" id="KIc-tq-lnF"/>
|
||||
<outlet property="contentView" destination="q2t-0L-2K9" id="QBv-uC-WJC"/>
|
||||
<outlet property="distanceLabel" destination="Z2M-yN-YAq" id="055-qJ-WAJ"/>
|
||||
<outlet property="goButtonHeight" destination="1mg-dZ-WyP" id="Ql3-hB-aTD"/>
|
||||
<outlet property="goButtonVerticalOffset" destination="2ei-gn-88c" id="jT5-CH-aMT"/>
|
||||
<outlet property="pedestrian" destination="p2P-UP-rWT" id="okx-QZ-c9c"/>
|
||||
<outlet property="progress" destination="pT2-o1-o2w" id="S37-0w-6fB"/>
|
||||
<outlet property="progressIndicator" destination="GZA-Mt-Lx4" id="riC-SG-wCt"/>
|
||||
<outlet property="status" destination="e6W-cv-xtL" id="APO-1K-MH5"/>
|
||||
<outlet property="statusBox" destination="FjK-vt-keq" id="WgW-e1-R1d"/>
|
||||
<outlet property="timeLabel" destination="yfW-D7-qCl" id="f6d-96-ej3"/>
|
||||
<outlet property="vehicle" destination="q46-6u-Dnz" id="kbL-Fp-eVh"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="369" y="452"/>
|
||||
</view>
|
||||
<tapGestureRecognizer id="NSr-rt-Wir">
|
||||
<connections>
|
||||
<action selector="navigationCancelPressed:" destination="-1" id="Ire-ta-24g"/>
|
||||
</connections>
|
||||
</tapGestureRecognizer>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="ic_cancel" width="40" height="40"/>
|
||||
<image name="ic_drive_off" width="40" height="40"/>
|
||||
<image name="ic_drive_on" width="40" height="40"/>
|
||||
<image name="ic_walk_off" width="40" height="40"/>
|
||||
<image name="ic_walk_on" width="40" height="40"/>
|
||||
</resources>
|
||||
</document>
|
|
@ -0,0 +1,17 @@
|
|||
@class MWMRoutePointCell;
|
||||
|
||||
@protocol MWMRoutePointCellDelegate <NSObject>
|
||||
|
||||
@required
|
||||
- (void)didPan:(UIPanGestureRecognizer *)pan cell:(MWMRoutePointCell *)cell;
|
||||
- (void)startEditingCell:(MWMRoutePointCell *)cell;
|
||||
|
||||
@end
|
||||
|
||||
@interface MWMRoutePointCell : UICollectionViewCell
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UITextField * title;
|
||||
@property (weak, nonatomic) IBOutlet UILabel * number;
|
||||
@property (weak, nonatomic) id<MWMRoutePointCellDelegate> delegate;
|
||||
|
||||
@end
|
|
@ -0,0 +1,29 @@
|
|||
#import "MWMRoutePointCell.h"
|
||||
|
||||
@interface MWMRoutePointCell () <UITextFieldDelegate>
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIView * moveView;
|
||||
|
||||
@end
|
||||
|
||||
@implementation MWMRoutePointCell
|
||||
|
||||
- (void)awakeFromNib
|
||||
{
|
||||
[super awakeFromNib];
|
||||
UIPanGestureRecognizer * pan = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(didPan:)];
|
||||
[self.moveView addGestureRecognizer:pan];
|
||||
}
|
||||
|
||||
- (void)didPan:(UIPanGestureRecognizer *)sender
|
||||
{
|
||||
[self.delegate didPan:sender cell:self];
|
||||
}
|
||||
|
||||
- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField
|
||||
{
|
||||
[self.delegate startEditingCell:self];
|
||||
return NO;
|
||||
}
|
||||
|
||||
@end
|
|
@ -0,0 +1,120 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9059" systemVersion="15A284" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9049"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="MWMRoutePointCell" id="g71-7u-1M7" customClass="MWMRoutePointCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="272" height="36"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
|
||||
<rect key="frame" x="0.0" y="0.0" width="272" height="36"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="5Eu-pp-tuf" userLabel="ContentView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="272" height="36"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="QVZ-SR-ELD">
|
||||
<rect key="frame" x="10" y="8" width="20" height="20"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="1" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="upk-Hh-xve">
|
||||
<rect key="frame" x="6" y="2" width="8" height="16"/>
|
||||
<animations/>
|
||||
<fontDescription key="fontDescription" name="HelveticaNeue-Bold" family="Helvetica Neue" pointSize="14"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<animations/>
|
||||
<color key="backgroundColor" red="0.12549019607843137" green="0.58823529411764708" blue="0.95294117647058818" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="20" id="2W2-WT-Xw1"/>
|
||||
<constraint firstAttribute="height" constant="20" id="PtI-pU-SmZ"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
|
||||
<integer key="value" value="10"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="Current Position" placeholder="Choose destination" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="sJv-24-mPo">
|
||||
<rect key="frame" x="52" y="0.0" width="159" height="36"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="36" id="8AW-4P-EIE"/>
|
||||
</constraints>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.87" colorSpace="calibratedRGB"/>
|
||||
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="14"/>
|
||||
<textInputTraits key="textInputTraits"/>
|
||||
<connections>
|
||||
<outlet property="delegate" destination="g71-7u-1M7" id="AJS-bY-hPY"/>
|
||||
</connections>
|
||||
</textField>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="6lg-JW-vOR">
|
||||
<rect key="frame" x="212" y="0.0" width="60" height="36"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_move_list" translatesAutoresizingMaskIntoConstraints="NO" id="KVK-GG-sTd">
|
||||
<rect key="frame" x="24" y="4" width="28" height="28"/>
|
||||
<animations/>
|
||||
<gestureRecognizers/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="28" id="apW-pp-9of"/>
|
||||
<constraint firstAttribute="width" constant="28" id="kaO-Rj-sxl"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="KVK-GG-sTd" firstAttribute="top" secondItem="6lg-JW-vOR" secondAttribute="top" constant="4" id="3u9-W3-7uD"/>
|
||||
<constraint firstAttribute="trailing" secondItem="KVK-GG-sTd" secondAttribute="trailing" constant="8" id="DQO-wy-REo"/>
|
||||
<constraint firstAttribute="width" constant="60" id="PL2-79-lOf"/>
|
||||
<constraint firstAttribute="height" constant="36" id="XUC-hZ-tOc"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="6lg-JW-vOR" firstAttribute="top" secondItem="5Eu-pp-tuf" secondAttribute="top" id="ab5-hn-QdG"/>
|
||||
<constraint firstItem="sJv-24-mPo" firstAttribute="leading" secondItem="QVZ-SR-ELD" secondAttribute="trailing" priority="750" constant="22" id="baA-ey-OtA"/>
|
||||
<constraint firstItem="QVZ-SR-ELD" firstAttribute="leading" secondItem="5Eu-pp-tuf" secondAttribute="leading" constant="10" id="djG-l3-9Hy"/>
|
||||
<constraint firstItem="QVZ-SR-ELD" firstAttribute="top" secondItem="5Eu-pp-tuf" secondAttribute="top" constant="8" id="eQY-ap-RsW"/>
|
||||
<constraint firstItem="6lg-JW-vOR" firstAttribute="leading" secondItem="sJv-24-mPo" secondAttribute="trailing" constant="1" id="kE9-We-mKe"/>
|
||||
<constraint firstAttribute="trailing" secondItem="6lg-JW-vOR" secondAttribute="trailing" id="kJQ-o5-Ore"/>
|
||||
<constraint firstItem="sJv-24-mPo" firstAttribute="top" secondItem="5Eu-pp-tuf" secondAttribute="top" id="vb3-cK-3iz"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
|
||||
<integer key="value" value="4"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
</subviews>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="5Eu-pp-tuf" firstAttribute="height" secondItem="g71-7u-1M7" secondAttribute="height" id="2zr-Zb-OIe"/>
|
||||
<constraint firstItem="5Eu-pp-tuf" firstAttribute="top" secondItem="g71-7u-1M7" secondAttribute="top" id="Hen-QB-dZ2"/>
|
||||
<constraint firstItem="5Eu-pp-tuf" firstAttribute="width" secondItem="g71-7u-1M7" secondAttribute="width" id="QVW-Eo-kKX"/>
|
||||
<constraint firstItem="5Eu-pp-tuf" firstAttribute="centerX" secondItem="g71-7u-1M7" secondAttribute="centerX" id="bly-Tv-oYt"/>
|
||||
</constraints>
|
||||
<connections>
|
||||
<outlet property="moveView" destination="6lg-JW-vOR" id="UBv-0E-7Gr"/>
|
||||
<outlet property="number" destination="upk-Hh-xve" id="QzO-JM-b25"/>
|
||||
<outlet property="title" destination="sJv-24-mPo" id="CMf-Q0-CyR"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="273" y="327"/>
|
||||
</collectionViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="ic_move_list" width="28" height="28"/>
|
||||
</resources>
|
||||
</document>
|
|
@ -0,0 +1,6 @@
|
|||
@interface MWMRoutePointLayout : UICollectionViewFlowLayout
|
||||
|
||||
@property (nonatomic) BOOL isNeedToInitialLayout;
|
||||
@property (weak, nonatomic) IBOutlet UIView * parentView;
|
||||
|
||||
@end
|
|
@ -0,0 +1,66 @@
|
|||
#import "MWMRoutePointLayout.h"
|
||||
|
||||
static CGFloat const kHeight = 36.;
|
||||
|
||||
@implementation MWMRoutePointLayout
|
||||
|
||||
- (instancetype)initWithCoder:(NSCoder *)aDecoder
|
||||
{
|
||||
self = [super initWithCoder:aDecoder];
|
||||
if (self)
|
||||
self.isNeedToInitialLayout = YES;
|
||||
return self;
|
||||
}
|
||||
|
||||
- (CGSize)collectionViewContentSize
|
||||
{
|
||||
return self.collectionView.bounds.size;
|
||||
}
|
||||
|
||||
- (CGFloat)minimumLineSpacing
|
||||
{
|
||||
return 8.;
|
||||
}
|
||||
|
||||
- (CGFloat)minimumInteritemSpacing
|
||||
{
|
||||
return 8.;
|
||||
}
|
||||
|
||||
- (CGSize)itemSize
|
||||
{
|
||||
if (IPAD)
|
||||
return {304., kHeight};
|
||||
return self.actualSize;
|
||||
}
|
||||
|
||||
- (UICollectionViewLayoutAttributes *)initialLayoutAttributesForAppearingItemAtIndexPath:(NSIndexPath *)itemIndexPath
|
||||
{
|
||||
if (!self.isNeedToInitialLayout)
|
||||
return nil;
|
||||
UICollectionViewLayoutAttributes * attr = [UICollectionViewLayoutAttributes layoutAttributesForCellWithIndexPath:itemIndexPath];
|
||||
attr.alpha = 0.;
|
||||
return attr;
|
||||
}
|
||||
|
||||
- (UICollectionViewLayoutAttributes *)layoutAttributesForItemAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
UICollectionViewLayoutAttributes * attr = [UICollectionViewLayoutAttributes layoutAttributesForCellWithIndexPath:indexPath];
|
||||
attr.center = {self.collectionView.midX, self.collectionView.maxY};
|
||||
return attr;
|
||||
}
|
||||
|
||||
- (BOOL)shouldInvalidateLayoutForBoundsChange:(CGRect)newBounds
|
||||
{
|
||||
self.itemSize = self.actualSize;
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (CGSize)actualSize
|
||||
{
|
||||
BOOL const isPortrait = self.parentView.superview.height > self.parentView.superview.width;
|
||||
CGFloat const width = isPortrait ? self.collectionView.width : self.collectionView.width / 2. - self.minimumInteritemSpacing / 2.;
|
||||
return {width, kHeight};
|
||||
}
|
||||
|
||||
@end
|
|
@ -1,22 +1,32 @@
|
|||
#import "MWMNavigationView.h"
|
||||
|
||||
@protocol MWMRoutePreviewDataSource <NSObject>
|
||||
|
||||
@required
|
||||
- (NSString *)source;
|
||||
- (NSString *)destination;
|
||||
|
||||
@end
|
||||
|
||||
@class MWMNavigationDashboardEntity;
|
||||
@class MWMRouteTypeButton;
|
||||
@class MWMNavigationDashboardManager;
|
||||
@class MWMCircularProgress;
|
||||
|
||||
@interface MWMRoutePreview : MWMNavigationView
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UILabel * status;
|
||||
@property (weak, nonatomic) IBOutlet UIButton * pedestrian;
|
||||
@property (weak, nonatomic) IBOutlet UIButton * vehicle;
|
||||
@property (weak, nonatomic) IBOutlet UILabel * timeLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel * distanceLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel * arrivalsLabel;
|
||||
@property (weak, nonatomic) IBOutlet UIButton * cancelButton;
|
||||
@property (weak, nonatomic, readonly) IBOutlet UIButton * extendButton;
|
||||
@property (nonatomic, readonly) MWMCircularProgress * pedestrianProgressView;
|
||||
@property (nonatomic, readonly) MWMCircularProgress * vehicleProgressView;
|
||||
@property (weak, nonatomic) id<MWMRoutePreviewDataSource> dataSource;
|
||||
@property (weak, nonatomic) MWMNavigationDashboardManager * dashboardManager;
|
||||
|
||||
- (void)configureWithEntity:(MWMNavigationDashboardEntity *)entity;
|
||||
- (void)statePlaning;
|
||||
- (void)statePrepare;
|
||||
- (void)statePlanning;
|
||||
- (void)stateError;
|
||||
|
||||
- (void)setRouteBuildingProgress:(CGFloat)progress;
|
||||
- (void)showGoButtonAnimated:(BOOL)show;
|
||||
- (void)stateReady;
|
||||
- (void)reloadData;
|
||||
- (void)selectProgress:(MWMCircularProgress *)progress;
|
||||
|
||||
@end
|
||||
|
|
|
@ -1,21 +1,44 @@
|
|||
#import "Common.h"
|
||||
#import "MWMCircularProgress.h"
|
||||
#import "MWMNavigationDashboardEntity.h"
|
||||
#import "MWMNavigationDashboardManager.h"
|
||||
#import "MWMRoutePointCell.h"
|
||||
#import "MWMRoutePointLayout.h"
|
||||
#import "MWMRoutePreview.h"
|
||||
#import "TimeUtils.h"
|
||||
#import "UIColor+MapsMeColor.h"
|
||||
#import "UIFont+MapsMeFonts.h"
|
||||
|
||||
@interface MWMRoutePreview () <MWMCircularProgressDelegate>
|
||||
static NSDictionary * const kEtaAttributes = @{NSForegroundColorAttributeName : UIColor.blackPrimaryText,
|
||||
NSFontAttributeName : UIFont.medium17};
|
||||
static CGFloat const kBottomPanelHeight = 48.;
|
||||
static CGFloat const kAdditionalHeight = 20.;
|
||||
|
||||
@property (nonatomic) CGFloat goButtonHiddenOffset;
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint * goButtonVerticalOffset;
|
||||
@interface MWMRoutePreview () <MWMRoutePointCellDelegate>
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIView * pedestrian;
|
||||
@property (weak, nonatomic) IBOutlet UIView * vehicle;
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint * planningRouteViewHeight;
|
||||
@property (weak, nonatomic, readwrite) IBOutlet UIButton * extendButton;
|
||||
@property (weak, nonatomic) IBOutlet UIButton * goButton;
|
||||
@property (weak, nonatomic) IBOutlet UICollectionView * collectionView;
|
||||
@property (weak, nonatomic) IBOutlet MWMRoutePointLayout * layout;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView * arrowImageView;
|
||||
@property (weak, nonatomic) IBOutlet UIView * statusBox;
|
||||
@property (weak, nonatomic) IBOutlet UIView * completeBox;
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint * goButtonHeight;
|
||||
@property (weak, nonatomic) IBOutlet UIView * progress;
|
||||
@property (weak, nonatomic) IBOutlet UIView * progressIndicator;
|
||||
@property (nonatomic) BOOL showGoButton;
|
||||
@property (nonatomic) MWMCircularProgress * progressManager;
|
||||
@property (weak, nonatomic) IBOutlet UIView * planningBox;
|
||||
@property (weak, nonatomic) IBOutlet UIView * resultsBox;
|
||||
@property (weak, nonatomic) IBOutlet UIView * errorBox;
|
||||
@property (weak, nonatomic) IBOutlet UILabel * resultLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel * arriveLabel;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView * completeImageView;
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint * statusBoxHeight;
|
||||
@property (nonatomic) UIImageView * movingCellImage;
|
||||
|
||||
@property (nonatomic) BOOL isNeedToMove;
|
||||
@property (nonatomic) NSIndexPath * indexPathOfMovingCell;
|
||||
|
||||
@property (nonatomic, readwrite) MWMCircularProgress * pedestrianProgressView;
|
||||
@property (nonatomic, readwrite) MWMCircularProgress * vehicleProgressView;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -24,100 +47,367 @@
|
|||
- (void)awakeFromNib
|
||||
{
|
||||
[super awakeFromNib];
|
||||
self.goButtonHiddenOffset = self.goButtonVerticalOffset.constant;
|
||||
self.autoresizingMask = UIViewAutoresizingFlexibleWidth;
|
||||
self.layer.shouldRasterize = YES;
|
||||
self.layer.rasterizationScale = UIScreen.mainScreen.scale;
|
||||
[self.collectionView registerNib:[UINib nibWithNibName:[MWMRoutePointCell className] bundle:nil]
|
||||
forCellWithReuseIdentifier:[MWMRoutePointCell className]];
|
||||
|
||||
self.pedestrianProgressView = [[MWMCircularProgress alloc] initWithParentView:self.pedestrian];
|
||||
[self.pedestrianProgressView setImage:[UIImage imageNamed:@"ic_walk_off"] forState:MWMCircularProgressStateNormal];
|
||||
[self.pedestrianProgressView setImage:[UIImage imageNamed:@"ic_walk_on"] forState:MWMCircularProgressStateFailed];
|
||||
[self.pedestrianProgressView setImage:[UIImage imageNamed:@"ic_walk_press"] forState:MWMCircularProgressStateHighlighted];
|
||||
[self.pedestrianProgressView setImage:[UIImage imageNamed:@"ic_walk_on"] forState:MWMCircularProgressStateSelected];
|
||||
[self.pedestrianProgressView setImage:[UIImage imageNamed:@"ic_walk_on"] forState:MWMCircularProgressStateProgress];
|
||||
[self.pedestrianProgressView setImage:[UIImage imageNamed:@"ic_walk_on"] forState:MWMCircularProgressStateCompleted];
|
||||
self.vehicleProgressView = [[MWMCircularProgress alloc] initWithParentView:self.vehicle];
|
||||
[self.vehicleProgressView setImage:[UIImage imageNamed:@"ic_drive_off"] forState:MWMCircularProgressStateNormal];
|
||||
[self.vehicleProgressView setImage:[UIImage imageNamed:@"ic_drive_on"] forState:MWMCircularProgressStateFailed];
|
||||
[self.vehicleProgressView setImage:[UIImage imageNamed:@"ic_drive_press"] forState:MWMCircularProgressStateHighlighted];
|
||||
[self.vehicleProgressView setImage:[UIImage imageNamed:@"ic_drive_on"] forState:MWMCircularProgressStateSelected];
|
||||
[self.vehicleProgressView setImage:[UIImage imageNamed:@"ic_drive_on"] forState:MWMCircularProgressStateProgress];
|
||||
[self.vehicleProgressView setImage:[UIImage imageNamed:@"ic_drive_on"] forState:MWMCircularProgressStateCompleted];
|
||||
}
|
||||
|
||||
- (void)didMoveToSuperview
|
||||
{
|
||||
[self setupActualHeight];
|
||||
}
|
||||
|
||||
- (void)addToView:(UIView *)superview
|
||||
{
|
||||
[super addToView:superview];
|
||||
[superview bringSubviewToFront:superview];
|
||||
}
|
||||
|
||||
- (void)configureWithEntity:(MWMNavigationDashboardEntity *)entity
|
||||
{
|
||||
self.timeLabel.text = [NSDateFormatter estimatedArrivalTimeWithSeconds:@(entity.timeToTarget)];
|
||||
self.distanceLabel.text = [NSString stringWithFormat:@"%@ %@", entity.targetDistance, entity.targetUnits];
|
||||
NSString * eta = [NSDateFormatter estimatedArrivalTimeWithSeconds:@(entity.timeToTarget)];
|
||||
NSString * resultString = [NSString stringWithFormat:@"%@ • %@ %@",
|
||||
eta,
|
||||
entity.targetDistance,
|
||||
entity.targetUnits];
|
||||
NSMutableAttributedString * result = [[NSMutableAttributedString alloc] initWithString:resultString];
|
||||
[result addAttributes:kEtaAttributes range:NSMakeRange(0, eta.length)];
|
||||
self.resultLabel.attributedText = result;
|
||||
if (!IPAD)
|
||||
return;
|
||||
|
||||
NSString * arriveStr = [NSDateFormatter localizedStringFromDate:[[NSDate date]
|
||||
dateByAddingTimeInterval:entity.timeToTarget]
|
||||
dateStyle:NSDateFormatterNoStyle
|
||||
timeStyle:NSDateFormatterShortStyle];
|
||||
self.arrivalsLabel.text = [NSString stringWithFormat:@"%@ %@", L(@"routing_arrive"), arriveStr];
|
||||
dateByAddingTimeInterval:entity.timeToTarget]
|
||||
dateStyle:NSDateFormatterNoStyle
|
||||
timeStyle:NSDateFormatterShortStyle];
|
||||
self.arriveLabel.text = [NSString stringWithFormat:@"%@ %@", L(@"routing_arrive"), arriveStr];
|
||||
}
|
||||
|
||||
- (void)remove
|
||||
- (void)statePrepare
|
||||
{
|
||||
[super remove];
|
||||
self.pedestrian.enabled = YES;
|
||||
self.vehicle.enabled = YES;
|
||||
[self.pedestrianProgressView stopSpinner];
|
||||
[self.vehicleProgressView stopSpinner];
|
||||
self.arrowImageView.transform = CGAffineTransformMakeRotation(M_PI);
|
||||
self.goButton.hidden = NO;
|
||||
self.goButton.enabled = NO;
|
||||
self.extendButton.selected = YES;
|
||||
[self setupActualHeight];
|
||||
[self.collectionView reloadData];
|
||||
[self.layout invalidateLayout];
|
||||
self.statusBox.hidden = YES;
|
||||
self.resultsBox.hidden = YES;
|
||||
self.planningBox.hidden = YES;
|
||||
self.errorBox.hidden = YES;
|
||||
}
|
||||
|
||||
- (void)statePlaning
|
||||
- (void)statePlanning
|
||||
{
|
||||
self.showGoButton = NO;
|
||||
self.goButton.hidden = NO;
|
||||
self.goButton.enabled = NO;
|
||||
self.goButton.enabled = NO;
|
||||
self.statusBox.hidden = NO;
|
||||
self.completeBox.hidden = YES;
|
||||
[self.progressManager reset];
|
||||
self.progress.hidden = NO;
|
||||
self.cancelButton.hidden = YES;
|
||||
self.status.text = L(@"routing_planning");
|
||||
self.status.textColor = UIColor.blackHintText;
|
||||
self.resultsBox.hidden = YES;
|
||||
self.errorBox.hidden = YES;
|
||||
self.planningBox.hidden = NO;
|
||||
[self.collectionView reloadData];
|
||||
if (IPAD)
|
||||
[self iPadNotReady];
|
||||
}
|
||||
|
||||
- (void)stateError
|
||||
{
|
||||
self.progress.hidden = YES;
|
||||
self.cancelButton.hidden = NO;
|
||||
self.status.text = L(@"routing_planning_error");
|
||||
self.status.textColor = UIColor.red;
|
||||
self.goButton.hidden = NO;
|
||||
self.goButton.enabled = NO;
|
||||
self.statusBox.hidden = NO;
|
||||
self.planningBox.hidden = YES;
|
||||
self.resultsBox.hidden = YES;
|
||||
self.errorBox.hidden = NO;
|
||||
if (IPAD)
|
||||
[self iPadNotReady];
|
||||
}
|
||||
|
||||
- (void)showGoButtonAnimated:(BOOL)show
|
||||
- (void)stateReady
|
||||
{
|
||||
self.goButton.hidden = NO;
|
||||
self.goButton.enabled = YES;
|
||||
self.statusBox.hidden = NO;
|
||||
self.planningBox.hidden = YES;
|
||||
self.errorBox.hidden = YES;
|
||||
self.resultsBox.hidden = NO;
|
||||
if (IPAD)
|
||||
[self iPadReady];
|
||||
}
|
||||
|
||||
- (void)iPadReady
|
||||
{
|
||||
[self layoutIfNeeded];
|
||||
self.showGoButton = show;
|
||||
[UIView animateWithDuration:kDefaultAnimationDuration animations:^{ [self layoutIfNeeded]; }];
|
||||
self.statusBoxHeight.constant = 76.;
|
||||
[UIView animateWithDuration:kDefaultAnimationDuration animations:^
|
||||
{
|
||||
[self layoutIfNeeded];
|
||||
}
|
||||
completion:^(BOOL finished)
|
||||
{
|
||||
[UIView animateWithDuration:kDefaultAnimationDuration animations:^
|
||||
{
|
||||
self.arriveLabel.alpha = 1.;
|
||||
}
|
||||
completion:^(BOOL finished)
|
||||
{
|
||||
self.completeImageView.hidden = NO;
|
||||
}];
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)iPadNotReady
|
||||
{
|
||||
self.completeImageView.hidden = YES;
|
||||
self.arriveLabel.alpha = 0.;
|
||||
[self layoutIfNeeded];
|
||||
self.statusBoxHeight.constant = 56.;
|
||||
[UIView animateWithDuration:kDefaultAnimationDuration animations:^
|
||||
{
|
||||
[self layoutIfNeeded];
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)reloadData
|
||||
{
|
||||
[self.collectionView reloadData];
|
||||
}
|
||||
|
||||
- (void)deselectPedestrian
|
||||
{
|
||||
self.pedestrianProgressView.state = MWMCircularProgressStateNormal;
|
||||
[self.pedestrianProgressView stopSpinner];
|
||||
}
|
||||
|
||||
- (void)selectProgress:(MWMCircularProgress *)progress;
|
||||
{
|
||||
if ([progress isEqual:self.pedestrianProgressView])
|
||||
{
|
||||
self.vehicleProgressView.state = MWMCircularProgressStateNormal;
|
||||
self.pedestrianProgressView.state = MWMCircularProgressStateSelected;
|
||||
}
|
||||
else
|
||||
{
|
||||
self.pedestrianProgressView.state = MWMCircularProgressStateNormal;
|
||||
self.vehicleProgressView.state = MWMCircularProgressStateSelected;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)deselectVehicle
|
||||
{
|
||||
self.vehicleProgressView.state = MWMCircularProgressStateNormal;
|
||||
[self.vehicleProgressView stopSpinner];
|
||||
}
|
||||
|
||||
- (void)layoutSubviews
|
||||
{
|
||||
[self setupActualHeight];
|
||||
[super layoutSubviews];
|
||||
if (IPAD)
|
||||
[self.delegate routePreviewDidChangeFrame:self.frame];
|
||||
}
|
||||
|
||||
#pragma mark - Properties
|
||||
|
||||
- (CGRect)defaultFrame
|
||||
{
|
||||
CGRect frame = super.defaultFrame;
|
||||
if (IPAD)
|
||||
frame.size.width -= frame.origin.x;
|
||||
return frame;
|
||||
}
|
||||
|
||||
- (void)setShowGoButton:(BOOL)showGoButton
|
||||
{
|
||||
_showGoButton = showGoButton;
|
||||
self.goButtonVerticalOffset.constant = showGoButton ? 0.0 : self.goButtonHiddenOffset;
|
||||
self.statusBox.hidden = YES;
|
||||
self.completeBox.hidden = NO;
|
||||
self.progress.hidden = YES;
|
||||
self.cancelButton.hidden = NO;
|
||||
if (!IPAD)
|
||||
return super.defaultFrame;
|
||||
CGFloat const width = 320.;
|
||||
CGFloat const origin = self.isVisible ? 0. : -width;
|
||||
return {{origin, self.topBound}, {width, self.superview.height - kAdditionalHeight}};
|
||||
}
|
||||
|
||||
- (CGFloat)visibleHeight
|
||||
{
|
||||
CGFloat height = super.visibleHeight;
|
||||
if (self.showGoButton)
|
||||
height += self.goButtonHeight.constant;
|
||||
return height;
|
||||
return self.planningRouteViewHeight.constant + kBottomPanelHeight + kAdditionalHeight;
|
||||
}
|
||||
|
||||
- (void)setRouteBuildingProgress:(CGFloat)progress
|
||||
- (IBAction)extendTap
|
||||
{
|
||||
dispatch_async(dispatch_get_main_queue(), ^
|
||||
BOOL const isExtended = !self.extendButton.selected;
|
||||
self.extendButton.selected = isExtended;
|
||||
[self layoutIfNeeded];
|
||||
[self setupActualHeight];
|
||||
[UIView animateWithDuration:kDefaultAnimationDuration animations:^
|
||||
{
|
||||
self.progressManager.progress = progress / 100.;
|
||||
});
|
||||
self.arrowImageView.transform = isExtended ? CGAffineTransformMakeRotation(M_PI) : CGAffineTransformIdentity;
|
||||
[self layoutIfNeeded];
|
||||
}];
|
||||
}
|
||||
|
||||
- (MWMCircularProgress *)progressManager
|
||||
- (void)setupActualHeight
|
||||
{
|
||||
if (!_progressManager)
|
||||
_progressManager = [[MWMCircularProgress alloc] initWithParentView:self.progressIndicator delegate:self];
|
||||
return _progressManager;
|
||||
if (!self.superview)
|
||||
return;
|
||||
if (IPAD)
|
||||
{
|
||||
self.height = self.superview.height - kAdditionalHeight;
|
||||
return;
|
||||
}
|
||||
BOOL const isPortrait = self.superview.height > self.superview.width;
|
||||
CGFloat const height = isPortrait ? 140. : 96.;
|
||||
self.planningRouteViewHeight.constant = self.extendButton.selected ? height : 44.;
|
||||
[self.dashboardManager.delegate routePreviewDidChangeFrame:{self.origin, {self.width, self.planningRouteViewHeight.constant + kBottomPanelHeight + kAdditionalHeight}}];
|
||||
}
|
||||
|
||||
- (void)progressButtonPressed:(nonnull MWMCircularProgress *)progress
|
||||
- (void)setDataSource:(id<MWMRoutePreviewDataSource>)dataSource
|
||||
{
|
||||
[self.cancelButton sendActionsForControlEvents:UIControlEventTouchUpInside];
|
||||
_dataSource = dataSource;
|
||||
[self reloadData];
|
||||
}
|
||||
|
||||
- (void)snapshotCell:(MWMRoutePointCell *)cell
|
||||
{
|
||||
UIGraphicsBeginImageContextWithOptions(cell.bounds.size, NO, 0.);
|
||||
[cell drawViewHierarchyInRect:cell.bounds afterScreenUpdates:YES];
|
||||
UIImage * image = UIGraphicsGetImageFromCurrentImageContext();
|
||||
UIGraphicsEndImageContext();
|
||||
self.movingCellImage = [[UIImageView alloc] initWithImage:image];
|
||||
self.movingCellImage.alpha = 0.8;
|
||||
[self.collectionView addSubview:self.movingCellImage];
|
||||
CALayer * l = self.movingCellImage.layer;
|
||||
l.masksToBounds = NO;
|
||||
l.shadowColor = UIColor.blackColor.CGColor;
|
||||
l.shadowRadius = 4.;
|
||||
l.shadowOpacity = 0.4;
|
||||
l.shadowOffset = {0., 0.};
|
||||
l.shouldRasterize = YES;
|
||||
l.rasterizationScale = [[UIScreen mainScreen] scale];
|
||||
}
|
||||
|
||||
#pragma mark - MWMRoutePointCellDelegate
|
||||
|
||||
- (void)startEditingCell:(MWMRoutePointCell *)cell
|
||||
{
|
||||
NSUInteger const index = [self.collectionView indexPathForCell:cell].row;
|
||||
[self.dashboardManager.delegate didStartEditingRoutePoint:index == 0];
|
||||
}
|
||||
|
||||
- (void)swapPoints
|
||||
{
|
||||
[self.dashboardManager.delegate swapPointsAndRebuildRouteIfPossible];
|
||||
}
|
||||
|
||||
#pragma mark - PanGestureRecognizer
|
||||
|
||||
- (void)didPan:(UIPanGestureRecognizer *)pan cell:(MWMRoutePointCell *)cell
|
||||
{
|
||||
CGPoint const locationPoint = [pan locationInView:self.collectionView];
|
||||
if (pan.state == UIGestureRecognizerStateBegan)
|
||||
{
|
||||
self.layout.isNeedToInitialLayout = NO;
|
||||
self.isNeedToMove = NO;
|
||||
self.indexPathOfMovingCell = [self.collectionView indexPathForCell:cell];
|
||||
[self snapshotCell:cell];
|
||||
[UIView animateWithDuration:kDefaultAnimationDuration animations:^
|
||||
{
|
||||
cell.contentView.alpha = 0.;
|
||||
CGFloat const scaleY = 1.05;
|
||||
self.movingCellImage.transform = CGAffineTransformMakeScale(1., scaleY);
|
||||
}];
|
||||
}
|
||||
|
||||
if (pan.state == UIGestureRecognizerStateChanged)
|
||||
{
|
||||
self.movingCellImage.center = {locationPoint.x - cell.width / 2 + 30, locationPoint.y};
|
||||
NSIndexPath * finalIndexPath = [self.collectionView indexPathForItemAtPoint:locationPoint];
|
||||
if (finalIndexPath && ![finalIndexPath isEqual:self.indexPathOfMovingCell])
|
||||
{
|
||||
if (self.isNeedToMove)
|
||||
return;
|
||||
self.isNeedToMove = YES;
|
||||
[self.collectionView performBatchUpdates:^
|
||||
{
|
||||
[self.collectionView moveItemAtIndexPath:finalIndexPath toIndexPath:self.indexPathOfMovingCell];
|
||||
self.indexPathOfMovingCell = finalIndexPath;
|
||||
} completion:nil];
|
||||
}
|
||||
else
|
||||
{
|
||||
self.isNeedToMove = NO;
|
||||
}
|
||||
}
|
||||
|
||||
if (pan.state == UIGestureRecognizerStateEnded)
|
||||
{
|
||||
self.layout.isNeedToInitialLayout = YES;
|
||||
NSIndexPath * finalIndexPath = [self.collectionView indexPathForItemAtPoint:locationPoint];
|
||||
self.isNeedToMove = finalIndexPath && ![finalIndexPath isEqual:self.indexPathOfMovingCell];
|
||||
if (self.isNeedToMove)
|
||||
{
|
||||
cell.contentView.alpha = 1.;
|
||||
[self.collectionView performBatchUpdates:^
|
||||
{
|
||||
[self.collectionView moveItemAtIndexPath:self.indexPathOfMovingCell toIndexPath:finalIndexPath];
|
||||
}
|
||||
completion:^(BOOL finished)
|
||||
{
|
||||
[self.movingCellImage removeFromSuperview];
|
||||
self.movingCellImage.transform = CGAffineTransformIdentity;
|
||||
}];
|
||||
}
|
||||
else
|
||||
{
|
||||
cell.contentView.alpha = 1.;
|
||||
[self.movingCellImage removeFromSuperview];
|
||||
[self swapPoints];
|
||||
[self reloadData];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#pragma mark - UICollectionView
|
||||
|
||||
@interface MWMRoutePreview (UICollectionView) <UICollectionViewDataSource, UICollectionViewDelegate>
|
||||
|
||||
@end
|
||||
|
||||
@implementation MWMRoutePreview (UICollectionView)
|
||||
|
||||
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
MWMRoutePointCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:[MWMRoutePointCell className] forIndexPath:indexPath];
|
||||
cell.number.text = @(indexPath.row + 1).stringValue;
|
||||
if (indexPath.row == 0)
|
||||
{
|
||||
cell.title.text = self.dataSource.source;
|
||||
cell.title.placeholder = L(@"choose_from");
|
||||
}
|
||||
else
|
||||
{
|
||||
cell.title.text = self.dataSource.destination;
|
||||
cell.title.placeholder = L(@"choose_to");
|
||||
}
|
||||
cell.delegate = self;
|
||||
return cell;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -0,0 +1,275 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9059" systemVersion="15A284" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9049"/>
|
||||
</dependencies>
|
||||
<customFonts key="customFonts">
|
||||
<mutableArray key="HelveticaNeue.ttc">
|
||||
<string>HelveticaNeue-Medium</string>
|
||||
</mutableArray>
|
||||
</customFonts>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="MWMNavigationDashboardManager">
|
||||
<connections>
|
||||
<outlet property="iPhoneRoutePreview" destination="aNH-vh-DPz" id="LJx-vU-OCj"/>
|
||||
</connections>
|
||||
</placeholder>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="aNH-vh-DPz" customClass="MWMRoutePreview">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="188"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="WqK-Yb-PmP" customClass="SolidTouchView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="140"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="wpf-tw-Coz" userLabel="Back">
|
||||
<rect key="frame" x="0.0" y="0.0" width="44" height="44"/>
|
||||
<animations/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="44" id="ELC-D6-uQM"/>
|
||||
<constraint firstAttribute="width" constant="44" id="e40-iL-uvR"/>
|
||||
</constraints>
|
||||
<state key="normal" image="ic_nav_bar_back"/>
|
||||
<connections>
|
||||
<action selector="navigationCancelPressed:" destination="-1" eventType="touchUpInside" id="7AZ-ze-wsf"/>
|
||||
</connections>
|
||||
</button>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="DMt-LJ-mzn" userLabel="Title Box">
|
||||
<rect key="frame" x="92" y="12" width="136" height="22"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Planning Route" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Pge-2d-3UB">
|
||||
<rect key="frame" x="0.0" y="0.0" width="120" height="22"/>
|
||||
<animations/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="10" id="Aqu-Er-6Tx"/>
|
||||
<constraint firstAttribute="height" constant="22" id="ywO-T8-W4N"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" name="HelveticaNeue-Medium" family="Helvetica Neue" pointSize="17"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_arrow_up_and_down" translatesAutoresizingMaskIntoConstraints="NO" id="y8P-JL-riK">
|
||||
<rect key="frame" x="128" y="9" width="8" height="8"/>
|
||||
<animations/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="8" id="LtD-Tz-US7"/>
|
||||
<constraint firstAttribute="height" constant="8" id="uez-1b-JG5"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="y8P-JL-riK" firstAttribute="leading" secondItem="Pge-2d-3UB" secondAttribute="trailing" constant="8" id="2ns-ZL-f1m"/>
|
||||
<constraint firstItem="Pge-2d-3UB" firstAttribute="top" secondItem="DMt-LJ-mzn" secondAttribute="top" id="Kkx-M5-3w7"/>
|
||||
<constraint firstItem="y8P-JL-riK" firstAttribute="top" secondItem="DMt-LJ-mzn" secondAttribute="top" constant="9" id="LJ4-hh-HBz"/>
|
||||
<constraint firstAttribute="height" constant="22" id="NBM-Ui-Cp5"/>
|
||||
<constraint firstItem="Pge-2d-3UB" firstAttribute="leading" secondItem="DMt-LJ-mzn" secondAttribute="leading" id="RxG-1s-Hyp"/>
|
||||
<constraint firstAttribute="trailing" secondItem="y8P-JL-riK" secondAttribute="trailing" id="q4E-gi-eja"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="0YR-3a-ucN">
|
||||
<rect key="frame" x="92" y="12" width="136" height="28"/>
|
||||
<animations/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="28" id="2lP-gs-1Bd"/>
|
||||
</constraints>
|
||||
<connections>
|
||||
<action selector="extendTap" destination="aNH-vh-DPz" eventType="touchUpInside" id="oYh-e3-3Ln"/>
|
||||
</connections>
|
||||
</button>
|
||||
<collectionView multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="DrK-vI-WkO">
|
||||
<rect key="frame" x="8" y="48" width="304" height="80"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="80" id="3R7-i6-rG1"/>
|
||||
</constraints>
|
||||
<collectionViewLayout key="collectionViewLayout" id="R9u-Qo-R0Y" customClass="MWMRoutePointLayout">
|
||||
<connections>
|
||||
<outlet property="parentView" destination="aNH-vh-DPz" id="E8J-7W-up9"/>
|
||||
</connections>
|
||||
</collectionViewLayout>
|
||||
<connections>
|
||||
<outlet property="dataSource" destination="aNH-vh-DPz" id="hJP-ak-DOp"/>
|
||||
<outlet property="delegate" destination="aNH-vh-DPz" id="IvN-9e-GGx"/>
|
||||
</connections>
|
||||
</collectionView>
|
||||
</subviews>
|
||||
<animations/>
|
||||
<color key="backgroundColor" red="0.12156862745098039" green="0.59999999999999998" blue="0.32156862745098036" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="140" id="2SX-TZ-tS3"/>
|
||||
<constraint firstItem="DrK-vI-WkO" firstAttribute="top" secondItem="DMt-LJ-mzn" secondAttribute="bottom" constant="14" id="Ln4-6f-0un"/>
|
||||
<constraint firstItem="0YR-3a-ucN" firstAttribute="centerX" secondItem="WqK-Yb-PmP" secondAttribute="centerX" id="MiR-4r-70K"/>
|
||||
<constraint firstItem="wpf-tw-Coz" firstAttribute="leading" secondItem="WqK-Yb-PmP" secondAttribute="leading" id="bK5-4Q-Rv9"/>
|
||||
<constraint firstItem="wpf-tw-Coz" firstAttribute="top" secondItem="WqK-Yb-PmP" secondAttribute="top" id="cPc-fO-vAa"/>
|
||||
<constraint firstItem="0YR-3a-ucN" firstAttribute="width" secondItem="DMt-LJ-mzn" secondAttribute="width" id="evf-UV-KzK"/>
|
||||
<constraint firstAttribute="trailing" secondItem="DrK-vI-WkO" secondAttribute="trailing" constant="8" id="jom-uc-MN0"/>
|
||||
<constraint firstItem="DrK-vI-WkO" firstAttribute="leading" secondItem="WqK-Yb-PmP" secondAttribute="leading" constant="8" id="kYp-Bb-6dW"/>
|
||||
<constraint firstItem="DMt-LJ-mzn" firstAttribute="top" secondItem="WqK-Yb-PmP" secondAttribute="top" constant="12" id="qWW-1y-zZG"/>
|
||||
<constraint firstItem="0YR-3a-ucN" firstAttribute="top" secondItem="WqK-Yb-PmP" secondAttribute="top" constant="12" id="zKm-WW-91Y"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Sr7-UO-G0z" customClass="SolidTouchView">
|
||||
<rect key="frame" x="0.0" y="140" width="320" height="48"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="OOA-K7-ybj" userLabel="Planning box">
|
||||
<rect key="frame" x="104" y="14" width="204" height="20"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Planning..." textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="14" translatesAutoresizingMaskIntoConstraints="NO" id="Yzu-Z9-ZiH">
|
||||
<rect key="frame" x="0.0" y="0.0" width="204" height="20"/>
|
||||
<animations/>
|
||||
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="17"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.26000000000000001" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="routing_planning"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
</subviews>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="Yzu-Z9-ZiH" firstAttribute="leading" secondItem="OOA-K7-ybj" secondAttribute="leading" id="I6U-Dn-Qk6"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Yzu-Z9-ZiH" secondAttribute="trailing" id="bDH-Ez-RfC"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Yzu-Z9-ZiH" secondAttribute="bottom" id="isZ-Xy-wy3"/>
|
||||
<constraint firstItem="Yzu-Z9-ZiH" firstAttribute="top" secondItem="OOA-K7-ybj" secondAttribute="top" id="jTM-VI-Bjn"/>
|
||||
<constraint firstAttribute="height" constant="20" id="jwW-im-ZcM"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8Fm-p4-iHv" userLabel="Error box">
|
||||
<rect key="frame" x="104" y="14" width="204" height="20"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Planning..." textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="14" translatesAutoresizingMaskIntoConstraints="NO" id="bZb-KY-Y9r" userLabel="Error">
|
||||
<rect key="frame" x="0.0" y="0.0" width="204" height="20"/>
|
||||
<animations/>
|
||||
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="17"/>
|
||||
<color key="textColor" red="0.95686274509803915" green="0.2627450980392157" blue="0.21176470588235294" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="routing_planning_error"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
</subviews>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="20" id="Ii5-tP-LwY"/>
|
||||
<constraint firstAttribute="trailing" secondItem="bZb-KY-Y9r" secondAttribute="trailing" id="MQM-kE-YfO"/>
|
||||
<constraint firstAttribute="bottom" secondItem="bZb-KY-Y9r" secondAttribute="bottom" id="e8n-MD-IUX"/>
|
||||
<constraint firstItem="bZb-KY-Y9r" firstAttribute="top" secondItem="8Fm-p4-iHv" secondAttribute="top" id="iOX-Kd-geg"/>
|
||||
<constraint firstItem="bZb-KY-Y9r" firstAttribute="leading" secondItem="8Fm-p4-iHv" secondAttribute="leading" id="oiU-lf-i60"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="tjE-md-mqu" userLabel="Result box">
|
||||
<rect key="frame" x="104" y="14" width="204" height="20"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="results" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="14" translatesAutoresizingMaskIntoConstraints="NO" id="v46-iC-Qyb">
|
||||
<rect key="frame" x="0.0" y="0.0" width="204" height="20"/>
|
||||
<animations/>
|
||||
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="17"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.54000000000000004" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="v46-iC-Qyb" secondAttribute="trailing" id="Abv-X7-oJu"/>
|
||||
<constraint firstAttribute="height" constant="20" id="Utj-Ne-3Oj"/>
|
||||
<constraint firstItem="v46-iC-Qyb" firstAttribute="top" secondItem="tjE-md-mqu" secondAttribute="top" id="Zpy-r2-q2u"/>
|
||||
<constraint firstItem="v46-iC-Qyb" firstAttribute="leading" secondItem="tjE-md-mqu" secondAttribute="leading" id="hdC-c8-ywq"/>
|
||||
<constraint firstAttribute="bottom" secondItem="v46-iC-Qyb" secondAttribute="bottom" id="x8q-ZY-4Yv"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="oQc-l8-sZH" userLabel="Buttons Box">
|
||||
<rect key="frame" x="8" y="0.0" width="96" height="48"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="cZF-Ha-2tB">
|
||||
<rect key="frame" x="6" y="6" width="38" height="38"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="6D3-QF-6wm">
|
||||
<rect key="frame" x="48" y="6" width="38" height="38"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
</subviews>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="96" id="3TM-BU-wVs"/>
|
||||
<constraint firstAttribute="height" constant="48" id="Mws-KZ-ghs"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="8Fm-p4-iHv" firstAttribute="centerY" secondItem="Sr7-UO-G0z" secondAttribute="centerY" id="6Bj-GR-HOL"/>
|
||||
<constraint firstItem="OOA-K7-ybj" firstAttribute="centerY" secondItem="Sr7-UO-G0z" secondAttribute="centerY" id="6Uv-dg-Un3"/>
|
||||
<constraint firstAttribute="trailing" secondItem="tjE-md-mqu" secondAttribute="trailing" constant="12" id="99x-Ja-4UF"/>
|
||||
<constraint firstItem="OOA-K7-ybj" firstAttribute="leading" secondItem="oQc-l8-sZH" secondAttribute="trailing" id="TAE-ae-pa6"/>
|
||||
<constraint firstItem="tjE-md-mqu" firstAttribute="centerY" secondItem="Sr7-UO-G0z" secondAttribute="centerY" id="ikK-X1-3S9"/>
|
||||
<constraint firstItem="oQc-l8-sZH" firstAttribute="centerY" secondItem="Sr7-UO-G0z" secondAttribute="centerY" id="jmL-Ol-DwJ"/>
|
||||
<constraint firstItem="oQc-l8-sZH" firstAttribute="leading" secondItem="Sr7-UO-G0z" secondAttribute="leading" constant="8" id="kJx-Hv-da4"/>
|
||||
<constraint firstItem="8Fm-p4-iHv" firstAttribute="leading" secondItem="oQc-l8-sZH" secondAttribute="trailing" id="pPr-SX-Yd8"/>
|
||||
<constraint firstAttribute="height" constant="48" id="tZt-LS-raP"/>
|
||||
<constraint firstAttribute="trailing" secondItem="OOA-K7-ybj" secondAttribute="trailing" constant="12" id="uFe-u5-hEf"/>
|
||||
<constraint firstAttribute="trailing" secondItem="8Fm-p4-iHv" secondAttribute="trailing" constant="12" id="wk4-wb-LAg"/>
|
||||
<constraint firstItem="tjE-md-mqu" firstAttribute="leading" secondItem="oQc-l8-sZH" secondAttribute="trailing" id="yVc-kD-ck6"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="layer.shadowRadius">
|
||||
<integer key="value" value="2"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="layer.shadowUIColor">
|
||||
<color key="value" red="0.0" green="0.0" blue="0.0" alpha="0.23999999999999999" colorSpace="calibratedRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="layer.shadowOpacity">
|
||||
<integer key="value" value="1"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="size" keyPath="layer.shadowOffset">
|
||||
<size key="value" width="0.0" height="1"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
</subviews>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="Sr7-UO-G0z" secondAttribute="trailing" id="9Kt-v8-h57"/>
|
||||
<constraint firstItem="DMt-LJ-mzn" firstAttribute="centerX" secondItem="aNH-vh-DPz" secondAttribute="centerX" id="KO8-f0-6R5"/>
|
||||
<constraint firstItem="Sr7-UO-G0z" firstAttribute="leading" secondItem="aNH-vh-DPz" secondAttribute="leading" id="cTv-Jh-D3E"/>
|
||||
<constraint firstAttribute="trailing" secondItem="WqK-Yb-PmP" secondAttribute="trailing" id="hui-oa-rbV"/>
|
||||
<constraint firstItem="Sr7-UO-G0z" firstAttribute="top" secondItem="WqK-Yb-PmP" secondAttribute="bottom" id="jw5-OD-IF0"/>
|
||||
<constraint firstItem="WqK-Yb-PmP" firstAttribute="leading" secondItem="aNH-vh-DPz" secondAttribute="leading" id="rQB-KG-9Kg"/>
|
||||
<constraint firstItem="WqK-Yb-PmP" firstAttribute="top" secondItem="aNH-vh-DPz" secondAttribute="top" id="u9l-Q9-28D"/>
|
||||
</constraints>
|
||||
<nil key="simulatedStatusBarMetrics"/>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<connections>
|
||||
<outlet property="arrowImageView" destination="y8P-JL-riK" id="rzP-ce-6f0"/>
|
||||
<outlet property="collectionView" destination="DrK-vI-WkO" id="IRr-R5-WIS"/>
|
||||
<outlet property="contentView" destination="WqK-Yb-PmP" id="4ph-Dm-EFr"/>
|
||||
<outlet property="errorBox" destination="8Fm-p4-iHv" id="wTj-tn-NrE"/>
|
||||
<outlet property="extendButton" destination="0YR-3a-ucN" id="fJG-ts-aGf"/>
|
||||
<outlet property="layout" destination="R9u-Qo-R0Y" id="cqs-S1-d4J"/>
|
||||
<outlet property="pedestrian" destination="6D3-QF-6wm" id="bdh-zx-9LW"/>
|
||||
<outlet property="planningBox" destination="OOA-K7-ybj" id="kh6-F2-aBF"/>
|
||||
<outlet property="planningRouteViewHeight" destination="2SX-TZ-tS3" id="IwX-TA-FxL"/>
|
||||
<outlet property="resultLabel" destination="v46-iC-Qyb" id="RtF-Gr-uQC"/>
|
||||
<outlet property="resultsBox" destination="tjE-md-mqu" id="eiV-ww-oCE"/>
|
||||
<outlet property="vehicle" destination="cZF-Ha-2tB" id="QP3-tU-nfO"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="448" y="341"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="ic_arrow_up_and_down" width="9" height="9"/>
|
||||
<image name="ic_nav_bar_back" width="44" height="44"/>
|
||||
</resources>
|
||||
</document>
|
|
@ -0,0 +1,339 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9059" systemVersion="15A284" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9049"/>
|
||||
</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>
|
||||
<outlet property="iPadRoutePreview" destination="u2u-Vb-2eH" id="SRD-C4-pK3"/>
|
||||
</connections>
|
||||
</placeholder>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="u2u-Vb-2eH" customClass="MWMRoutePreview">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="655"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3s2-BV-X5i" customClass="SolidTouchView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="140"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="a4n-5I-PN3" userLabel="Back">
|
||||
<rect key="frame" x="0.0" y="0.0" width="44" height="44"/>
|
||||
<animations/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="44" id="huq-Vr-EM5"/>
|
||||
<constraint firstAttribute="width" constant="44" id="zCn-K4-Ax9"/>
|
||||
</constraints>
|
||||
<state key="normal" image="ic_nav_bar_back"/>
|
||||
<connections>
|
||||
<action selector="navigationCancelPressed:" destination="-1" eventType="touchUpInside" id="QZp-W0-W2E"/>
|
||||
</connections>
|
||||
</button>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Planning Route" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8Q7-PE-2D9">
|
||||
<rect key="frame" x="99.5" y="12" width="120" height="20.5"/>
|
||||
<animations/>
|
||||
<fontDescription key="fontDescription" name="HelveticaNeue-Medium" family="Helvetica Neue" pointSize="17"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<collectionView multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="TC0-58-PO9">
|
||||
<rect key="frame" x="8" y="48" width="304" height="80"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="80" id="exN-o8-Rx8"/>
|
||||
</constraints>
|
||||
<collectionViewLayout key="collectionViewLayout" id="YwC-vB-4LF" customClass="MWMRoutePointLayout">
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="size" keyPath="itemSize">
|
||||
<size key="value" width="304" height="36"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<outlet property="parentView" destination="u2u-Vb-2eH" id="ebV-nZ-xhX"/>
|
||||
</connections>
|
||||
</collectionViewLayout>
|
||||
<connections>
|
||||
<outlet property="dataSource" destination="u2u-Vb-2eH" id="nyl-Sz-zTu"/>
|
||||
<outlet property="delegate" destination="u2u-Vb-2eH" id="9Ib-Rd-Nf8"/>
|
||||
</connections>
|
||||
</collectionView>
|
||||
</subviews>
|
||||
<animations/>
|
||||
<color key="backgroundColor" red="0.1215686275" green="0.59999999999999998" blue="0.32156862749999998" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="140" id="7e9-gc-Y07"/>
|
||||
<constraint firstItem="8Q7-PE-2D9" firstAttribute="centerY" secondItem="a4n-5I-PN3" secondAttribute="centerY" id="I38-hd-pky"/>
|
||||
<constraint firstAttribute="bottom" secondItem="TC0-58-PO9" secondAttribute="bottom" constant="12" id="O8H-Ui-wI9"/>
|
||||
<constraint firstItem="TC0-58-PO9" firstAttribute="leading" secondItem="3s2-BV-X5i" secondAttribute="leading" constant="8" id="Qnm-Iy-DdA"/>
|
||||
<constraint firstItem="8Q7-PE-2D9" firstAttribute="centerX" secondItem="3s2-BV-X5i" secondAttribute="centerX" id="TFE-Df-Eri"/>
|
||||
<constraint firstItem="a4n-5I-PN3" firstAttribute="leading" secondItem="3s2-BV-X5i" secondAttribute="leading" id="Wxp-Yl-6SC"/>
|
||||
<constraint firstItem="a4n-5I-PN3" firstAttribute="top" secondItem="3s2-BV-X5i" secondAttribute="top" id="ppW-Pq-6rh"/>
|
||||
<constraint firstAttribute="trailing" secondItem="TC0-58-PO9" secondAttribute="trailing" constant="8" id="yA7-YN-yHs"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dCk-ko-ZXf" customClass="SolidTouchView">
|
||||
<rect key="frame" x="0.0" y="140" width="320" height="48"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="sXu-tl-a0m" userLabel="Buttons Box">
|
||||
<rect key="frame" x="100" y="0.0" width="120" height="48"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="jDl-pu-eov">
|
||||
<rect key="frame" x="6" y="6" width="36" height="36"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="VhE-hA-Leo">
|
||||
<rect key="frame" x="72" y="6" width="36" height="36"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
</subviews>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="120" id="L2G-Qu-tAj"/>
|
||||
<constraint firstAttribute="height" constant="48" id="VKo-hu-3qN"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="sXu-tl-a0m" firstAttribute="centerX" secondItem="dCk-ko-ZXf" secondAttribute="centerX" id="I21-lN-FTQ"/>
|
||||
<constraint firstItem="sXu-tl-a0m" firstAttribute="centerY" secondItem="dCk-ko-ZXf" secondAttribute="centerY" id="PZW-eT-JxN"/>
|
||||
<constraint firstAttribute="height" constant="48" id="tiT-C1-uCe"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="layer.shadowRadius">
|
||||
<integer key="value" value="2"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="layer.shadowUIColor">
|
||||
<color key="value" red="0.0" green="0.0" blue="0.0" alpha="0.23999999999999999" colorSpace="calibratedRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="layer.shadowOpacity">
|
||||
<integer key="value" value="1"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="size" keyPath="layer.shadowOffset">
|
||||
<size key="value" width="0.0" height="1"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="87p-Qg-8f3" userLabel="Status Box">
|
||||
<rect key="frame" x="0.0" y="208" width="320" height="56"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="tdV-a8-fmG" userLabel="Planning Box">
|
||||
<rect key="frame" x="56" y="18" width="240" height="24"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Planning..." lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="14" translatesAutoresizingMaskIntoConstraints="NO" id="a7v-h1-j52">
|
||||
<rect key="frame" x="0.0" y="0.0" width="240" height="20"/>
|
||||
<animations/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="20" id="kce-Z6-Dgg"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="17"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.26000000000000001" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="routing_planning"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
</subviews>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="a7v-h1-j52" firstAttribute="leading" secondItem="tdV-a8-fmG" secondAttribute="leading" id="DTZ-EA-SCl"/>
|
||||
<constraint firstItem="a7v-h1-j52" firstAttribute="top" secondItem="tdV-a8-fmG" secondAttribute="top" id="JtI-PP-1bF"/>
|
||||
<constraint firstAttribute="trailing" secondItem="a7v-h1-j52" secondAttribute="trailing" id="sD2-h3-W7d"/>
|
||||
<constraint firstAttribute="height" constant="24" id="urN-wh-uDh"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="QEP-6s-YTM" userLabel="Error Box">
|
||||
<rect key="frame" x="56" y="18" width="240" height="24"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Planning..." lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="14" translatesAutoresizingMaskIntoConstraints="NO" id="VNi-4g-9gz" userLabel="Error">
|
||||
<rect key="frame" x="0.0" y="0.0" width="240" height="20"/>
|
||||
<animations/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="20" id="cgc-k8-8fa"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="17"/>
|
||||
<color key="textColor" red="0.95686274510000002" green="0.26274509800000001" blue="0.21176470589999999" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="routing_planning_error"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
</subviews>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="VNi-4g-9gz" firstAttribute="top" secondItem="QEP-6s-YTM" secondAttribute="top" id="D4E-VN-nEs"/>
|
||||
<constraint firstAttribute="height" constant="24" id="VAv-Yd-uYh"/>
|
||||
<constraint firstItem="VNi-4g-9gz" firstAttribute="leading" secondItem="QEP-6s-YTM" secondAttribute="leading" id="Vj2-Td-djJ"/>
|
||||
<constraint firstAttribute="trailing" secondItem="VNi-4g-9gz" secondAttribute="trailing" id="j6r-43-O3n"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Rqr-bu-crx" userLabel="Results Box">
|
||||
<rect key="frame" x="16" y="18" width="280" height="44"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="results" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zml-eW-DsI">
|
||||
<rect key="frame" x="40" y="0.0" width="240" height="20"/>
|
||||
<animations/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="20" id="hNE-av-oYA"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="17"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.54000000000000004" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Arrive at 12:24" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="oec-Ee-6ha">
|
||||
<rect key="frame" x="40" y="28" width="240" height="16"/>
|
||||
<animations/>
|
||||
<fontDescription key="fontDescription" name="HelveticaNeue-Medium" family="Helvetica Neue" pointSize="14"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.54000000000000004" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="ic_checkmark" translatesAutoresizingMaskIntoConstraints="NO" id="pQb-pb-L88">
|
||||
<rect key="frame" x="0.0" y="10" width="24" height="24"/>
|
||||
<animations/>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="zml-eW-DsI" firstAttribute="top" secondItem="Rqr-bu-crx" secondAttribute="top" id="64F-ka-3rg"/>
|
||||
<constraint firstAttribute="trailing" secondItem="zml-eW-DsI" secondAttribute="trailing" id="jkC-ab-eb2"/>
|
||||
<constraint firstItem="zml-eW-DsI" firstAttribute="leading" secondItem="Rqr-bu-crx" secondAttribute="leading" constant="40" id="qVK-7N-2cB"/>
|
||||
<constraint firstAttribute="height" constant="44" id="xv6-UW-2NC"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="QEP-6s-YTM" secondAttribute="trailing" constant="24" id="3j3-fg-BQI"/>
|
||||
<constraint firstAttribute="height" constant="56" id="4qT-ha-p75"/>
|
||||
<constraint firstItem="tdV-a8-fmG" firstAttribute="top" secondItem="87p-Qg-8f3" secondAttribute="top" constant="18" id="9k0-qk-CIy"/>
|
||||
<constraint firstItem="Rqr-bu-crx" firstAttribute="leading" secondItem="87p-Qg-8f3" secondAttribute="leading" constant="16" id="QE7-5e-hao"/>
|
||||
<constraint firstItem="tdV-a8-fmG" firstAttribute="leading" secondItem="87p-Qg-8f3" secondAttribute="leading" constant="56" id="eId-mI-aTk"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Rqr-bu-crx" secondAttribute="trailing" constant="24" id="eWu-5d-rwV"/>
|
||||
<constraint firstItem="Rqr-bu-crx" firstAttribute="top" secondItem="87p-Qg-8f3" secondAttribute="top" constant="18" id="gCE-au-jty"/>
|
||||
<constraint firstItem="QEP-6s-YTM" firstAttribute="top" secondItem="87p-Qg-8f3" secondAttribute="top" constant="18" id="pQh-mf-RQ7"/>
|
||||
<constraint firstAttribute="trailing" secondItem="tdV-a8-fmG" secondAttribute="trailing" constant="24" id="wOw-dF-lsK"/>
|
||||
<constraint firstItem="QEP-6s-YTM" firstAttribute="leading" secondItem="87p-Qg-8f3" secondAttribute="leading" constant="56" id="xIy-mT-cu9"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="layer.borderUIColor">
|
||||
<color key="value" red="0.0" green="0.0" blue="0.0" alpha="0.12" colorSpace="calibratedRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="layer.borderWidth">
|
||||
<integer key="value" value="1"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="gcR-zj-b7P">
|
||||
<rect key="frame" x="0.0" y="607" width="320" height="48"/>
|
||||
<subviews>
|
||||
<button hidden="YES" clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="tailTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="4IJ-pR-Ztp" userLabel="Go">
|
||||
<rect key="frame" x="100" y="8" width="120" height="32"/>
|
||||
<animations/>
|
||||
<accessibility key="accessibilityConfiguration" identifier="goButton"/>
|
||||
<inset key="contentEdgeInsets" minX="8" minY="0.0" maxX="8" maxY="0.0"/>
|
||||
<state key="normal" title="Start"/>
|
||||
<state key="selected">
|
||||
<color key="titleColor" red="0.0" green="0.0" blue="0.0" alpha="0.26000000000000001" colorSpace="calibratedRGB"/>
|
||||
</state>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular17"/>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
|
||||
<integer key="value" value="4"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="routing_go"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="textColorName" value="whiteColor"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="linkBlue"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="backgroundHighlightedColorName" value="linkBlueDark"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="navigationGoPressed:" destination="-1" eventType="touchUpInside" id="6Mw-RM-bqr"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<animations/>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="0.80000000000000004" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="48" id="5GN-4g-vV1"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="layer.borderUIColor">
|
||||
<color key="value" red="0.0" green="0.0" blue="0.0" alpha="0.12" colorSpace="calibratedRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="layer.borderWidth">
|
||||
<integer key="value" value="1"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
</subviews>
|
||||
<animations/>
|
||||
<color key="backgroundColor" red="0.96078431372549022" green="0.96078431372549022" blue="0.96078431372549022" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="gcR-zj-b7P" firstAttribute="leading" secondItem="u2u-Vb-2eH" secondAttribute="leading" id="1RD-kG-W2O"/>
|
||||
<constraint firstAttribute="trailing" secondItem="87p-Qg-8f3" secondAttribute="trailing" id="5wh-lx-rUz"/>
|
||||
<constraint firstItem="3s2-BV-X5i" firstAttribute="top" secondItem="u2u-Vb-2eH" secondAttribute="top" id="8Qb-GY-2hU"/>
|
||||
<constraint firstItem="87p-Qg-8f3" firstAttribute="leading" secondItem="u2u-Vb-2eH" secondAttribute="leading" id="9bA-9R-pwq"/>
|
||||
<constraint firstAttribute="bottom" secondItem="gcR-zj-b7P" secondAttribute="bottom" id="QYs-r4-Jyl"/>
|
||||
<constraint firstItem="87p-Qg-8f3" firstAttribute="top" secondItem="dCk-ko-ZXf" secondAttribute="bottom" constant="20" id="Wdh-lF-PT4"/>
|
||||
<constraint firstAttribute="trailing" secondItem="dCk-ko-ZXf" secondAttribute="trailing" id="ZuD-Xf-f8d"/>
|
||||
<constraint firstItem="3s2-BV-X5i" firstAttribute="leading" secondItem="u2u-Vb-2eH" secondAttribute="leading" id="e90-R4-YQR"/>
|
||||
<constraint firstAttribute="trailing" secondItem="3s2-BV-X5i" secondAttribute="trailing" id="lnu-7l-aPG"/>
|
||||
<constraint firstAttribute="trailing" secondItem="gcR-zj-b7P" secondAttribute="trailing" id="n9j-dG-kOB"/>
|
||||
<constraint firstItem="dCk-ko-ZXf" firstAttribute="leading" secondItem="u2u-Vb-2eH" secondAttribute="leading" id="t6m-zB-7rK"/>
|
||||
<constraint firstItem="dCk-ko-ZXf" firstAttribute="top" secondItem="3s2-BV-X5i" secondAttribute="bottom" id="uv5-No-Ghd"/>
|
||||
</constraints>
|
||||
<nil key="simulatedStatusBarMetrics"/>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="layer.shadowRadius">
|
||||
<integer key="value" value="2"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="layer.shadowUIColor">
|
||||
<color key="value" white="0.0" alpha="0.23999999999999999" colorSpace="calibratedWhite"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="layer.shadowOpacity">
|
||||
<integer key="value" value="1"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="size" keyPath="layer.shadowOffset">
|
||||
<size key="value" width="3" height="0.0"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<outlet property="arriveLabel" destination="oec-Ee-6ha" id="7Ep-ck-NSQ"/>
|
||||
<outlet property="collectionView" destination="TC0-58-PO9" id="Onv-Ld-JPp"/>
|
||||
<outlet property="completeImageView" destination="pQb-pb-L88" id="FAi-yN-HNc"/>
|
||||
<outlet property="contentView" destination="3s2-BV-X5i" id="mp7-Qq-drU"/>
|
||||
<outlet property="errorBox" destination="QEP-6s-YTM" id="kH0-yP-1Gk"/>
|
||||
<outlet property="goButton" destination="4IJ-pR-Ztp" id="48a-At-Nqq"/>
|
||||
<outlet property="layout" destination="YwC-vB-4LF" id="Hta-la-OdY"/>
|
||||
<outlet property="pedestrian" destination="VhE-hA-Leo" id="R3O-th-Jw0"/>
|
||||
<outlet property="planningBox" destination="tdV-a8-fmG" id="dR4-f7-H2J"/>
|
||||
<outlet property="resultLabel" destination="zml-eW-DsI" id="GaF-AU-thr"/>
|
||||
<outlet property="resultsBox" destination="Rqr-bu-crx" id="MgA-Aj-m5e"/>
|
||||
<outlet property="statusBox" destination="87p-Qg-8f3" id="mSF-4e-CPU"/>
|
||||
<outlet property="statusBoxHeight" destination="4qT-ha-p75" id="Ias-po-Adc"/>
|
||||
<outlet property="vehicle" destination="jDl-pu-eov" id="awM-KI-2xO"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="448" y="574.5"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="ic_checkmark" width="24" height="24"/>
|
||||
<image name="ic_nav_bar_back" width="44" height="44"/>
|
||||
</resources>
|
||||
</document>
|
|
@ -1,3 +1,4 @@
|
|||
#import "MapsAppDelegate.h"
|
||||
#import "MWMBasePlacePageView.h"
|
||||
#import "MWMBookmarkColorViewController.h"
|
||||
#import "MWMBookmarkDescriptionViewController.h"
|
||||
|
@ -8,7 +9,7 @@
|
|||
#import "MWMPlacePageViewManager.h"
|
||||
#import "SelectSetVC.h"
|
||||
|
||||
#import "../../3party/Alohalytics/src/alohalytics_objc.h"
|
||||
#import "3party/Alohalytics/src/alohalytics_objc.h"
|
||||
|
||||
static NSString * const kPlacePageNibIdentifier = @"PlacePageView";
|
||||
extern NSString * const kAlohalyticsTapEventKey;
|
||||
|
@ -83,7 +84,16 @@ static NSString * const kPlacePageViewCenterKeyPath = @"center";
|
|||
{
|
||||
MWMPlacePageEntity * entity = self.manager.entity;
|
||||
[self.basePlacePageView configureWithEntity:entity];
|
||||
[self.actionBar configureWithPlacePage:self];
|
||||
BOOL const isPrepareRouteMode = MapsAppDelegate.theApp.routingPlaneMode != MWMRoutingPlaneModeNone;
|
||||
if (self.actionBar.isPrepareRouteMode == isPrepareRouteMode)
|
||||
{
|
||||
[self.actionBar configureWithPlacePage:self];
|
||||
}
|
||||
else
|
||||
{
|
||||
[self.actionBar removeFromSuperview];
|
||||
self.actionBar = [MWMPlacePageActionBar actionBarForPlacePage:self];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)show
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
@interface MWMPlacePageActionBar : UIView
|
||||
|
||||
@property (nonatomic) BOOL isBookmark;
|
||||
@property (nonatomic) BOOL isPrepareRouteMode;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIButton * shareButton;
|
||||
|
||||
|
|
|
@ -29,7 +29,15 @@ static NSString * const kPlacePageActionBarNibName = @"PlacePageActionBar";
|
|||
|
||||
+ (MWMPlacePageActionBar *)actionBarForPlacePage:(MWMPlacePage *)placePage
|
||||
{
|
||||
MWMPlacePageActionBar * bar = [[[NSBundle mainBundle] loadNibNamed:kPlacePageActionBarNibName owner:self options:nil] firstObject];
|
||||
BOOL const isPrepareRouteMode = MapsAppDelegate.theApp.routingPlaneMode != MWMRoutingPlaneModeNone;
|
||||
NSUInteger const i = isPrepareRouteMode ? 1 : 0;
|
||||
MWMPlacePageActionBar * bar = [NSBundle.mainBundle
|
||||
loadNibNamed:kPlacePageActionBarNibName owner:nil options:nil][i];
|
||||
NSAssert(i == bar.tag, @"Incorrect view!");
|
||||
bar.isPrepareRouteMode = isPrepareRouteMode;
|
||||
if (isPrepareRouteMode)
|
||||
return bar;
|
||||
|
||||
[bar setupBookmarkButton];
|
||||
[bar configureWithPlacePage:placePage];
|
||||
return bar;
|
||||
|
@ -123,6 +131,16 @@ static NSString * const kPlacePageActionBarNibName = @"PlacePageActionBar";
|
|||
animationIV.animationRepeatCount = 1;
|
||||
}
|
||||
|
||||
- (IBAction)fromTap
|
||||
{
|
||||
[self.placePage.manager routeFrom];
|
||||
}
|
||||
|
||||
- (IBAction)toTap
|
||||
{
|
||||
[self.placePage.manager routeTo];
|
||||
}
|
||||
|
||||
- (IBAction)bookmarkTap:(UIButton *)sender
|
||||
{
|
||||
self.isBookmark = !self.isBookmark;
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
- (void)dismissPlacePage;
|
||||
- (void)hidePlacePage;
|
||||
- (void)buildRoute;
|
||||
- (void)routeFrom;
|
||||
- (void)routeTo;
|
||||
- (void)share;
|
||||
- (void)addBookmark;
|
||||
- (void)removeBookmark;
|
||||
|
|
|
@ -31,7 +31,7 @@ typedef NS_ENUM(NSUInteger, MWMPlacePageManagerState)
|
|||
unique_ptr<UserMarkCopy> m_userMark;
|
||||
}
|
||||
|
||||
@property (weak, nonatomic) UIViewController<MWMPlacePageViewManagerProtocol> * ownerViewController;
|
||||
@property (weak, nonatomic) UIViewController * ownerViewController;
|
||||
@property (nonatomic, readwrite) MWMPlacePageEntity * entity;
|
||||
@property (nonatomic) MWMPlacePage * placePage;
|
||||
@property (nonatomic) MWMPlacePageManagerState state;
|
||||
|
@ -186,11 +186,30 @@ typedef NS_ENUM(NSUInteger, MWMPlacePageManagerState)
|
|||
|
||||
- (void)buildRoute
|
||||
{
|
||||
auto & f = GetFramework();
|
||||
m2::PointD const & destination = m_userMark->GetUserMark()->GetOrg();
|
||||
m2::PointD const myPosition (ToMercator([MapsAppDelegate theApp].m_locationManager.lastLocation.coordinate));
|
||||
f.SetRouter(f.GetBestRouter(myPosition, destination));
|
||||
[self.delegate buildRoute:destination];
|
||||
[self.delegate buildRouteFrom:MWMRoutePoint(myPosition) to:{destination, self.placePage.basePlacePageView.titleLabel.text}];
|
||||
}
|
||||
|
||||
- (void)routeFrom
|
||||
{
|
||||
[self.delegate buildRouteFrom:self.target];
|
||||
[self dismissPlacePage];
|
||||
}
|
||||
|
||||
- (void)routeTo
|
||||
{
|
||||
[self.delegate buildRouteTo:self.target];
|
||||
[self dismissPlacePage];
|
||||
}
|
||||
|
||||
- (MWMRoutePoint)target
|
||||
{
|
||||
UserMark const * m = m_userMark->GetUserMark();
|
||||
m2::PointD const & org = m->GetOrg();
|
||||
return m->GetMarkType() == UserMark::Type::MY_POSITION ?
|
||||
MWMRoutePoint(org) :
|
||||
MWMRoutePoint(org, self.placePage.basePlacePageView.titleLabel.text);
|
||||
}
|
||||
|
||||
- (void)share
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
@protocol MWMPlacePageViewManagerProtocol <NSObject>
|
||||
#import "MWMRoutingProtocol.h"
|
||||
|
||||
@protocol MWMPlacePageViewManagerProtocol <MWMRoutingProtocol>
|
||||
|
||||
- (void)dragPlacePage:(CGRect)frame;
|
||||
- (void)addPlacePageViews:(NSArray *)views;
|
||||
- (void)updateStatusBarStyle;
|
||||
- (void)buildRoute:(m2::PointD)destination;
|
||||
- (void)apiBack;
|
||||
- (void)placePageDidClose;
|
||||
|
||||
|
|
|
@ -207,7 +207,8 @@ typedef NS_ENUM(NSUInteger, UserTouchesAction)
|
|||
|
||||
Framework & f = GetFramework();
|
||||
UserMark const * userMark = f.GetUserMark(pxClicked, isLongClick);
|
||||
if (f.HasActiveUserMark() == false && self.controlsManager.searchHidden && !f.IsRouteNavigable())
|
||||
if (!f.HasActiveUserMark() && self.controlsManager.searchHidden && !f.IsRouteNavigable()
|
||||
&& MapsAppDelegate.theApp.routingPlaneMode == MWMRoutingPlaneModeNone)
|
||||
{
|
||||
if (userMark == nullptr)
|
||||
self.controlsManager.hidden = !self.controlsManager.hidden;
|
||||
|
@ -550,7 +551,8 @@ typedef NS_ENUM(NSUInteger, UserTouchesAction)
|
|||
self.controlsManager.menuState == MWMBottomMenuStateActive ||
|
||||
self.controlsManager.isDirectionViewShown ||
|
||||
(GetFramework().GetMapStyle() == MapStyleDark &&
|
||||
self.controlsManager.navigationState == MWMNavigationDashboardStateHidden);
|
||||
self.controlsManager.navigationState == MWMNavigationDashboardStateHidden) ||
|
||||
MapsAppDelegate.theApp.routingPlaneMode != MWMRoutingPlaneModeNone;
|
||||
if (isLight)
|
||||
return UIStatusBarStyleLightContent;
|
||||
return UIStatusBarStyleDefault;
|
||||
|
|
|
@ -7,6 +7,14 @@
|
|||
@class MapViewController;
|
||||
@class LocationManager;
|
||||
|
||||
typedef NS_ENUM(NSUInteger, MWMRoutingPlaneMode)
|
||||
{
|
||||
MWMRoutingPlaneModeNone,
|
||||
MWMRoutingPlaneModePlacePage,
|
||||
MWMRoutingPlaneModeSearchSource,
|
||||
MWMRoutingPlaneModeSearchDestination
|
||||
};
|
||||
|
||||
@interface MapsAppDelegate : UIResponder<UIApplicationDelegate, UIAlertViewDelegate,
|
||||
ActiveMapsObserverProtocol, DownloadIndicatorProtocol>
|
||||
{
|
||||
|
@ -16,6 +24,7 @@
|
|||
}
|
||||
|
||||
@property (nonatomic) UIWindow * window;
|
||||
@property (nonatomic) MWMRoutingPlaneMode routingPlaneMode;
|
||||
|
||||
@property (nonatomic, readonly) MapViewController * mapViewController;
|
||||
@property (nonatomic, readonly) LocationManager * m_locationManager;
|
||||
|
|
|
@ -503,6 +503,12 @@ void InitLocalizedStrings()
|
|||
}
|
||||
}
|
||||
|
||||
- (void)setRoutingPlaneMode:(MWMRoutingPlaneMode)routingPlaneMode
|
||||
{
|
||||
_routingPlaneMode = routingPlaneMode;
|
||||
[self.mapViewController updateStatusBarStyle];
|
||||
}
|
||||
|
||||
#pragma mark - Properties
|
||||
|
||||
- (MapViewController *)mapViewController
|
||||
|
|
|
@ -1,19 +1,20 @@
|
|||
<?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">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9059" systemVersion="15A284" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9049"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="MWMPlacePageActionBar">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="58"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="48"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="pZD-rg-W4y" userLabel="BackButton">
|
||||
<rect key="frame" x="0.0" y="0.0" width="80" height="46"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES"/>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="pZD-rg-W4y" userLabel="BackButton">
|
||||
<rect key="frame" x="0.0" y="-5" width="80" height="46"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
<state key="normal" image="ic_back_api">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
|
@ -22,9 +23,10 @@
|
|||
<action selector="backTap" destination="iN0-l3-epB" eventType="touchUpInside" id="C4S-yq-52j"/>
|
||||
</connections>
|
||||
</button>
|
||||
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Back" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="ZeH-u1-ky5" userLabel="BackLabel">
|
||||
<rect key="frame" x="0.0" y="37" width="80" height="13"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES"/>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Back" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="ZeH-u1-ky5" userLabel="BackLabel">
|
||||
<rect key="frame" x="0.0" y="32" width="80" height="13"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="10"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.54000000000000004" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
|
@ -35,8 +37,9 @@
|
|||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="Jtm-w6-q1e" userLabel="ShareButton">
|
||||
<rect key="frame" x="80" y="0.0" width="80" height="46"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES"/>
|
||||
<rect key="frame" x="80" y="-5" width="80" height="46"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
<state key="normal" image="ic_share">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
|
@ -46,8 +49,9 @@
|
|||
</connections>
|
||||
</button>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Share" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="4Hy-ie-rSK">
|
||||
<rect key="frame" x="80" y="37" width="80" height="13"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES"/>
|
||||
<rect key="frame" x="80" y="32" width="80" height="13"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="10"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.54000000000000004" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
|
@ -58,8 +62,9 @@
|
|||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="66j-hn-azO" userLabel="SaveButton">
|
||||
<rect key="frame" x="160" y="0.0" width="80" height="46"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES"/>
|
||||
<rect key="frame" x="160" y="-5" width="80" height="46"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
<state key="normal" title="" image="ic_bookmarks_off"/>
|
||||
<state key="selected" image="ic_bookmarks_on"/>
|
||||
<state key="highlighted" image="ic_bookmarks_off_pressed"/>
|
||||
|
@ -68,8 +73,9 @@
|
|||
</connections>
|
||||
</button>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Save" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="niS-Il-TNU">
|
||||
<rect key="frame" x="160" y="37" width="80" height="13"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES"/>
|
||||
<rect key="frame" x="160" y="32" width="80" height="13"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="10"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.54000000000000004" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
|
@ -80,8 +86,9 @@
|
|||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="6cp-1o-ehc" userLabel="RouteButton">
|
||||
<rect key="frame" x="240" y="0.0" width="80" height="46"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES"/>
|
||||
<rect key="frame" x="240" y="-5" width="80" height="46"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
<state key="normal" image="ic_route">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
|
@ -91,8 +98,9 @@
|
|||
</connections>
|
||||
</button>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Route" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="OOE-NW-gUw">
|
||||
<rect key="frame" x="240" y="37" width="80" height="13"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES"/>
|
||||
<rect key="frame" x="240" y="32" width="80" height="13"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="10"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.54000000000000004" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
|
@ -105,9 +113,11 @@
|
|||
<view contentMode="scaleToFill" id="8aC-eJ-egB">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="1"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.12" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</view>
|
||||
</subviews>
|
||||
<animations/>
|
||||
<color key="backgroundColor" red="0.96078431372549022" green="0.96078431372549022" blue="0.96078431372549022" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="simulatedStatusBarMetrics"/>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
|
@ -126,21 +136,66 @@
|
|||
</connections>
|
||||
<point key="canvasLocation" x="335" y="266"/>
|
||||
</view>
|
||||
<view tag="1" contentMode="scaleToFill" id="2HF-YO-IQi" customClass="MWMPlacePageActionBar">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="48"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" id="5cx-Cs-3B4" userLabel="hSeparator">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="1"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.12" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</view>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="yN5-Eq-jO7">
|
||||
<rect key="frame" x="0.0" y="0.0" width="159" height="48"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="17"/>
|
||||
<state key="normal" title="From">
|
||||
<color key="titleColor" red="0.0" green="0.0" blue="0.0" alpha="0.54000000000000004" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</state>
|
||||
<connections>
|
||||
<action selector="fromTap" destination="2HF-YO-IQi" eventType="touchUpInside" id="TlT-QT-gt8"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="l4h-4q-eGV">
|
||||
<rect key="frame" x="160" y="0.0" width="160" height="48"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="17"/>
|
||||
<state key="normal" title="To">
|
||||
<color key="titleColor" red="0.0" green="0.0" blue="0.0" alpha="0.54000000000000004" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</state>
|
||||
<connections>
|
||||
<action selector="toTap" destination="2HF-YO-IQi" eventType="touchUpInside" id="cv9-Vs-6EE"/>
|
||||
</connections>
|
||||
</button>
|
||||
<view contentMode="scaleToFill" layoutMarginsFollowReadableWidth="YES" id="ACK-rU-Jun" userLabel="vSeparator">
|
||||
<rect key="frame" x="159" y="6" width="1" height="36"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.12" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</view>
|
||||
</subviews>
|
||||
<animations/>
|
||||
<color key="backgroundColor" red="0.96078431372549022" green="0.96078431372549022" blue="0.96078431372549022" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="simulatedStatusBarMetrics"/>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="pressBackground"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<point key="canvasLocation" x="335" y="365"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="ic_back_api" width="24" height="24"/>
|
||||
<image name="ic_back_api_pressed" width="16" height="16"/>
|
||||
<image name="ic_bookmarks_off" width="24" height="24"/>
|
||||
<image name="ic_bookmarks_off_pressed" width="22" height="20"/>
|
||||
<image name="ic_bookmarks_on" width="24" height="24"/>
|
||||
<image name="ic_route" width="24" height="24"/>
|
||||
<image name="ic_route_pressed" width="22" height="22"/>
|
||||
<image name="ic_share" width="24" height="24"/>
|
||||
<image name="ic_share_pressed" width="18" height="20"/>
|
||||
<image name="ic_back_api" width="28" height="28"/>
|
||||
<image name="ic_back_api_pressed" width="28" height="28"/>
|
||||
<image name="ic_bookmarks_off" width="28" height="28"/>
|
||||
<image name="ic_bookmarks_off_pressed" width="28" height="28"/>
|
||||
<image name="ic_bookmarks_on" width="28" height="28"/>
|
||||
<image name="ic_route" width="28" height="28"/>
|
||||
<image name="ic_route_pressed" width="28" height="28"/>
|
||||
<image name="ic_share" width="28" height="28"/>
|
||||
<image name="ic_share_pressed" width="28" height="28"/>
|
||||
</resources>
|
||||
<simulatedMetricsContainer key="defaultSimulatedMetrics">
|
||||
<simulatedStatusBarMetrics key="statusBar"/>
|
||||
<simulatedOrientationMetrics key="orientation"/>
|
||||
<simulatedScreenMetrics key="destination" type="retina4"/>
|
||||
</simulatedMetricsContainer>
|
||||
</document>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<rect key="frame" x="0.0" y="0.0" width="320" height="223"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="jfp-wb-Z7G" id="kUu-ao-FYN">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="222.5"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="223"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_bookmark" translatesAutoresizingMaskIntoConstraints="NO" id="NJ3-lK-ziZ" userLabel="Bookmark icon">
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
|
@ -2,18 +2,18 @@
|
|||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x",
|
||||
"filename" : "ic_stop_spinner.png"
|
||||
"filename" : "ic_check.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x",
|
||||
"filename" : "ic_stop_spinner@2x.png"
|
||||
"filename" : "ic_check@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x",
|
||||
"filename" : "ic_stop_spinner@3x.png"
|
||||
"filename" : "ic_check@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
BIN
iphone/Maps/Images.xcassets/CircularProgress/ic_check.imageset/ic_check.png
vendored
Normal file
After ![]() (image error) Size: 236 B |
BIN
iphone/Maps/Images.xcassets/CircularProgress/ic_check.imageset/ic_check@2x.png
vendored
Normal file
After ![]() (image error) Size: 304 B |
BIN
iphone/Maps/Images.xcassets/CircularProgress/ic_check.imageset/ic_check@3x.png
vendored
Normal file
After ![]() (image error) Size: 448 B |
|
@ -2,18 +2,18 @@
|
|||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x",
|
||||
"filename" : "ic_spinner_close_1.png"
|
||||
"filename" : "ic_close_spinner.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x",
|
||||
"filename" : "ic_spinner_close_1@2x.png"
|
||||
"filename" : "ic_close_spinner@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x",
|
||||
"filename" : "ic_spinner_close_1@3x.png"
|
||||
"filename" : "ic_close_spinner@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
BIN
iphone/Maps/Images.xcassets/CircularProgress/ic_close_spinner.imageset/ic_close_spinner.png
vendored
Normal file
After ![]() (image error) Size: 151 B |
BIN
iphone/Maps/Images.xcassets/CircularProgress/ic_close_spinner.imageset/ic_close_spinner@2x.png
vendored
Normal file
After ![]() (image error) Size: 242 B |
BIN
iphone/Maps/Images.xcassets/CircularProgress/ic_close_spinner.imageset/ic_close_spinner@3x.png
vendored
Normal file
After ![]() (image error) Size: 298 B |
23
iphone/Maps/Images.xcassets/CircularProgress/ic_close_spinner_press.imageset/Contents.json
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_close_spinner_press.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_close_spinner_press@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_close_spinner_press@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
After ![]() (image error) Size: 143 B |
After ![]() (image error) Size: 236 B |
After ![]() (image error) Size: 281 B |
|
@ -2,18 +2,18 @@
|
|||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x",
|
||||
"filename" : "ic_spinner_close_2.png"
|
||||
"filename" : "ic_download.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x",
|
||||
"filename" : "ic_spinner_close_2@2x.png"
|
||||
"filename" : "ic_download@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x",
|
||||
"filename" : "ic_spinner_close_2@3x.png"
|
||||
"filename" : "ic_download@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
BIN
iphone/Maps/Images.xcassets/CircularProgress/ic_download.imageset/ic_download.png
vendored
Normal file
After ![]() (image error) Size: 186 B |
BIN
iphone/Maps/Images.xcassets/CircularProgress/ic_download.imageset/ic_download@2x.png
vendored
Normal file
After ![]() (image error) Size: 288 B |
BIN
iphone/Maps/Images.xcassets/CircularProgress/ic_download.imageset/ic_download@3x.png
vendored
Normal file
After ![]() (image error) Size: 388 B |
|
@ -1,23 +0,0 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x",
|
||||
"filename" : "ic_download_continue.png"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x",
|
||||
"filename" : "ic_download_continue@2x.png"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x",
|
||||
"filename" : "ic_download_continue@3x.png"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
Before ![]() (image error) Size: 366 B |
Before ![]() (image error) Size: 663 B |
Before ![]() (image error) Size: 758 B |
|
@ -2,18 +2,18 @@
|
|||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x",
|
||||
"filename" : "ic_spinner_close_3.png"
|
||||
"filename" : "ic_download_error.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x",
|
||||
"filename" : "ic_spinner_close_3@2x.png"
|
||||
"filename" : "ic_download_error@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x",
|
||||
"filename" : "ic_spinner_close_3@3x.png"
|
||||
"filename" : "ic_download_error@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
BIN
iphone/Maps/Images.xcassets/CircularProgress/ic_download_error.imageset/ic_download_error.png
vendored
Normal file
After ![]() (image error) Size: 449 B |
BIN
iphone/Maps/Images.xcassets/CircularProgress/ic_download_error.imageset/ic_download_error@2x.png
vendored
Normal file
After ![]() (image error) Size: 839 B |
BIN
iphone/Maps/Images.xcassets/CircularProgress/ic_download_error.imageset/ic_download_error@3x.png
vendored
Normal file
After ![]() (image error) Size: 1.1 KiB |
23
iphone/Maps/Images.xcassets/CircularProgress/ic_download_error_press.imageset/Contents.json
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_download_error_press.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_download_error_press@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_download_error_press@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
After ![]() (image error) Size: 452 B |
After ![]() (image error) Size: 814 B |
After ![]() (image error) Size: 1.1 KiB |
23
iphone/Maps/Images.xcassets/CircularProgress/ic_download_press.imageset/Contents.json
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_download_press.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_download_press@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_download_press@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
BIN
iphone/Maps/Images.xcassets/CircularProgress/ic_download_press.imageset/ic_download_press.png
vendored
Normal file
After ![]() (image error) Size: 180 B |
BIN
iphone/Maps/Images.xcassets/CircularProgress/ic_download_press.imageset/ic_download_press@2x.png
vendored
Normal file
After ![]() (image error) Size: 274 B |
BIN
iphone/Maps/Images.xcassets/CircularProgress/ic_download_press.imageset/ic_download_press@3x.png
vendored
Normal file
After ![]() (image error) Size: 363 B |
Before ![]() (image error) Size: 134 B |
Before ![]() (image error) Size: 204 B |
Before ![]() (image error) Size: 261 B |
23
iphone/Maps/Images.xcassets/CircularProgress/ic_update.imageset/Contents.json
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_update.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_update@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_update@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
BIN
iphone/Maps/Images.xcassets/CircularProgress/ic_update.imageset/ic_update.png
vendored
Normal file
After ![]() (image error) Size: 554 B |