Repo created
This commit is contained in:
parent
4af19165ec
commit
68073add76
12458 changed files with 12350765 additions and 2 deletions
|
|
@ -0,0 +1,31 @@
|
|||
#import "MWMCircularProgressState.h"
|
||||
#import "MWMRouterType.h"
|
||||
|
||||
typedef NS_ENUM(NSInteger, MWMDrivingOptionsState) {
|
||||
MWMDrivingOptionsStateNone,
|
||||
MWMDrivingOptionsStateDefine,
|
||||
MWMDrivingOptionsStateChange
|
||||
};
|
||||
|
||||
@class MWMRoutePreview;
|
||||
|
||||
@protocol MWMRoutePreviewDelegate
|
||||
|
||||
- (void)routePreviewDidPressDrivingOptions:(MWMRoutePreview *)routePreview;
|
||||
|
||||
@end
|
||||
|
||||
@interface MWMRoutePreview : UIView
|
||||
|
||||
@property(nonatomic) MWMDrivingOptionsState drivingOptionsState;
|
||||
@property(weak, nonatomic) id<MWMRoutePreviewDelegate> delegate;
|
||||
|
||||
- (void)addToView:(UIView *)superview;
|
||||
- (void)remove;
|
||||
|
||||
- (void)statePrepare;
|
||||
- (void)selectRouter:(MWMRouterType)routerType;
|
||||
- (void)router:(MWMRouterType)routerType setState:(MWMCircularProgressState)state;
|
||||
- (void)router:(MWMRouterType)routerType setProgress:(CGFloat)progress;
|
||||
|
||||
@end
|
||||
|
|
@ -0,0 +1,215 @@
|
|||
#import "MWMRoutePreview.h"
|
||||
#import "MWMCircularProgress.h"
|
||||
#import "MWMLocationManager.h"
|
||||
#import "MWMRouter.h"
|
||||
#import "UIButton+Orientation.h"
|
||||
#import "UIImageView+Coloring.h"
|
||||
#import "SwiftBridge.h"
|
||||
|
||||
#include "platform/platform.hpp"
|
||||
|
||||
static CGFloat const kDrivingOptionsHeight = 48;
|
||||
|
||||
@interface MWMRoutePreview ()<MWMCircularProgressProtocol>
|
||||
|
||||
@property(nonatomic) BOOL isVisible;
|
||||
@property(nonatomic) BOOL actualVisibilityValue;
|
||||
@property(weak, nonatomic) IBOutlet UIButton * backButton;
|
||||
@property(weak, nonatomic) IBOutlet UIView * bicycle;
|
||||
@property(weak, nonatomic) IBOutlet UIView * contentView;
|
||||
@property(weak, nonatomic) IBOutlet UIView * pedestrian;
|
||||
@property(weak, nonatomic) IBOutlet UIView * publicTransport;
|
||||
@property(weak, nonatomic) IBOutlet UIView * ruler;
|
||||
@property(weak, nonatomic) IBOutlet UIView * vehicle;
|
||||
@property(strong, nonatomic) IBOutlet NSLayoutConstraint * drivingOptionHeightConstraint;
|
||||
@property(strong, nonatomic) IBOutlet UIButton * drivingOptionsButton;
|
||||
|
||||
@end
|
||||
|
||||
@implementation MWMRoutePreview
|
||||
{
|
||||
std::map<MWMRouterType, MWMCircularProgress *> m_progresses;
|
||||
}
|
||||
|
||||
- (void)awakeFromNib
|
||||
{
|
||||
[super awakeFromNib];
|
||||
self.actualVisibilityValue = NO;
|
||||
self.translatesAutoresizingMaskIntoConstraints = NO;
|
||||
[self setupProgresses];
|
||||
[self.backButton matchInterfaceOrientation];
|
||||
self.drivingOptionHeightConstraint.constant = -kDrivingOptionsHeight;
|
||||
[self applyContentViewShadow];
|
||||
}
|
||||
|
||||
- (void)applyContentViewShadow {
|
||||
self.contentView.layer.shadowOffset = CGSizeZero;
|
||||
self.contentView.layer.shadowRadius = 2.0;
|
||||
self.contentView.layer.shadowOpacity = 0.7;
|
||||
self.contentView.layer.shadowColor = UIColor.blackColor.CGColor;
|
||||
[self resizeShadow];
|
||||
}
|
||||
|
||||
- (void)layoutSubviews {
|
||||
[super layoutSubviews];
|
||||
[self.vehicle setNeedsLayout];
|
||||
[self resizeShadow];
|
||||
}
|
||||
|
||||
- (void)resizeShadow {
|
||||
CGFloat shadowSize = 1.0;
|
||||
CGRect contentFrame = self.contentView.bounds;
|
||||
CGRect shadowFrame = CGRectMake(contentFrame.origin.x - shadowSize,
|
||||
contentFrame.size.height,
|
||||
contentFrame.size.width + (2 * shadowSize),
|
||||
shadowSize);
|
||||
self.contentView.layer.shadowPath = [UIBezierPath bezierPathWithRect: shadowFrame].CGPath;
|
||||
}
|
||||
|
||||
- (void)setupProgresses
|
||||
{
|
||||
[self addProgress:self.vehicle imageName:@"ic_car" routerType:MWMRouterTypeVehicle];
|
||||
[self addProgress:self.pedestrian imageName:@"ic_pedestrian" routerType:MWMRouterTypePedestrian];
|
||||
[self addProgress:self.publicTransport
|
||||
imageName:@"ic_train"
|
||||
routerType:MWMRouterTypePublicTransport];
|
||||
[self addProgress:self.bicycle imageName:@"ic_bike" routerType:MWMRouterTypeBicycle];
|
||||
[self addProgress:self.ruler imageName:@"ic_ruler_route" routerType:MWMRouterTypeRuler];
|
||||
}
|
||||
|
||||
- (void)addProgress:(UIView *)parentView
|
||||
imageName:(NSString *)imageName
|
||||
routerType:(MWMRouterType)routerType
|
||||
{
|
||||
MWMCircularProgress * progress = [[MWMCircularProgress alloc] initWithParentView:parentView];
|
||||
MWMCircularProgressStateVec imageStates = @[@(MWMCircularProgressStateNormal),
|
||||
@(MWMCircularProgressStateProgress), @(MWMCircularProgressStateSpinner)];
|
||||
|
||||
[progress setImageName:imageName forStates:imageStates];
|
||||
[progress setImageName:[imageName stringByAppendingString:@"_selected"] forStates:@[@(MWMCircularProgressStateSelected), @(MWMCircularProgressStateCompleted)]];
|
||||
[progress setImageName:@"ic_error" forStates:@[@(MWMCircularProgressStateFailed)]];
|
||||
|
||||
[progress setColoring:MWMButtonColoringWhiteText
|
||||
forStates:@[@(MWMCircularProgressStateFailed), @(MWMCircularProgressStateSelected),
|
||||
@(MWMCircularProgressStateProgress), @(MWMCircularProgressStateSpinner),
|
||||
@(MWMCircularProgressStateCompleted)]];
|
||||
|
||||
[progress setSpinnerBackgroundColor:UIColor.clearColor];
|
||||
[progress setColor:UIColor.whiteColor
|
||||
forStates:@[@(MWMCircularProgressStateProgress), @(MWMCircularProgressStateSpinner)]];
|
||||
|
||||
progress.delegate = self;
|
||||
m_progresses[routerType] = progress;
|
||||
}
|
||||
|
||||
- (void)statePrepare
|
||||
{
|
||||
for (auto const & progress : m_progresses)
|
||||
progress.second.state = MWMCircularProgressStateNormal;
|
||||
}
|
||||
|
||||
- (void)selectRouter:(MWMRouterType)routerType
|
||||
{
|
||||
for (auto const & progress : m_progresses)
|
||||
progress.second.state = MWMCircularProgressStateNormal;
|
||||
m_progresses[routerType].state = MWMCircularProgressStateSelected;
|
||||
}
|
||||
|
||||
- (void)router:(MWMRouterType)routerType setState:(MWMCircularProgressState)state
|
||||
{
|
||||
m_progresses[routerType].state = state;
|
||||
}
|
||||
|
||||
- (void)router:(MWMRouterType)routerType setProgress:(CGFloat)progress
|
||||
{
|
||||
m_progresses[routerType].progress = progress;
|
||||
}
|
||||
|
||||
- (IBAction)onDrivingOptions:(UIButton *)sender {
|
||||
[self.delegate routePreviewDidPressDrivingOptions:self];
|
||||
}
|
||||
|
||||
#pragma mark - MWMCircularProgressProtocol
|
||||
|
||||
- (void)progressButtonPressed:(nonnull MWMCircularProgress *)progress
|
||||
{
|
||||
MWMCircularProgressState const s = progress.state;
|
||||
if (s == MWMCircularProgressStateSelected || s == MWMCircularProgressStateCompleted)
|
||||
return;
|
||||
|
||||
for (auto const & prg : m_progresses)
|
||||
{
|
||||
if (prg.second != progress)
|
||||
continue;
|
||||
auto const routerType = prg.first;
|
||||
if ([MWMRouter type] == routerType)
|
||||
return;
|
||||
[self selectRouter:routerType];
|
||||
[MWMRouter setType:routerType];
|
||||
[MWMRouter rebuildWithBestRouter:NO];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)addToView:(UIView *)superview
|
||||
{
|
||||
NSAssert(superview != nil, @"Superview can't be nil");
|
||||
if ([superview.subviews containsObject:self])
|
||||
return;
|
||||
[superview addSubview:self];
|
||||
[self setupConstraints];
|
||||
self.actualVisibilityValue = YES;
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
self.isVisible = YES;
|
||||
});
|
||||
}
|
||||
|
||||
- (void)remove {
|
||||
self.actualVisibilityValue = NO;
|
||||
self.isVisible = NO;
|
||||
}
|
||||
|
||||
- (void)setupConstraints {}
|
||||
|
||||
- (void)setDrivingOptionsState:(MWMDrivingOptionsState)state {
|
||||
_drivingOptionsState = state;
|
||||
[self layoutIfNeeded];
|
||||
self.drivingOptionHeightConstraint.constant =
|
||||
(state == MWMDrivingOptionsStateNone) ? -kDrivingOptionsHeight : 0;
|
||||
[UIView animateWithDuration:kDefaultAnimationDuration animations:^{
|
||||
[self layoutIfNeeded];
|
||||
}];
|
||||
|
||||
if (state == MWMDrivingOptionsStateDefine) {
|
||||
[self.drivingOptionsButton setImagePadding:0.0];
|
||||
[self.drivingOptionsButton setImage:nil
|
||||
forState:UIControlStateNormal];
|
||||
[self.drivingOptionsButton setTitle:L(@"define_to_avoid_btn").uppercaseString
|
||||
forState:UIControlStateNormal];
|
||||
} else if (state == MWMDrivingOptionsStateChange) {
|
||||
[self.drivingOptionsButton setImagePadding:5.0];
|
||||
[self.drivingOptionsButton setImage:[UIImage imageNamed:@"ic_options_warning"]
|
||||
forState:UIControlStateNormal];
|
||||
[self.drivingOptionsButton setTitle:L(@"change_driving_options_btn").uppercaseString
|
||||
forState:UIControlStateNormal];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Properties
|
||||
|
||||
- (void)setIsVisible:(BOOL)isVisible
|
||||
{
|
||||
if (isVisible != self.actualVisibilityValue) { return; }
|
||||
_isVisible = isVisible;
|
||||
auto sv = self.superview;
|
||||
[sv setNeedsLayout];
|
||||
[UIView animateWithDuration:kDefaultAnimationDuration
|
||||
animations:^{
|
||||
[sv layoutIfNeeded];
|
||||
}
|
||||
completion:^(BOOL finished) {
|
||||
if (!self.isVisible)
|
||||
[self removeFromSuperview];
|
||||
}];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
#import "MWMRoutePreview.h"
|
||||
|
||||
@interface MWMiPadRoutePreview : MWMRoutePreview
|
||||
|
||||
@end
|
||||
|
|
@ -0,0 +1,97 @@
|
|||
#import "MWMiPadRoutePreview.h"
|
||||
#import "MWMRouter.h"
|
||||
#import "MWMAvailableAreaAffectDirection.h"
|
||||
|
||||
@interface MWMRoutePreview ()
|
||||
|
||||
@property(nonatomic) BOOL isVisible;
|
||||
|
||||
@end
|
||||
|
||||
@interface MWMiPadRoutePreview ()
|
||||
@property(nonatomic) NSLayoutConstraint * horizontalConstraint;
|
||||
@end
|
||||
|
||||
@implementation MWMiPadRoutePreview
|
||||
|
||||
- (void)setupConstraints
|
||||
{
|
||||
UIView * sv = self.superview;
|
||||
if (sv)
|
||||
{
|
||||
[self.topAnchor constraintEqualToAnchor:sv.topAnchor].active = YES;
|
||||
[self.bottomAnchor constraintEqualToAnchor:sv.bottomAnchor].active = YES;
|
||||
self.horizontalConstraint = [self.trailingAnchor constraintEqualToAnchor:sv.leadingAnchor];
|
||||
self.horizontalConstraint.active = YES;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setIsVisible:(BOOL)isVisible
|
||||
{
|
||||
self.horizontalConstraint.active = NO;
|
||||
UIView * sv = self.superview;
|
||||
if (sv)
|
||||
{
|
||||
NSLayoutXAxisAnchor * selfAnchor = isVisible ? self.leadingAnchor : self.trailingAnchor;
|
||||
self.horizontalConstraint = [selfAnchor constraintEqualToAnchor:sv.leadingAnchor];
|
||||
self.horizontalConstraint.active = YES;
|
||||
}
|
||||
[super setIsVisible:isVisible];
|
||||
}
|
||||
|
||||
#pragma mark - SolidTouchView
|
||||
|
||||
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {}
|
||||
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {}
|
||||
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {}
|
||||
- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event {}
|
||||
#pragma mark - AvailableArea / VisibleArea
|
||||
|
||||
- (MWMAvailableAreaAffectDirections)visibleAreaAffectDirections
|
||||
{
|
||||
return MWMAvailableAreaAffectDirectionsLeft;
|
||||
}
|
||||
|
||||
#pragma mark - AvailableArea / PlacePageArea
|
||||
|
||||
- (MWMAvailableAreaAffectDirections)placePageAreaAffectDirections
|
||||
{
|
||||
return MWMAvailableAreaAffectDirectionsLeft;
|
||||
}
|
||||
|
||||
#pragma mark - AvailableArea / WidgetsArea
|
||||
|
||||
- (MWMAvailableAreaAffectDirections)widgetsAreaAffectDirections
|
||||
{
|
||||
return MWMAvailableAreaAffectDirectionsLeft;
|
||||
}
|
||||
|
||||
#pragma mark - AvailableArea / SideButtonsArea
|
||||
|
||||
- (MWMAvailableAreaAffectDirections)sideButtonsAreaAffectDirections
|
||||
{
|
||||
return MWMAvailableAreaAffectDirectionsLeft;
|
||||
}
|
||||
|
||||
#pragma mark - AvailableArea / TrafficButtonArea
|
||||
|
||||
- (MWMAvailableAreaAffectDirections)trafficButtonAreaAffectDirections
|
||||
{
|
||||
return MWMAvailableAreaAffectDirectionsLeft;
|
||||
}
|
||||
|
||||
#pragma mark - AvailableArea / NavigationInfoArea
|
||||
|
||||
- (MWMAvailableAreaAffectDirections)navigationInfoAreaAffectDirections
|
||||
{
|
||||
return MWMAvailableAreaAffectDirectionsLeft;
|
||||
}
|
||||
|
||||
#pragma mark - AvailableArea / TrackRecordingButtonArea
|
||||
|
||||
- (MWMAvailableAreaAffectDirections)trackRecordingButtonAreaAffectDirections
|
||||
{
|
||||
return MWMAvailableAreaAffectDirectionsRight;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
@ -0,0 +1,469 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23727" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23721"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="MWMNavigationDashboardManager">
|
||||
<connections>
|
||||
<outlet property="baseRoutePreviewStatus" destination="87p-Qg-8f3" id="ddh-nm-Ux9"/>
|
||||
<outlet property="goButtonsContainer" destination="gcR-zj-b7P" id="RuF-Qu-ahX"/>
|
||||
<outlet property="routePreview" destination="u2u-Vb-2eH" id="VZw-5q-2P6"/>
|
||||
<outlet property="showRouteManagerButton" destination="NAs-km-8uw" id="pJx-0l-Skz"/>
|
||||
<outlet property="transportRoutePreviewStatus" destination="FXb-tH-ZTF" id="P0g-ys-6wW"/>
|
||||
<outletCollection property="goButtons" destination="4IJ-pR-Ztp" id="ePc-jh-SfE"/>
|
||||
</connections>
|
||||
</placeholder>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="u2u-Vb-2eH" customClass="MWMiPadRoutePreview">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3zr-me-gbI">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="20"/>
|
||||
<color key="backgroundColor" red="0.12156862745098039" green="0.59999999999999998" blue="0.32156862745098036" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="20" id="0AS-cy-xIW"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="PrimaryBackground"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="l7E-Ns-2Nn" userLabel="Options View">
|
||||
<rect key="frame" x="0.0" y="68" width="320" height="48"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Opi-yT-xIZ">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="48"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="12"/>
|
||||
<state key="normal" title="DEFINE ROADS TO AVOID" image="ic_options_warning"/>
|
||||
<connections>
|
||||
<action selector="onDrivingOptions:" destination="u2u-Vb-2eH" eventType="touchUpInside" id="x2p-AW-91V"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<viewLayoutGuide key="safeArea" id="THL-V3-3xS"/>
|
||||
<color key="backgroundColor" red="0.1215686275" green="0.59999999999999998" blue="0.32156862749999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="Opi-yT-xIZ" firstAttribute="centerX" secondItem="l7E-Ns-2Nn" secondAttribute="centerX" id="5DK-9d-8qb"/>
|
||||
<constraint firstItem="Opi-yT-xIZ" firstAttribute="centerY" secondItem="l7E-Ns-2Nn" secondAttribute="centerY" id="JFn-Vg-Wby"/>
|
||||
<constraint firstItem="THL-V3-3xS" firstAttribute="bottom" secondItem="Opi-yT-xIZ" secondAttribute="bottom" id="LbO-Ze-Pwl"/>
|
||||
<constraint firstItem="Opi-yT-xIZ" firstAttribute="top" secondItem="THL-V3-3xS" secondAttribute="top" id="OnE-Yh-Inw"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Opi-yT-xIZ" secondAttribute="trailing" id="aCy-jn-U2B"/>
|
||||
<constraint firstAttribute="height" constant="48" id="mCi-1V-xX4"/>
|
||||
<constraint firstItem="Opi-yT-xIZ" firstAttribute="leading" secondItem="l7E-Ns-2Nn" secondAttribute="leading" id="vdk-Ef-Kk1"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="SecondaryBackground"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3s2-BV-X5i" customClass="SolidTouchView">
|
||||
<rect key="frame" x="0.0" y="20" width="320" height="48"/>
|
||||
<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="48" height="48"/>
|
||||
<accessibility key="accessibilityConfiguration" identifier="goBackButton"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" secondItem="a4n-5I-PN3" secondAttribute="height" multiplier="1:1" id="eKl-2V-DBC"/>
|
||||
</constraints>
|
||||
<state key="normal" image="ic_nav_bar_back"/>
|
||||
<connections>
|
||||
<action selector="stopRoutingButtonAction" destination="-1" eventType="touchUpInside" id="TRy-DB-zyD"/>
|
||||
</connections>
|
||||
</button>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="sXu-tl-a0m" userLabel="Buttons Box">
|
||||
<rect key="frame" x="62" y="4" width="196" height="40"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="jDl-pu-eov">
|
||||
<rect key="frame" x="6" y="0.0" width="40" height="40"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<accessibility key="accessibilityConfiguration" identifier="routeAuto"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="40" id="1qk-1F-lIB"/>
|
||||
<constraint firstAttribute="width" secondItem="jDl-pu-eov" secondAttribute="height" multiplier="1:1" id="Yqu-oc-yrg"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="VhE-hA-Leo">
|
||||
<rect key="frame" x="54" y="0.0" width="40" height="40"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<accessibility key="accessibilityConfiguration" identifier="routePedestrian"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" secondItem="VhE-hA-Leo" secondAttribute="height" multiplier="1:1" id="6lS-2K-Gki"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Eu3-bT-Dom">
|
||||
<rect key="frame" x="102" y="0.0" width="40" height="40"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<accessibility key="accessibilityConfiguration" identifier="routeAuto"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" secondItem="Eu3-bT-Dom" secondAttribute="height" multiplier="1:1" id="iam-D8-1uB"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yiM-fM-sSS" userLabel="Bicycle">
|
||||
<rect key="frame" x="150" y="0.0" width="40" height="40"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<accessibility key="accessibilityConfiguration" identifier="routeBicycle"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" secondItem="yiM-fM-sSS" secondAttribute="height" multiplier="1:1" id="1N1-y5-Mwc"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="f6i-lw-K3R" userLabel="Ruler">
|
||||
<rect key="frame" x="198" y="0.0" width="40" height="40"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<accessibility key="accessibilityConfiguration" identifier="routeRuler"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" secondItem="f6i-lw-K3R" secondAttribute="height" multiplier="1:1" id="iex-7v-w3k"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="yiM-fM-sSS" secondAttribute="trailing" priority="750" constant="6" id="5D1-qi-hgK"/>
|
||||
<constraint firstItem="VhE-hA-Leo" firstAttribute="leading" secondItem="jDl-pu-eov" secondAttribute="trailing" constant="8" id="7Gp-G4-bFf"/>
|
||||
<constraint firstItem="f6i-lw-K3R" firstAttribute="top" secondItem="sXu-tl-a0m" secondAttribute="top" id="BWr-hr-pwo"/>
|
||||
<constraint firstAttribute="trailing" secondItem="f6i-lw-K3R" secondAttribute="trailing" constant="6" id="Cd3-ev-uFS"/>
|
||||
<constraint firstItem="Eu3-bT-Dom" firstAttribute="top" secondItem="sXu-tl-a0m" secondAttribute="top" id="EzA-7U-VtV"/>
|
||||
<constraint firstAttribute="bottom" secondItem="jDl-pu-eov" secondAttribute="bottom" id="GaQ-fH-vHQ"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Eu3-bT-Dom" secondAttribute="bottom" id="TKM-OQ-dSV"/>
|
||||
<constraint firstItem="f6i-lw-K3R" firstAttribute="leading" secondItem="yiM-fM-sSS" secondAttribute="trailing" constant="8" id="Zs5-bj-AR6"/>
|
||||
<constraint firstItem="Eu3-bT-Dom" firstAttribute="leading" secondItem="VhE-hA-Leo" secondAttribute="trailing" constant="8" id="a29-bx-wGD"/>
|
||||
<constraint firstItem="jDl-pu-eov" firstAttribute="leading" secondItem="sXu-tl-a0m" secondAttribute="leading" constant="6" id="kNf-mc-JqH"/>
|
||||
<constraint firstAttribute="bottom" secondItem="yiM-fM-sSS" secondAttribute="bottom" id="mYY-Hb-4eW"/>
|
||||
<constraint firstItem="yiM-fM-sSS" firstAttribute="leading" secondItem="Eu3-bT-Dom" secondAttribute="trailing" constant="8" id="obj-Bs-U8h"/>
|
||||
<constraint firstItem="yiM-fM-sSS" firstAttribute="top" secondItem="sXu-tl-a0m" secondAttribute="top" id="pRA-lu-I23"/>
|
||||
<constraint firstItem="VhE-hA-Leo" firstAttribute="top" secondItem="sXu-tl-a0m" secondAttribute="top" id="pt4-Mg-zye"/>
|
||||
<constraint firstAttribute="bottom" secondItem="f6i-lw-K3R" secondAttribute="bottom" id="qTV-BL-cX4"/>
|
||||
<constraint firstAttribute="bottom" secondItem="VhE-hA-Leo" secondAttribute="bottom" id="scR-oW-NgF"/>
|
||||
<constraint firstItem="jDl-pu-eov" firstAttribute="top" secondItem="sXu-tl-a0m" secondAttribute="top" id="sf1-S5-kmZ"/>
|
||||
</constraints>
|
||||
<variation key="default">
|
||||
<mask key="constraints">
|
||||
<exclude reference="Cd3-ev-uFS"/>
|
||||
<exclude reference="qTV-BL-cX4"/>
|
||||
<exclude reference="BWr-hr-pwo"/>
|
||||
<exclude reference="Zs5-bj-AR6"/>
|
||||
</mask>
|
||||
</variation>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.1215686275" green="0.59999999999999998" blue="0.32156862749999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="sXu-tl-a0m" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="a4n-5I-PN3" secondAttribute="trailing" constant="4" id="2EB-6T-LIW"/>
|
||||
<constraint firstAttribute="width" constant="320" id="80z-it-OLr"/>
|
||||
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="sXu-tl-a0m" secondAttribute="trailing" constant="4" id="Hj0-Nl-uaa"/>
|
||||
<constraint firstAttribute="bottom" secondItem="a4n-5I-PN3" secondAttribute="bottom" id="J5F-jB-qyT"/>
|
||||
<constraint firstItem="sXu-tl-a0m" firstAttribute="centerX" secondItem="3s2-BV-X5i" secondAttribute="centerX" priority="750" id="OeL-MY-Mn5"/>
|
||||
<constraint firstItem="sXu-tl-a0m" firstAttribute="top" secondItem="3s2-BV-X5i" secondAttribute="top" constant="4" id="Q5o-OR-FCh"/>
|
||||
<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="bottom" secondItem="sXu-tl-a0m" secondAttribute="bottom" constant="4" id="wEf-uh-sfy"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="PrimaryBackground"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="87p-Qg-8f3" customClass="MWMBaseRoutePreviewStatus">
|
||||
<rect key="frame" x="0.0" y="152" width="320" height="180"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="QEP-6s-YTM" userLabel="Error Box">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="64"/>
|
||||
<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="120" y="22" width="80" height="20"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" red="0.95686274510000002" green="0.26274509800000001" blue="0.21176470589999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="routing_planning_error"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="regular17:redText"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="64" id="DuS-FX-e47"/>
|
||||
<constraint firstItem="VNi-4g-9gz" firstAttribute="centerY" secondItem="QEP-6s-YTM" secondAttribute="centerY" id="bfa-sc-ifi"/>
|
||||
<constraint firstItem="VNi-4g-9gz" firstAttribute="centerX" secondItem="QEP-6s-YTM" secondAttribute="centerX" id="iKJ-3u-Al9"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Rqr-bu-crx" userLabel="Results Box">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="64"/>
|
||||
<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="16" y="14" width="248" height="20"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.54000000000000004" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="regular17:blackSecondaryText"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Arrive at 12:24" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="oec-Ee-6ha">
|
||||
<rect key="frame" x="16" y="38" width="248" height="17"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.54000000000000004" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="medium14:blackSecondaryText"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="oec-Ee-6ha" firstAttribute="leading" secondItem="zml-eW-DsI" secondAttribute="leading" id="Am2-25-Zn9"/>
|
||||
<constraint firstItem="zml-eW-DsI" firstAttribute="leading" secondItem="Rqr-bu-crx" secondAttribute="leading" constant="16" id="QNo-az-LlD"/>
|
||||
<constraint firstAttribute="height" constant="64" id="bHW-iR-rAA"/>
|
||||
<constraint firstItem="zml-eW-DsI" firstAttribute="top" secondItem="Rqr-bu-crx" secondAttribute="top" constant="14" id="c1k-EY-nwQ"/>
|
||||
<constraint firstItem="oec-Ee-6ha" firstAttribute="top" secondItem="zml-eW-DsI" secondAttribute="bottom" constant="4" id="lV9-S0-yy4"/>
|
||||
<constraint firstItem="oec-Ee-6ha" firstAttribute="trailing" secondItem="zml-eW-DsI" secondAttribute="trailing" id="rfO-2Z-g12"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="6iM-A6-4JK" userLabel="Height Box">
|
||||
<rect key="frame" x="0.0" y="64" width="320" height="68"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="rXP-rM-9cx">
|
||||
<rect key="frame" x="268" y="-48.5" width="36" height="17"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="260" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JtS-om-arD">
|
||||
<rect key="frame" x="0.0" y="0.0" width="36" height="17"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="medium14:linkBlueText"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="JtS-om-arD" firstAttribute="leading" secondItem="rXP-rM-9cx" secondAttribute="leading" id="6FT-YG-m3k"/>
|
||||
<constraint firstAttribute="bottom" secondItem="JtS-om-arD" secondAttribute="bottom" id="B8p-TU-ROs"/>
|
||||
<constraint firstAttribute="trailing" secondItem="JtS-om-arD" secondAttribute="trailing" id="CK8-gu-qaf"/>
|
||||
<constraint firstItem="JtS-om-arD" firstAttribute="top" secondItem="rXP-rM-9cx" secondAttribute="top" id="szb-xc-aoe"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Apa-nH-KWJ">
|
||||
<rect key="frame" x="16" y="14" width="288" height="40"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="zhI-92-6JG">
|
||||
<rect key="frame" x="0.0" y="0.0" width="288" height="40"/>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="zhI-92-6JG" firstAttribute="top" secondItem="Apa-nH-KWJ" secondAttribute="top" id="7CP-bg-Id3"/>
|
||||
<constraint firstAttribute="bottom" secondItem="zhI-92-6JG" secondAttribute="bottom" id="LeB-Rl-mPU"/>
|
||||
<constraint firstItem="zhI-92-6JG" firstAttribute="leading" secondItem="Apa-nH-KWJ" secondAttribute="leading" id="OuL-Na-mKo"/>
|
||||
<constraint firstAttribute="trailing" secondItem="zhI-92-6JG" secondAttribute="trailing" id="y82-L8-vTL"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="Apa-nH-KWJ" secondAttribute="bottom" constant="14" id="8P4-RM-XZb"/>
|
||||
<constraint firstAttribute="height" constant="68" id="Fl4-Tb-OER"/>
|
||||
<constraint firstItem="Apa-nH-KWJ" firstAttribute="top" secondItem="6iM-A6-4JK" secondAttribute="top" constant="14" id="TNG-pv-uE8"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Apa-nH-KWJ" secondAttribute="trailing" constant="16" id="XSN-g6-2W4"/>
|
||||
<constraint firstItem="Apa-nH-KWJ" firstAttribute="leading" secondItem="6iM-A6-4JK" secondAttribute="leading" constant="16" id="cR5-Kq-pEJ"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="EY6-SY-ner">
|
||||
<rect key="frame" x="0.0" y="132" width="320" height="48"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="LyQ-pQ-XyG">
|
||||
<rect key="frame" x="16" y="0.0" width="304" height="1"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="1" id="ZFh-zw-f9W"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="Divider"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="NAs-km-8uw">
|
||||
<rect key="frame" x="20" y="12" width="119" height="24"/>
|
||||
<state key="normal" title="ManageRoute" image="ic_24px_manager"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="medium14:MWMBlack"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="showRouteManager" destination="-1" eventType="touchUpInside" id="eOk-zR-QEb"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="LyQ-pQ-XyG" secondAttribute="trailing" id="Inl-w6-cF4"/>
|
||||
<constraint firstAttribute="height" constant="48" id="akp-Zy-mlV"/>
|
||||
<constraint firstItem="LyQ-pQ-XyG" firstAttribute="top" secondItem="EY6-SY-ner" secondAttribute="top" id="cox-ec-1O6"/>
|
||||
<constraint firstItem="NAs-km-8uw" firstAttribute="leading" secondItem="EY6-SY-ner" secondAttribute="leading" constant="20" id="dQV-wI-Rs3"/>
|
||||
<constraint firstItem="NAs-km-8uw" firstAttribute="centerY" secondItem="EY6-SY-ner" secondAttribute="centerY" id="f3q-59-sF0"/>
|
||||
<constraint firstItem="LyQ-pQ-XyG" firstAttribute="leading" secondItem="EY6-SY-ner" secondAttribute="leading" constant="16" id="fSG-dw-XFn"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" priority="100" constant="64" id="4qT-ha-p75"/>
|
||||
<constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="Rqr-bu-crx" secondAttribute="bottom" id="82W-n1-9wJ"/>
|
||||
<constraint firstItem="EY6-SY-ner" firstAttribute="top" relation="greaterThanOrEqual" secondItem="Rqr-bu-crx" secondAttribute="bottom" id="8we-Hd-BFi"/>
|
||||
<constraint firstItem="EY6-SY-ner" firstAttribute="top" secondItem="87p-Qg-8f3" secondAttribute="top" priority="100" id="DLg-g3-d3N"/>
|
||||
<constraint firstItem="Rqr-bu-crx" firstAttribute="leading" secondItem="87p-Qg-8f3" secondAttribute="leading" id="Fkj-U2-xyQ"/>
|
||||
<constraint firstItem="6iM-A6-4JK" firstAttribute="top" secondItem="Rqr-bu-crx" secondAttribute="bottom" id="HfZ-Ca-Mmj"/>
|
||||
<constraint firstItem="QEP-6s-YTM" firstAttribute="top" secondItem="87p-Qg-8f3" secondAttribute="top" id="LrP-YM-0DL"/>
|
||||
<constraint firstItem="Rqr-bu-crx" firstAttribute="top" secondItem="87p-Qg-8f3" secondAttribute="top" id="N7H-ZL-K7y"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Rqr-bu-crx" secondAttribute="trailing" id="QH4-pv-oKn"/>
|
||||
<constraint firstAttribute="trailing" secondItem="QEP-6s-YTM" secondAttribute="trailing" id="QOg-C7-dgi"/>
|
||||
<constraint firstItem="rXP-rM-9cx" firstAttribute="centerY" secondItem="zml-eW-DsI" secondAttribute="centerY" id="SAf-Qy-9uj"/>
|
||||
<constraint firstItem="EY6-SY-ner" firstAttribute="top" relation="greaterThanOrEqual" secondItem="6iM-A6-4JK" secondAttribute="bottom" id="Szo-VK-580"/>
|
||||
<constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="6iM-A6-4JK" secondAttribute="bottom" id="a6M-h3-DzB"/>
|
||||
<constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="QEP-6s-YTM" secondAttribute="bottom" id="c3U-eM-8ig"/>
|
||||
<constraint firstItem="rXP-rM-9cx" firstAttribute="leading" secondItem="zml-eW-DsI" secondAttribute="trailing" constant="4" id="fqI-7g-oBJ"/>
|
||||
<constraint firstItem="EY6-SY-ner" firstAttribute="leading" secondItem="87p-Qg-8f3" secondAttribute="leading" id="iIn-NA-fpZ"/>
|
||||
<constraint firstAttribute="trailing" secondItem="6iM-A6-4JK" secondAttribute="trailing" id="kek-Gu-EN2"/>
|
||||
<constraint firstItem="Rqr-bu-crx" firstAttribute="trailing" secondItem="rXP-rM-9cx" secondAttribute="trailing" constant="16" id="mHh-IV-b00"/>
|
||||
<constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="EY6-SY-ner" secondAttribute="bottom" id="n6D-xw-Kge"/>
|
||||
<constraint firstItem="6iM-A6-4JK" firstAttribute="leading" secondItem="87p-Qg-8f3" secondAttribute="leading" id="oeU-OH-ezY"/>
|
||||
<constraint firstAttribute="trailing" secondItem="EY6-SY-ner" secondAttribute="trailing" id="u9T-89-RZi"/>
|
||||
<constraint firstItem="QEP-6s-YTM" firstAttribute="leading" secondItem="87p-Qg-8f3" secondAttribute="leading" id="x6v-27-R7O"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="RouteBasePreview"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<outlet property="arriveLabel" destination="oec-Ee-6ha" id="FLF-8X-PAf"/>
|
||||
<outlet property="errorBox" destination="QEP-6s-YTM" id="cV6-hZ-IMv"/>
|
||||
<outlet property="errorBoxBottom" destination="c3U-eM-8ig" id="oyN-uq-qC5"/>
|
||||
<outlet property="errorLabel" destination="VNi-4g-9gz" id="BPc-Ib-vTt"/>
|
||||
<outlet property="heightBox" destination="6iM-A6-4JK" id="pYC-Jp-UQT"/>
|
||||
<outlet property="heightBoxBottom" destination="a6M-h3-DzB" id="qEw-fx-cle"/>
|
||||
<outlet property="heightBoxBottomManageRouteBoxTop" destination="Szo-VK-580" id="niN-mR-8WR"/>
|
||||
<outlet property="heightProfileElevationHeight" destination="JtS-om-arD" id="a8J-z7-RsP"/>
|
||||
<outlet property="heightProfileImage" destination="zhI-92-6JG" id="MKv-4F-F9A"/>
|
||||
<outlet property="manageRouteBox" destination="EY6-SY-ner" id="Yhf-jH-avh"/>
|
||||
<outlet property="manageRouteBoxBottom" destination="n6D-xw-Kge" id="07u-YL-OU1"/>
|
||||
<outlet property="manageRouteButtonRegular" destination="NAs-km-8uw" id="nTT-uS-9ud"/>
|
||||
<outlet property="resultLabel" destination="zml-eW-DsI" id="lP5-pC-IIe"/>
|
||||
<outlet property="resultsBox" destination="Rqr-bu-crx" id="iaF-Im-C5p"/>
|
||||
<outlet property="resultsBoxBottom" destination="82W-n1-9wJ" id="RLp-VX-RD7"/>
|
||||
</connections>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="FXb-tH-ZTF" customClass="MWMTransportRoutePreviewStatus">
|
||||
<rect key="frame" x="0.0" y="152" width="320" height="80"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tuZ-25-ltG">
|
||||
<rect key="frame" x="16" y="12" width="42" height="20"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<collectionView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" ambiguous="YES" alwaysBounceVertical="YES" alwaysBounceHorizontal="YES" scrollEnabled="NO" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" delaysContentTouches="NO" canCancelContentTouches="NO" bouncesZoom="NO" dataMode="none" prefetchingEnabled="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8Ey-lL-uzF" customClass="TransportTransitStepsCollectionView" customModule="CoMaps" customModuleProvider="target">
|
||||
<rect key="frame" x="16" y="44" width="288" height="20"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="20" id="4NI-xp-o3L"/>
|
||||
</constraints>
|
||||
<collectionViewLayout key="collectionViewLayout" id="PJv-Hi-Xu3" customClass="TransportTransitFlowLayout" customModule="CoMaps" customModuleProvider="target"/>
|
||||
</collectionView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="tuZ-25-ltG" firstAttribute="top" secondItem="FXb-tH-ZTF" secondAttribute="top" constant="12" id="1Aj-rm-MMr"/>
|
||||
<constraint firstItem="8Ey-lL-uzF" firstAttribute="top" secondItem="tuZ-25-ltG" secondAttribute="bottom" constant="12" id="CKR-P5-B2a"/>
|
||||
<constraint firstItem="tuZ-25-ltG" firstAttribute="leading" secondItem="FXb-tH-ZTF" secondAttribute="leading" constant="16" id="GJC-Gt-255"/>
|
||||
<constraint firstAttribute="bottom" secondItem="8Ey-lL-uzF" secondAttribute="bottom" constant="16" id="KxL-xf-eVL"/>
|
||||
<constraint firstAttribute="trailing" secondItem="8Ey-lL-uzF" secondAttribute="trailing" constant="16" id="ejR-Po-Dxm"/>
|
||||
<constraint firstItem="8Ey-lL-uzF" firstAttribute="leading" secondItem="tuZ-25-ltG" secondAttribute="leading" id="gkU-xQ-hb2"/>
|
||||
<constraint firstAttribute="height" relation="greaterThanOrEqual" priority="100" constant="40" id="lLi-5o-PDI"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="RouteBasePreview"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<outlet property="etaLabel" destination="tuZ-25-ltG" id="Rwo-UC-mvq"/>
|
||||
<outlet property="stepsCollectionView" destination="8Ey-lL-uzF" id="qrI-Cw-rAJ"/>
|
||||
<outlet property="stepsCollectionViewHeight" destination="4NI-xp-o3L" id="Z11-UU-Mca"/>
|
||||
</connections>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="gcR-zj-b7P">
|
||||
<rect key="frame" x="0.0" y="619" width="320" height="48"/>
|
||||
<subviews>
|
||||
<button hidden="YES" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="tailTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="4IJ-pR-Ztp" userLabel="Go" customClass="MWMRouteStartButton">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="48"/>
|
||||
<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="custom" customColorSpace="sRGB"/>
|
||||
</state>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="FlatNormalButtonBig"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="p2p_start"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="routingStartTouchUpInside" destination="-1" eventType="touchUpInside" id="S0p-CT-EfI"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="0.80000000000000004" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="48" id="5GN-4g-vV1"/>
|
||||
<constraint firstAttribute="trailing" secondItem="4IJ-pR-Ztp" secondAttribute="trailing" id="ML1-Xc-dlH"/>
|
||||
<constraint firstItem="4IJ-pR-Ztp" firstAttribute="top" secondItem="gcR-zj-b7P" secondAttribute="top" id="O3s-Ji-gI9"/>
|
||||
<constraint firstItem="4IJ-pR-Ztp" firstAttribute="leading" secondItem="gcR-zj-b7P" secondAttribute="leading" id="VKp-pp-FKT"/>
|
||||
<constraint firstAttribute="bottom" secondItem="4IJ-pR-Ztp" secondAttribute="bottom" id="iof-B4-bI3"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="RouteBasePreview"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
</subviews>
|
||||
<viewLayoutGuide key="safeArea" id="rhh-dY-ZHT"/>
|
||||
<color key="backgroundColor" red="0.96078431372549022" green="0.96078431372549022" blue="0.96078431372549022" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<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="3zr-me-gbI" secondAttribute="bottom" id="6c0-tH-qlJ"/>
|
||||
<constraint firstItem="87p-Qg-8f3" firstAttribute="top" secondItem="l7E-Ns-2Nn" secondAttribute="bottom" constant="36" id="8nt-tf-wyq"/>
|
||||
<constraint firstItem="FXb-tH-ZTF" firstAttribute="top" secondItem="l7E-Ns-2Nn" secondAttribute="bottom" constant="36" id="9Bz-NL-px6"/>
|
||||
<constraint firstItem="87p-Qg-8f3" firstAttribute="leading" secondItem="u2u-Vb-2eH" secondAttribute="leading" id="9bA-9R-pwq"/>
|
||||
<constraint firstItem="l7E-Ns-2Nn" firstAttribute="leading" secondItem="3s2-BV-X5i" secondAttribute="leading" id="By5-zt-x6R"/>
|
||||
<constraint firstItem="l7E-Ns-2Nn" firstAttribute="top" secondItem="3s2-BV-X5i" secondAttribute="bottom" id="Cgo-cU-dTy"/>
|
||||
<constraint firstItem="FXb-tH-ZTF" firstAttribute="leading" secondItem="u2u-Vb-2eH" secondAttribute="leading" id="Mmr-RH-iDm"/>
|
||||
<constraint firstAttribute="trailing" secondItem="3zr-me-gbI" secondAttribute="trailing" id="OZ2-dP-mna"/>
|
||||
<constraint firstAttribute="bottom" secondItem="gcR-zj-b7P" secondAttribute="bottom" id="QYs-r4-Jyl"/>
|
||||
<constraint firstItem="l7E-Ns-2Nn" firstAttribute="trailing" secondItem="3s2-BV-X5i" secondAttribute="trailing" id="YI5-Hs-HZl"/>
|
||||
<constraint firstItem="3s2-BV-X5i" firstAttribute="leading" secondItem="u2u-Vb-2eH" secondAttribute="leading" id="e90-R4-YQR"/>
|
||||
<constraint firstItem="3zr-me-gbI" firstAttribute="top" secondItem="u2u-Vb-2eH" secondAttribute="top" id="hE5-50-mMA"/>
|
||||
<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 firstAttribute="trailing" secondItem="FXb-tH-ZTF" secondAttribute="trailing" id="sFK-Dz-Ta2"/>
|
||||
<constraint firstItem="3zr-me-gbI" firstAttribute="leading" secondItem="u2u-Vb-2eH" secondAttribute="leading" id="xgY-7G-jgv"/>
|
||||
</constraints>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="RoutePreview"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<outlet property="backButton" destination="a4n-5I-PN3" id="42W-5B-Z8i"/>
|
||||
<outlet property="bicycle" destination="yiM-fM-sSS" id="pMf-6J-9Gd"/>
|
||||
<outlet property="contentView" destination="3s2-BV-X5i" id="mp7-Qq-drU"/>
|
||||
<outlet property="drivingOptionHeightConstraint" destination="Cgo-cU-dTy" id="GVj-A8-kR1"/>
|
||||
<outlet property="drivingOptionsButton" destination="Opi-yT-xIZ" id="tMG-Af-HEo"/>
|
||||
<outlet property="pedestrian" destination="VhE-hA-Leo" id="R3O-th-Jw0"/>
|
||||
<outlet property="publicTransport" destination="Eu3-bT-Dom" id="XNh-uW-Kog"/>
|
||||
<outlet property="ruler" destination="f6i-lw-K3R" id="s0G-le-Kbz"/>
|
||||
<outlet property="vehicle" destination="jDl-pu-eov" id="awM-KI-2xO"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="448" y="573.46326836581716"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="ic_24px_manager" width="24" height="24"/>
|
||||
<image name="ic_nav_bar_back" width="14" height="22"/>
|
||||
<image name="ic_options_warning" width="24" height="24"/>
|
||||
</resources>
|
||||
</document>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
#import "MWMRoutePreview.h"
|
||||
|
||||
@interface MWMiPhoneRoutePreview : MWMRoutePreview
|
||||
|
||||
@end
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
#import "MWMiPhoneRoutePreview.h"
|
||||
#import "MWMAvailableAreaAffectDirection.h"
|
||||
|
||||
@interface MWMRoutePreview ()
|
||||
|
||||
@property(nonatomic) BOOL isVisible;
|
||||
|
||||
@end
|
||||
|
||||
@interface MWMiPhoneRoutePreview ()
|
||||
@property(weak, nonatomic) IBOutlet UIButton * backButton;
|
||||
@property(nonatomic) NSLayoutConstraint * verticalConstraint;
|
||||
@end
|
||||
|
||||
@implementation MWMiPhoneRoutePreview
|
||||
|
||||
- (void)setupConstraints
|
||||
{
|
||||
UIView * sv = self.superview;
|
||||
[self.leadingAnchor constraintEqualToAnchor:sv.leadingAnchor].active = YES;
|
||||
[self.trailingAnchor constraintEqualToAnchor:sv.trailingAnchor].active = YES;
|
||||
self.verticalConstraint = [self.bottomAnchor constraintEqualToAnchor:sv.topAnchor];
|
||||
self.verticalConstraint.active = YES;
|
||||
|
||||
NSLayoutXAxisAnchor * backLeadingAnchor = sv.leadingAnchor;
|
||||
backLeadingAnchor = sv.safeAreaLayoutGuide.leadingAnchor;
|
||||
[self.backButton.leadingAnchor constraintEqualToAnchor:backLeadingAnchor].active = YES;
|
||||
|
||||
[sv layoutIfNeeded];
|
||||
}
|
||||
|
||||
- (void)setIsVisible:(BOOL)isVisible
|
||||
{
|
||||
UIView * sv = self.superview;
|
||||
if (!sv)
|
||||
return;
|
||||
self.verticalConstraint.active = NO;
|
||||
NSLayoutYAxisAnchor * topAnchor = sv.topAnchor;
|
||||
NSLayoutYAxisAnchor * selfAnchor = isVisible ? self.topAnchor : self.bottomAnchor;
|
||||
CGFloat constant = 0;
|
||||
if (isVisible)
|
||||
{
|
||||
topAnchor = sv.topAnchor;
|
||||
}
|
||||
self.verticalConstraint = [selfAnchor constraintEqualToAnchor:topAnchor constant:constant];
|
||||
self.verticalConstraint.active = YES;
|
||||
[super setIsVisible:isVisible];
|
||||
}
|
||||
|
||||
#pragma mark - AvailableArea / VisibleArea
|
||||
|
||||
- (MWMAvailableAreaAffectDirections)visibleAreaAffectDirections
|
||||
{
|
||||
return MWMAvailableAreaAffectDirectionsTop;
|
||||
}
|
||||
|
||||
#pragma mark - AvailableArea / SideButtonsArea
|
||||
|
||||
- (MWMAvailableAreaAffectDirections)sideButtonsAreaAffectDirections
|
||||
{
|
||||
return MWMAvailableAreaAffectDirectionsTop;
|
||||
}
|
||||
|
||||
#pragma mark - AvailableArea / TrafficButtonArea
|
||||
|
||||
- (MWMAvailableAreaAffectDirections)trafficButtonAreaAffectDirections
|
||||
{
|
||||
return MWMAvailableAreaAffectDirectionsTop;
|
||||
}
|
||||
|
||||
#pragma mark - AvailableArea / TrackRecordingButtonArea
|
||||
|
||||
- (MWMAvailableAreaAffectDirections)trackRecordingButtonAreaAffectDirections
|
||||
{
|
||||
return MWMAvailableAreaAffectDirectionsTop;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
@ -0,0 +1,504 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23727" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23721"/>
|
||||
<capability name="Image references" minToolsVersion="12.0"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="MWMNavigationDashboardManager">
|
||||
<connections>
|
||||
<outlet property="baseRoutePreviewStatus" destination="hIE-BJ-nFm" id="Kwy-sL-krz"/>
|
||||
<outlet property="routePreview" destination="aNH-vh-DPz" id="ORz-pz-7sV"/>
|
||||
<outlet property="transportRoutePreviewStatus" destination="iWi-pM-AJF" id="ah9-rm-QeN"/>
|
||||
<outletCollection property="goButtons" destination="CQB-xn-DSM" id="FPU-6h-5CN"/>
|
||||
</connections>
|
||||
</placeholder>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="aNH-vh-DPz" customClass="MWMiPhoneRoutePreview">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="96"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ib5-qh-Cmo">
|
||||
<rect key="frame" x="0.0" y="48" width="320" height="48"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ZXA-Og-q2I">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="48"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="12"/>
|
||||
<state key="normal" title="DEFINE ROADS TO AVOID" image="ic_options_warning"/>
|
||||
<connections>
|
||||
<action selector="onDrivingOptions:" destination="aNH-vh-DPz" eventType="touchUpInside" id="jR1-dk-nNj"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.12156862745098039" green="0.59999999999999998" blue="0.32156862745098036" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="ZXA-Og-q2I" secondAttribute="trailing" id="9bx-3j-h0U"/>
|
||||
<constraint firstItem="ZXA-Og-q2I" firstAttribute="leading" secondItem="Ib5-qh-Cmo" secondAttribute="leading" id="IYq-Pa-Tai"/>
|
||||
<constraint firstItem="ZXA-Og-q2I" firstAttribute="centerX" secondItem="Ib5-qh-Cmo" secondAttribute="centerX" id="Uq2-QA-bWZ"/>
|
||||
<constraint firstAttribute="bottom" secondItem="ZXA-Og-q2I" secondAttribute="bottom" id="ga1-Mh-GwC"/>
|
||||
<constraint firstItem="ZXA-Og-q2I" firstAttribute="centerY" secondItem="Ib5-qh-Cmo" secondAttribute="centerY" id="l5z-Dg-joz"/>
|
||||
<constraint firstAttribute="height" constant="48" id="l8l-Ii-g5U"/>
|
||||
<constraint firstItem="ZXA-Og-q2I" firstAttribute="top" secondItem="Ib5-qh-Cmo" secondAttribute="top" id="oca-09-5v4"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="SecondaryBackground"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="tRj-9k-ciR">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="20"/>
|
||||
<color key="backgroundColor" red="0.1215686275" green="0.59999999999999998" blue="0.32156862749999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="PrimaryBackground"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="WqK-Yb-PmP" customClass="SolidTouchView">
|
||||
<rect key="frame" x="0.0" y="20" width="320" height="28"/>
|
||||
<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="28" height="28"/>
|
||||
<accessibility key="accessibilityConfiguration" identifier="goBackButton"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" secondItem="wpf-tw-Coz" secondAttribute="height" multiplier="1:1" id="CvM-v4-Hlm"/>
|
||||
</constraints>
|
||||
<state key="normal" image="ic_nav_bar_back"/>
|
||||
<connections>
|
||||
<action selector="stopRoutingButtonAction" destination="-1" eventType="touchUpInside" id="64T-4A-qPD"/>
|
||||
</connections>
|
||||
</button>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="oQc-l8-sZH" userLabel="Buttons Box">
|
||||
<rect key="frame" x="78" y="4" width="164" height="20"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="cZF-Ha-2tB">
|
||||
<rect key="frame" x="6" y="0.0" width="40" height="40"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<accessibility key="accessibilityConfiguration" identifier="routeAuto"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" secondItem="cZF-Ha-2tB" secondAttribute="height" multiplier="1:1" id="grh-9Q-TnW"/>
|
||||
<constraint firstAttribute="height" constant="40" id="mp7-b4-xot">
|
||||
<variation key="heightClass=compact" constant="36"/>
|
||||
</constraint>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="6D3-QF-6wm">
|
||||
<rect key="frame" x="54" y="0.0" width="20" height="20"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<accessibility key="accessibilityConfiguration" identifier="routePedestrian"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" secondItem="6D3-QF-6wm" secondAttribute="height" multiplier="1:1" id="zmQ-m7-kqG"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yIt-eq-pV5">
|
||||
<rect key="frame" x="82" y="0.0" width="20" height="20"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<accessibility key="accessibilityConfiguration" identifier="routeAuto"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" secondItem="yIt-eq-pV5" secondAttribute="height" multiplier="1:1" id="G9H-0c-fBM"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="FuO-c6-y9C" userLabel="Bicycle">
|
||||
<rect key="frame" x="110" y="0.0" width="20" height="20"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<accessibility key="accessibilityConfiguration" identifier="routeBicycle"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" secondItem="FuO-c6-y9C" secondAttribute="height" multiplier="1:1" id="2Fj-re-jjm"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="15Q-ZN-NzE" userLabel="Ruler">
|
||||
<rect key="frame" x="138" y="0.0" width="20" height="20"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<accessibility key="accessibilityConfiguration" identifier="routeRuler"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" secondItem="15Q-ZN-NzE" secondAttribute="height" multiplier="1:1" id="8os-Sl-i57"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="6D3-QF-6wm" secondAttribute="bottom" id="6FS-Pq-Ued"/>
|
||||
<constraint firstItem="FuO-c6-y9C" firstAttribute="top" secondItem="oQc-l8-sZH" secondAttribute="top" id="A7a-5f-vcS"/>
|
||||
<constraint firstAttribute="bottom" secondItem="cZF-Ha-2tB" secondAttribute="bottom" id="CUK-cL-Kgn"/>
|
||||
<constraint firstAttribute="bottom" secondItem="15Q-ZN-NzE" secondAttribute="bottom" id="D1r-cA-jTR"/>
|
||||
<constraint firstItem="cZF-Ha-2tB" firstAttribute="top" secondItem="oQc-l8-sZH" secondAttribute="top" id="Gph-Eh-TU4"/>
|
||||
<constraint firstItem="yIt-eq-pV5" firstAttribute="top" secondItem="oQc-l8-sZH" secondAttribute="top" id="K1X-SP-LcQ"/>
|
||||
<constraint firstItem="cZF-Ha-2tB" firstAttribute="leading" secondItem="oQc-l8-sZH" secondAttribute="leading" constant="6" id="MjU-UA-Kax"/>
|
||||
<constraint firstAttribute="trailing" secondItem="FuO-c6-y9C" secondAttribute="trailing" priority="750" constant="6" id="Mnf-65-B96"/>
|
||||
<constraint firstItem="yIt-eq-pV5" firstAttribute="leading" secondItem="6D3-QF-6wm" secondAttribute="trailing" constant="8" id="SZ8-HG-7Hp">
|
||||
<variation key="heightClass=compact" constant="16"/>
|
||||
</constraint>
|
||||
<constraint firstItem="FuO-c6-y9C" firstAttribute="leading" secondItem="yIt-eq-pV5" secondAttribute="trailing" constant="8" id="SZW-Df-ewG">
|
||||
<variation key="heightClass=compact" constant="16"/>
|
||||
</constraint>
|
||||
<constraint firstAttribute="trailing" secondItem="15Q-ZN-NzE" secondAttribute="trailing" constant="6" id="WHK-N0-dCc"/>
|
||||
<constraint firstItem="15Q-ZN-NzE" firstAttribute="leading" secondItem="FuO-c6-y9C" secondAttribute="trailing" constant="8" id="Wve-9m-8zL">
|
||||
<variation key="heightClass=compact" constant="16"/>
|
||||
</constraint>
|
||||
<constraint firstAttribute="bottom" secondItem="FuO-c6-y9C" secondAttribute="bottom" id="cFg-em-TQM"/>
|
||||
<constraint firstAttribute="bottom" secondItem="yIt-eq-pV5" secondAttribute="bottom" id="f1O-ox-6s4"/>
|
||||
<constraint firstItem="6D3-QF-6wm" firstAttribute="top" secondItem="oQc-l8-sZH" secondAttribute="top" id="heq-kc-Kpz"/>
|
||||
<constraint firstItem="15Q-ZN-NzE" firstAttribute="top" secondItem="oQc-l8-sZH" secondAttribute="top" id="my7-I5-Qu3"/>
|
||||
<constraint firstItem="6D3-QF-6wm" firstAttribute="leading" secondItem="cZF-Ha-2tB" secondAttribute="trailing" constant="8" id="ogb-pD-gIt">
|
||||
<variation key="heightClass=compact" constant="16"/>
|
||||
</constraint>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.12156862745098039" green="0.59999999999999998" blue="0.32156862745098036" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="wpf-tw-Coz" secondAttribute="bottom" id="Rvh-ZU-Cog"/>
|
||||
<constraint firstItem="oQc-l8-sZH" firstAttribute="top" secondItem="WqK-Yb-PmP" secondAttribute="top" constant="4" id="SYq-dv-9hN">
|
||||
<variation key="heightClass=compact" constant="2"/>
|
||||
</constraint>
|
||||
<constraint firstAttribute="bottom" secondItem="oQc-l8-sZH" secondAttribute="bottom" constant="4" id="VR6-xa-YSc">
|
||||
<variation key="heightClass=compact" constant="2"/>
|
||||
</constraint>
|
||||
<constraint firstItem="wpf-tw-Coz" firstAttribute="leading" secondItem="WqK-Yb-PmP" secondAttribute="leading" priority="800" id="bK5-4Q-Rv9"/>
|
||||
<constraint firstItem="wpf-tw-Coz" firstAttribute="top" secondItem="WqK-Yb-PmP" secondAttribute="top" id="cPc-fO-vAa"/>
|
||||
<constraint firstItem="oQc-l8-sZH" firstAttribute="centerX" secondItem="WqK-Yb-PmP" secondAttribute="centerX" priority="750" id="ltA-tm-z3P"/>
|
||||
<constraint firstItem="oQc-l8-sZH" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="wpf-tw-Coz" secondAttribute="trailing" constant="4" id="nBk-gt-mzb"/>
|
||||
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="oQc-l8-sZH" secondAttribute="trailing" constant="4" id="yBS-u8-1oX"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="PrimaryBackground"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
</subviews>
|
||||
<viewLayoutGuide key="safeArea" id="h9I-OO-tom"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="tRj-9k-ciR" secondAttribute="trailing" id="7jY-DP-PkA"/>
|
||||
<constraint firstItem="h9I-OO-tom" firstAttribute="trailing" secondItem="Ib5-qh-Cmo" secondAttribute="trailing" id="BQK-qP-OHs"/>
|
||||
<constraint firstItem="WqK-Yb-PmP" firstAttribute="top" secondItem="h9I-OO-tom" secondAttribute="top" id="DDa-WE-Bpd"/>
|
||||
<constraint firstItem="Ib5-qh-Cmo" firstAttribute="top" secondItem="WqK-Yb-PmP" secondAttribute="bottom" id="Oxx-fO-ZLa"/>
|
||||
<constraint firstItem="Ib5-qh-Cmo" firstAttribute="leading" secondItem="h9I-OO-tom" secondAttribute="leading" id="UJ9-p8-11L"/>
|
||||
<constraint firstAttribute="top" secondItem="tRj-9k-ciR" secondAttribute="top" id="eyS-x2-mYX"/>
|
||||
<constraint firstItem="tRj-9k-ciR" firstAttribute="leading" secondItem="aNH-vh-DPz" secondAttribute="leading" id="gxu-Mc-DSI"/>
|
||||
<constraint firstAttribute="trailing" secondItem="WqK-Yb-PmP" secondAttribute="trailing" id="hui-oa-rbV"/>
|
||||
<constraint firstItem="WqK-Yb-PmP" firstAttribute="leading" secondItem="aNH-vh-DPz" secondAttribute="leading" id="rQB-KG-9Kg"/>
|
||||
<constraint firstItem="h9I-OO-tom" firstAttribute="bottom" secondItem="Ib5-qh-Cmo" secondAttribute="bottom" id="wQH-cW-zFs"/>
|
||||
<constraint firstItem="WqK-Yb-PmP" firstAttribute="top" secondItem="tRj-9k-ciR" secondAttribute="bottom" id="zoU-RG-pIh"/>
|
||||
</constraints>
|
||||
<nil key="simulatedStatusBarMetrics"/>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<connections>
|
||||
<outlet property="backButton" destination="wpf-tw-Coz" id="33r-Ij-AuQ"/>
|
||||
<outlet property="bicycle" destination="FuO-c6-y9C" id="UR2-pF-Amb"/>
|
||||
<outlet property="contentView" destination="WqK-Yb-PmP" id="4ph-Dm-EFr"/>
|
||||
<outlet property="drivingOptionHeightConstraint" destination="Oxx-fO-ZLa" id="JOa-ih-oHZ"/>
|
||||
<outlet property="drivingOptionsButton" destination="ZXA-Og-q2I" id="IZf-0l-IIV"/>
|
||||
<outlet property="pedestrian" destination="6D3-QF-6wm" id="bdh-zx-9LW"/>
|
||||
<outlet property="publicTransport" destination="yIt-eq-pV5" id="yIX-eM-Hrs"/>
|
||||
<outlet property="ruler" destination="15Q-ZN-NzE" id="Hel-ic-Opt"/>
|
||||
<outlet property="vehicle" destination="cZF-Ha-2tB" id="QP3-tU-nfO"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="448" y="364.31784107946032"/>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="hIE-BJ-nFm" customClass="MWMBaseRoutePreviewStatus">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="152"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="o7e-Ce-Flg">
|
||||
<rect key="frame" x="-100" y="20" width="520" height="232"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="RouteBasePreview"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fD2-1N-x27" userLabel="Error Box">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="48"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Planning..." lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="14" translatesAutoresizingMaskIntoConstraints="NO" id="vGz-fB-9Oi" userLabel="Error">
|
||||
<rect key="frame" x="120" y="14" width="80" height="20"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" red="0.95686274510000002" green="0.26274509800000001" blue="0.21176470589999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="routing_planning_error"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="regular17:redText"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="vGz-fB-9Oi" firstAttribute="centerX" secondItem="fD2-1N-x27" secondAttribute="centerX" id="GDN-cJ-f4O"/>
|
||||
<constraint firstItem="vGz-fB-9Oi" firstAttribute="centerY" secondItem="fD2-1N-x27" secondAttribute="centerY" id="i8z-Bu-10Z"/>
|
||||
<constraint firstAttribute="height" constant="48" id="uRP-aY-61z"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Tai-sE-6DC" userLabel="Results Box">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="48"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="results" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" minimumFontSize="12" adjustsLetterSpacingToFitWidth="YES" translatesAutoresizingMaskIntoConstraints="NO" id="sjQ-Sc-mtN">
|
||||
<rect key="frame" x="16" y="10" width="51" height="28"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.54000000000000004" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="regular17:blackSecondaryText"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Zzm-Yo-BvL">
|
||||
<rect key="frame" x="19" y="8" width="119" height="32"/>
|
||||
<state key="normal" title="ManageRoute" image="ic_24px_manager"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="medium14:MWMBlack"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="showRouteManager" destination="-1" eventType="touchUpInside" id="KZh-LJ-k72"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button hidden="YES" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="tailTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="CQB-xn-DSM" userLabel="Go" customClass="MWMRouteStartButton">
|
||||
<rect key="frame" x="228" y="8" width="80" height="32"/>
|
||||
<accessibility key="accessibilityConfiguration" identifier="goButton"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="80" id="5fJ-hA-Bme"/>
|
||||
<constraint firstAttribute="height" constant="32" id="b2e-N4-xY6"/>
|
||||
</constraints>
|
||||
<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="custom" customColorSpace="sRGB"/>
|
||||
</state>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="FlatNormalButton:regular17"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="p2p_start"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="routingStartTouchUpInside" destination="-1" eventType="touchUpInside" id="IWD-gV-wDp"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="hoe-y0-brm" userLabel="Save Route As Track Button Compact">
|
||||
<rect key="frame" x="150" y="12" width="58" height="24"/>
|
||||
<state key="normal" title="Save">
|
||||
<imageReference key="image" image="ic24PxImport" symbolScale="small"/>
|
||||
<preferredSymbolConfiguration key="preferredSymbolConfiguration" scale="small"/>
|
||||
</state>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="medium14:MWMBlack"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="saveRouteAsTrack:" destination="-1" eventType="touchUpInside" id="6eG-56-Dxp"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="CQB-xn-DSM" secondAttribute="trailing" constant="20" id="5rE-ss-qWE"/>
|
||||
<constraint firstItem="CQB-xn-DSM" firstAttribute="leading" secondItem="hoe-y0-brm" secondAttribute="trailing" constant="20" id="6Lz-mp-yW2"/>
|
||||
<constraint firstItem="sjQ-Sc-mtN" firstAttribute="centerY" secondItem="Tai-sE-6DC" secondAttribute="centerY" id="Aer-5j-lt1"/>
|
||||
<constraint firstAttribute="trailing" secondItem="CQB-xn-DSM" secondAttribute="trailing" constant="12" id="Any-Qx-9mT"/>
|
||||
<constraint firstItem="Zzm-Yo-BvL" firstAttribute="bottom" secondItem="CQB-xn-DSM" secondAttribute="bottom" id="V0p-f2-5K1"/>
|
||||
<constraint firstItem="sjQ-Sc-mtN" firstAttribute="top" secondItem="Tai-sE-6DC" secondAttribute="top" constant="10" id="Vhr-Mv-2aa"/>
|
||||
<constraint firstItem="CQB-xn-DSM" firstAttribute="centerY" secondItem="Tai-sE-6DC" secondAttribute="centerY" id="XI7-0e-bgf"/>
|
||||
<constraint firstItem="CQB-xn-DSM" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="sjQ-Sc-mtN" secondAttribute="trailing" constant="16" id="Xqn-Rd-gR3"/>
|
||||
<constraint firstItem="hoe-y0-brm" firstAttribute="leading" secondItem="Zzm-Yo-BvL" secondAttribute="trailing" constant="12" id="YnF-gq-lzg"/>
|
||||
<constraint firstItem="Zzm-Yo-BvL" firstAttribute="top" secondItem="CQB-xn-DSM" secondAttribute="top" id="cyE-HM-Ovf"/>
|
||||
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="48" id="dZS-mi-2sg"/>
|
||||
<constraint firstItem="sjQ-Sc-mtN" firstAttribute="leading" secondItem="Tai-sE-6DC" secondAttribute="leading" constant="16" id="gdz-UZ-QkO"/>
|
||||
<constraint firstItem="CQB-xn-DSM" firstAttribute="centerY" secondItem="Zzm-Yo-BvL" secondAttribute="centerY" id="oMX-9t-8XI"/>
|
||||
<constraint firstAttribute="bottom" secondItem="sjQ-Sc-mtN" secondAttribute="bottom" constant="10" id="pnl-MH-dtY"/>
|
||||
<constraint firstAttribute="height" relation="lessThanOrEqual" constant="96" id="tqy-f7-E4I"/>
|
||||
<constraint firstItem="hoe-y0-brm" firstAttribute="centerY" secondItem="Zzm-Yo-BvL" secondAttribute="centerY" id="via-QU-3KT"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="FBs-iT-nWY" userLabel="Height Box">
|
||||
<rect key="frame" x="0.0" y="48" width="320" height="60"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Z94-gs-dwB">
|
||||
<rect key="frame" x="16" y="14" width="288" height="32"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="OqA-sS-wmI">
|
||||
<rect key="frame" x="0.0" y="0.0" width="288" height="32"/>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="OqA-sS-wmI" firstAttribute="leading" secondItem="Z94-gs-dwB" secondAttribute="leading" id="53L-rq-Bau"/>
|
||||
<constraint firstItem="OqA-sS-wmI" firstAttribute="top" secondItem="Z94-gs-dwB" secondAttribute="top" id="at0-E7-wDb"/>
|
||||
<constraint firstAttribute="trailing" secondItem="OqA-sS-wmI" secondAttribute="trailing" id="ooX-y2-4kT"/>
|
||||
<constraint firstAttribute="bottom" secondItem="OqA-sS-wmI" secondAttribute="bottom" id="wy6-zt-Lfz"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="Z94-gs-dwB" secondAttribute="bottom" constant="14" id="GiP-PC-EQA"/>
|
||||
<constraint firstAttribute="height" constant="60" id="Isf-h4-Hen"/>
|
||||
<constraint firstItem="Z94-gs-dwB" firstAttribute="leading" secondItem="FBs-iT-nWY" secondAttribute="leading" constant="16" id="h5e-gY-AhN"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Z94-gs-dwB" secondAttribute="trailing" constant="16" id="xNl-p8-3J5"/>
|
||||
<constraint firstItem="Z94-gs-dwB" firstAttribute="top" secondItem="FBs-iT-nWY" secondAttribute="top" constant="14" id="zAG-Jd-mUl"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fzb-1W-zFB">
|
||||
<rect key="frame" x="0.0" y="108" width="320" height="44"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Yia-YS-2aZ">
|
||||
<rect key="frame" x="-100" y="0.0" width="520" height="144"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</view>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="K37-2W-GE8">
|
||||
<rect key="frame" x="20" y="10" width="119" height="24"/>
|
||||
<state key="normal" title="ManageRoute" image="ic_24px_manager"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="medium14:MWMBlack"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="showRouteManager" destination="-1" eventType="touchUpInside" id="Nvr-ZO-h84"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="aCu-AO-AFN">
|
||||
<rect key="frame" x="155" y="10" width="58" height="24"/>
|
||||
<state key="normal" title="Save">
|
||||
<imageReference key="image" image="ic24PxImport" symbolScale="small"/>
|
||||
<preferredSymbolConfiguration key="preferredSymbolConfiguration" scale="small"/>
|
||||
</state>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="medium14:MWMBlack"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="saveRouteAsTrack:" destination="-1" eventType="touchUpInside" id="xQ9-QD-abF"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="K37-2W-GE8" firstAttribute="centerY" secondItem="fzb-1W-zFB" secondAttribute="centerY" id="2ok-5H-yIR"/>
|
||||
<constraint firstItem="aCu-AO-AFN" firstAttribute="centerY" secondItem="K37-2W-GE8" secondAttribute="centerY" id="6hJ-pH-kXM"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Yia-YS-2aZ" secondAttribute="trailing" constant="-100" id="Bzr-Sg-XK6"/>
|
||||
<constraint firstAttribute="height" constant="44" id="P98-xe-1Mu"/>
|
||||
<constraint firstItem="Yia-YS-2aZ" firstAttribute="leading" secondItem="fzb-1W-zFB" secondAttribute="leading" constant="-100" id="PVG-Ef-KEF"/>
|
||||
<constraint firstItem="K37-2W-GE8" firstAttribute="leading" secondItem="fzb-1W-zFB" secondAttribute="leading" constant="20" id="UJ8-Kj-MhJ"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Yia-YS-2aZ" secondAttribute="bottom" constant="-100" id="YkC-k1-TjV"/>
|
||||
<constraint firstItem="Yia-YS-2aZ" firstAttribute="top" secondItem="fzb-1W-zFB" secondAttribute="top" id="ejL-T8-2eh"/>
|
||||
<constraint firstItem="aCu-AO-AFN" firstAttribute="leading" secondItem="K37-2W-GE8" secondAttribute="trailing" constant="16" id="iHG-Mn-z3w"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<viewLayoutGuide key="safeArea" id="Mhb-kh-JDR"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="FBs-iT-nWY" secondAttribute="bottom" id="0pP-L9-PjJ"/>
|
||||
<constraint firstItem="fzb-1W-zFB" firstAttribute="top" relation="greaterThanOrEqual" secondItem="FBs-iT-nWY" secondAttribute="bottom" id="939-g8-UFV"/>
|
||||
<constraint firstItem="Mhb-kh-JDR" firstAttribute="trailing" secondItem="o7e-Ce-Flg" secondAttribute="trailing" constant="-100" id="AkP-e9-DhZ"/>
|
||||
<constraint firstAttribute="trailing" secondItem="fD2-1N-x27" secondAttribute="trailing" id="Alb-Vc-3pV"/>
|
||||
<constraint firstItem="Tai-sE-6DC" firstAttribute="top" secondItem="hIE-BJ-nFm" secondAttribute="top" id="D1o-4y-GV6"/>
|
||||
<constraint firstItem="o7e-Ce-Flg" firstAttribute="leading" secondItem="Mhb-kh-JDR" secondAttribute="leading" constant="-100" id="H9m-LI-nmf"/>
|
||||
<constraint firstAttribute="height" priority="100" constant="48" id="HTC-IH-1gA"/>
|
||||
<constraint firstItem="fD2-1N-x27" firstAttribute="leading" secondItem="hIE-BJ-nFm" secondAttribute="leading" id="OkZ-n1-6M1"/>
|
||||
<constraint firstItem="fzb-1W-zFB" firstAttribute="top" secondItem="hIE-BJ-nFm" secondAttribute="top" priority="100" id="PEO-jz-737"/>
|
||||
<constraint firstItem="Mhb-kh-JDR" firstAttribute="bottom" secondItem="o7e-Ce-Flg" secondAttribute="bottom" constant="-100" id="Qif-Nu-kov"/>
|
||||
<constraint firstItem="fzb-1W-zFB" firstAttribute="leading" secondItem="hIE-BJ-nFm" secondAttribute="leading" id="Tfi-eh-yc6"/>
|
||||
<constraint firstItem="FBs-iT-nWY" firstAttribute="top" secondItem="Tai-sE-6DC" secondAttribute="bottom" id="UK2-a3-v7h"/>
|
||||
<constraint firstItem="o7e-Ce-Flg" firstAttribute="top" secondItem="Mhb-kh-JDR" secondAttribute="top" id="WUb-NN-KSO"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Tai-sE-6DC" secondAttribute="trailing" id="a1W-Je-BvX"/>
|
||||
<constraint firstAttribute="trailing" secondItem="FBs-iT-nWY" secondAttribute="trailing" id="aFh-Oh-dMW"/>
|
||||
<constraint firstItem="Tai-sE-6DC" firstAttribute="leading" secondItem="hIE-BJ-nFm" secondAttribute="leading" id="k8m-8C-aK9"/>
|
||||
<constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="fzb-1W-zFB" secondAttribute="bottom" id="kPq-9v-D4c"/>
|
||||
<constraint firstItem="fD2-1N-x27" firstAttribute="top" secondItem="hIE-BJ-nFm" secondAttribute="top" id="rcc-1j-0Af"/>
|
||||
<constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="Tai-sE-6DC" secondAttribute="bottom" id="trf-mi-xeb"/>
|
||||
<constraint firstItem="FBs-iT-nWY" firstAttribute="leading" secondItem="hIE-BJ-nFm" secondAttribute="leading" id="vEM-Q6-T7g"/>
|
||||
<constraint firstAttribute="trailing" secondItem="fzb-1W-zFB" secondAttribute="trailing" id="vuc-5v-tGe"/>
|
||||
<constraint firstItem="fzb-1W-zFB" firstAttribute="top" relation="greaterThanOrEqual" secondItem="Tai-sE-6DC" secondAttribute="bottom" id="x6f-8l-CgL"/>
|
||||
<constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="fD2-1N-x27" secondAttribute="bottom" id="x7F-TL-lJx"/>
|
||||
</constraints>
|
||||
<nil key="simulatedStatusBarMetrics"/>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<connections>
|
||||
<outlet property="errorBox" destination="fD2-1N-x27" id="IV5-eS-JLl"/>
|
||||
<outlet property="errorBoxBottom" destination="x7F-TL-lJx" id="W6w-05-Dll"/>
|
||||
<outlet property="errorLabel" destination="vGz-fB-9Oi" id="Ojx-cU-Jpc"/>
|
||||
<outlet property="heightBox" destination="FBs-iT-nWY" id="1Vi-nB-gGz"/>
|
||||
<outlet property="heightBoxBottom" destination="0pP-L9-PjJ" id="BP0-zq-7kV"/>
|
||||
<outlet property="heightBoxBottomManageRouteBoxTop" destination="939-g8-UFV" id="gmW-wu-meb"/>
|
||||
<outlet property="heightProfileImage" destination="OqA-sS-wmI" id="NdN-LR-j7e"/>
|
||||
<outlet property="manageRouteBox" destination="fzb-1W-zFB" id="yqc-27-U2m"/>
|
||||
<outlet property="manageRouteBoxBackground" destination="Yia-YS-2aZ" id="omu-vJ-Nub"/>
|
||||
<outlet property="manageRouteBoxBottom" destination="kPq-9v-D4c" id="FPP-Hc-DGv"/>
|
||||
<outlet property="manageRouteButtonCompact" destination="Zzm-Yo-BvL" id="MAs-VL-pR0"/>
|
||||
<outlet property="manageRouteButtonRegular" destination="K37-2W-GE8" id="I40-pl-MM4"/>
|
||||
<outlet property="resultLabel" destination="sjQ-Sc-mtN" id="GLa-P4-7XO"/>
|
||||
<outlet property="resultsBox" destination="Tai-sE-6DC" id="l4p-m2-z4z"/>
|
||||
<outlet property="resultsBoxBottom" destination="trf-mi-xeb" id="tdb-sa-2ak"/>
|
||||
<outlet property="saveRouteAsTrackButtonCompact" destination="hoe-y0-brm" id="gl1-BI-hc5"/>
|
||||
<outlet property="saveRouteAsTrackButtonRegular" destination="aCu-AO-AFN" id="jpf-Pd-BOv"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="448" y="520.83958020989508"/>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="iWi-pM-AJF" customClass="MWMTransportRoutePreviewStatus">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="80"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="uA3-5h-DWb">
|
||||
<rect key="frame" x="-100" y="0.0" width="520" height="180"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="RouteBasePreview"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Iu4-M8-t6g">
|
||||
<rect key="frame" x="16" y="12" width="41.5" height="20.5"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="20" id="qgy-7x-cjR"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="GZd-C3-csB">
|
||||
<rect key="frame" x="16" y="48.5" width="288" height="15.5"/>
|
||||
<subviews>
|
||||
<collectionView userInteractionEnabled="NO" contentMode="scaleToFill" alwaysBounceVertical="YES" alwaysBounceHorizontal="YES" scrollEnabled="NO" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" delaysContentTouches="NO" canCancelContentTouches="NO" bouncesZoom="NO" dataMode="none" prefetchingEnabled="NO" translatesAutoresizingMaskIntoConstraints="NO" id="RVh-LF-kSn" customClass="TransportTransitStepsCollectionView" customModule="CoMaps" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="288" height="20"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="20" id="eGu-Mr-auv"/>
|
||||
</constraints>
|
||||
<collectionViewLayout key="collectionViewLayout" id="d3P-nT-IFD" customClass="TransportTransitFlowLayout" customModule="CoMaps" customModuleProvider="target"/>
|
||||
</collectionView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" relation="lessThanOrEqual" constant="100" id="IGc-CI-aOh"/>
|
||||
<constraint firstAttribute="height" secondItem="RVh-LF-kSn" secondAttribute="height" priority="500" id="NQX-zx-17G"/>
|
||||
<constraint firstItem="RVh-LF-kSn" firstAttribute="width" secondItem="gf4-x6-D2B" secondAttribute="width" id="d10-d7-7DD"/>
|
||||
<constraint firstItem="RVh-LF-kSn" firstAttribute="leading" secondItem="k3L-Ml-bDX" secondAttribute="leading" id="fhs-TD-7km"/>
|
||||
<constraint firstItem="RVh-LF-kSn" firstAttribute="trailing" secondItem="k3L-Ml-bDX" secondAttribute="trailing" id="jZG-5W-KKC"/>
|
||||
<constraint firstItem="RVh-LF-kSn" firstAttribute="top" secondItem="k3L-Ml-bDX" secondAttribute="top" id="lDC-Pw-RQO"/>
|
||||
<constraint firstItem="RVh-LF-kSn" firstAttribute="bottom" secondItem="k3L-Ml-bDX" secondAttribute="bottom" id="yz7-c7-AZq"/>
|
||||
</constraints>
|
||||
<viewLayoutGuide key="contentLayoutGuide" id="k3L-Ml-bDX"/>
|
||||
<viewLayoutGuide key="frameLayoutGuide" id="gf4-x6-D2B"/>
|
||||
</scrollView>
|
||||
</subviews>
|
||||
<viewLayoutGuide key="safeArea" id="YJK-Xe-9oN"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="GZd-C3-csB" secondAttribute="bottom" constant="16" id="3OD-DZ-eZI"/>
|
||||
<constraint firstItem="Iu4-M8-t6g" firstAttribute="leading" secondItem="iWi-pM-AJF" secondAttribute="leading" constant="16" id="5Ge-fx-3pw"/>
|
||||
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="40" id="CQk-tf-wu9"/>
|
||||
<constraint firstAttribute="trailing" secondItem="GZd-C3-csB" secondAttribute="trailing" constant="16" id="FUK-GV-FoZ"/>
|
||||
<constraint firstItem="GZd-C3-csB" firstAttribute="top" secondItem="Iu4-M8-t6g" secondAttribute="bottom" constant="16" id="JrG-NF-7zG"/>
|
||||
<constraint firstItem="Iu4-M8-t6g" firstAttribute="top" secondItem="iWi-pM-AJF" secondAttribute="top" constant="12" id="Zyw-PT-55a"/>
|
||||
<constraint firstAttribute="bottom" secondItem="uA3-5h-DWb" secondAttribute="bottom" constant="-100" id="jN1-5h-bPC"/>
|
||||
<constraint firstItem="GZd-C3-csB" firstAttribute="leading" secondItem="Iu4-M8-t6g" secondAttribute="leading" id="ktT-ZB-5HK"/>
|
||||
<constraint firstItem="uA3-5h-DWb" firstAttribute="top" secondItem="iWi-pM-AJF" secondAttribute="top" id="nhC-d5-VpO"/>
|
||||
<constraint firstAttribute="trailing" secondItem="uA3-5h-DWb" secondAttribute="trailing" constant="-100" id="wP2-ul-QVl"/>
|
||||
<constraint firstItem="uA3-5h-DWb" firstAttribute="leading" secondItem="iWi-pM-AJF" secondAttribute="leading" constant="-100" id="zCP-aF-HvA"/>
|
||||
</constraints>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<connections>
|
||||
<outlet property="etaLabel" destination="Iu4-M8-t6g" id="hJe-KS-ctT"/>
|
||||
<outlet property="stepsCollectionScrollView" destination="GZd-C3-csB" id="fFk-g4-SOl"/>
|
||||
<outlet property="stepsCollectionView" destination="RVh-LF-kSn" id="3uG-nE-mt3"/>
|
||||
<outlet property="stepsCollectionViewHeight" destination="eGu-Mr-auv" id="K2J-yO-yQ5"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="449" y="737"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="ic24PxImport" width="24" height="24"/>
|
||||
<image name="ic_24px_manager" width="24" height="24"/>
|
||||
<image name="ic_nav_bar_back" width="14" height="22"/>
|
||||
<image name="ic_options_warning" width="24" height="24"/>
|
||||
</resources>
|
||||
</document>
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
typedef NS_ENUM(NSInteger, MWMRouteManagerPointType) {
|
||||
MWMRouteManagerPointTypeStart,
|
||||
MWMRouteManagerPointTypeA,
|
||||
MWMRouteManagerPointTypeB,
|
||||
MWMRouteManagerPointTypeC,
|
||||
MWMRouteManagerPointTypeFinish,
|
||||
MWMRouteManagerPointTypeMyPosition
|
||||
};
|
||||
|
|
@ -0,0 +1,94 @@
|
|||
final class RouteManagerCell: MWMTableViewCell {
|
||||
@IBOutlet private weak var typeImage: UIImageView!
|
||||
@IBOutlet private weak var titleLabel: UILabel!
|
||||
@IBOutlet weak var subtitleLabel: UILabel!
|
||||
@IBOutlet private weak var dragImage: UIImageView! {
|
||||
didSet {
|
||||
dragImage.image = #imageLiteral(resourceName: "ic_route_manager_move")
|
||||
dragImage.tintColor = UIColor.blackHintText()
|
||||
}
|
||||
}
|
||||
|
||||
@IBOutlet private weak var separator1: UIView! {
|
||||
didSet {
|
||||
separator1.layer.cornerRadius = 2
|
||||
}
|
||||
}
|
||||
|
||||
@IBOutlet weak var separator2: UIView!
|
||||
private var index: Int!
|
||||
private var model: MWMRoutePoint!
|
||||
@IBOutlet var subtitleConstraints: [NSLayoutConstraint]!
|
||||
|
||||
override var snapshot: UIView {
|
||||
let skipViews: [UIView] = [typeImage, separator1, separator2]
|
||||
skipViews.forEach { $0.isHidden = true }
|
||||
let snapshot = super.snapshot
|
||||
setStyle(.background)
|
||||
skipViews.forEach { $0.isHidden = false }
|
||||
return snapshot
|
||||
}
|
||||
|
||||
func set(model: MWMRoutePoint, atIndex index: Int) {
|
||||
self.model = model
|
||||
self.index = index
|
||||
|
||||
setupTypeImage()
|
||||
setupLabels()
|
||||
setupSeparators()
|
||||
}
|
||||
|
||||
private func setupTypeImage() {
|
||||
if model.isMyPosition && index == 0 {
|
||||
typeImage.image = #imageLiteral(resourceName: "ic_route_manager_my_position")
|
||||
typeImage.tintColor = UIColor.linkBlue()
|
||||
} else {
|
||||
switch model.type {
|
||||
case .start:
|
||||
typeImage.image = #imageLiteral(resourceName: "ic_route_manager_start")
|
||||
typeImage.tintColor = UIColor.linkBlue()
|
||||
case .intermediate:
|
||||
let i = model.intermediateIndex + 1
|
||||
// TODO: Properly support more than 20 icons.
|
||||
var iconName = "route-point-20"
|
||||
if (i >= 1 && i < 20) {
|
||||
iconName = "route-point-" + String(i)
|
||||
}
|
||||
typeImage.image = #imageLiteral(resourceName: iconName)
|
||||
typeImage.tintColor = UIColor.primary()
|
||||
case .finish:
|
||||
typeImage.image = #imageLiteral(resourceName: "ic_route_manager_finish")
|
||||
typeImage.tintColor = UIColor.blackPrimaryText()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private func setupLabels() {
|
||||
let subtitle: String?
|
||||
if model.isMyPosition && index != 0 {
|
||||
titleLabel.text = model.latLonString
|
||||
subtitle = model.title
|
||||
} else {
|
||||
titleLabel.text = model.title
|
||||
subtitle = model.subtitle
|
||||
}
|
||||
var subtitleConstraintsActive = false
|
||||
if let subtitle = subtitle, !subtitle.isEmpty {
|
||||
subtitleLabel.text = subtitle
|
||||
subtitleConstraintsActive = true
|
||||
}
|
||||
subtitleLabel.isHidden = !subtitleConstraintsActive
|
||||
subtitleConstraints.forEach { $0.isActive = subtitleConstraintsActive }
|
||||
}
|
||||
|
||||
private func setupSeparators() {
|
||||
let isSeparatorsHidden = model.type == .finish
|
||||
separator1.isHidden = isSeparatorsHidden
|
||||
separator2.isHidden = isSeparatorsHidden
|
||||
}
|
||||
|
||||
override func applyTheme() {
|
||||
super.applyTheme()
|
||||
self.setupTypeImage()
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,109 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="KGk-i7-Jjw" customClass="RouteManagerCell" customModule="CoMaps" customModuleProvider="target" propertyAccessControl="none">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="66"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="66"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="We3-dE-JYe">
|
||||
<rect key="frame" x="16" y="21" width="24" height="24"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" secondItem="We3-dE-JYe" secondAttribute="height" multiplier="1:1" id="LD8-kb-Haz"/>
|
||||
<constraint firstAttribute="width" constant="24" id="jtH-Dc-l1B"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="E8T-WR-b4P">
|
||||
<rect key="frame" x="60" y="12" width="212" height="20.5"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="regular16:blackPrimaryText"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ec0-Sc-NrV">
|
||||
<rect key="frame" x="60" y="36.5" width="212" height="17.5"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="regular16:blackSecondaryText"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="a6S-xz-wDs">
|
||||
<rect key="frame" x="280" y="21" width="24" height="24"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="24" id="4YZ-4p-E4H"/>
|
||||
<constraint firstAttribute="width" secondItem="a6S-xz-wDs" secondAttribute="height" multiplier="1:1" id="QCB-eE-cuO"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="e4S-qN-tx8">
|
||||
<rect key="frame" x="26" y="62" width="4" height="4"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" secondItem="e4S-qN-tx8" secondAttribute="height" multiplier="1:1" id="Fec-Pg-5YG"/>
|
||||
<constraint firstAttribute="width" constant="4" id="bHk-pR-fsG"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="Divider"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="E4r-3f-9l2">
|
||||
<rect key="frame" x="60" y="65" width="260" height="1"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="1" id="iTg-i0-sIJ"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="Divider"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="a6S-xz-wDs" secondAttribute="trailing" constant="16" id="2b1-Ud-Ffh"/>
|
||||
<constraint firstItem="ec0-Sc-NrV" firstAttribute="leading" secondItem="E8T-WR-b4P" secondAttribute="leading" id="Bqj-Da-466"/>
|
||||
<constraint firstItem="E8T-WR-b4P" firstAttribute="leading" secondItem="We3-dE-JYe" secondAttribute="trailing" constant="20" id="Ezt-Qw-m9Q"/>
|
||||
<constraint firstAttribute="bottom" secondItem="ec0-Sc-NrV" secondAttribute="bottom" constant="12" id="OFV-X4-OWD"/>
|
||||
<constraint firstItem="E4r-3f-9l2" firstAttribute="leading" secondItem="E8T-WR-b4P" secondAttribute="leading" id="S3g-BB-Afo"/>
|
||||
<constraint firstItem="We3-dE-JYe" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="V68-v7-Y2a"/>
|
||||
<constraint firstAttribute="bottom" secondItem="e4S-qN-tx8" secondAttribute="bottom" id="Yah-Vt-8Jb"/>
|
||||
<constraint firstItem="ec0-Sc-NrV" firstAttribute="top" secondItem="E8T-WR-b4P" secondAttribute="bottom" constant="4" id="cbi-Y9-8Be"/>
|
||||
<constraint firstAttribute="bottom" secondItem="E4r-3f-9l2" secondAttribute="bottom" id="gFy-Bp-fJL"/>
|
||||
<constraint firstItem="ec0-Sc-NrV" firstAttribute="trailing" secondItem="E8T-WR-b4P" secondAttribute="trailing" id="jGc-UQ-TLl"/>
|
||||
<constraint firstItem="We3-dE-JYe" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="16" id="m1w-0i-ELt"/>
|
||||
<constraint firstItem="e4S-qN-tx8" firstAttribute="centerX" secondItem="We3-dE-JYe" secondAttribute="centerX" id="neB-SX-zce"/>
|
||||
<constraint firstItem="a6S-xz-wDs" firstAttribute="leading" secondItem="E8T-WR-b4P" secondAttribute="trailing" constant="8" id="q6T-54-sGO"/>
|
||||
<constraint firstAttribute="trailing" secondItem="E4r-3f-9l2" secondAttribute="trailing" id="s0v-JX-fRN"/>
|
||||
<constraint firstAttribute="bottom" secondItem="E8T-WR-b4P" secondAttribute="bottom" priority="500" constant="14" id="s4P-2g-gnj"/>
|
||||
<constraint firstItem="E8T-WR-b4P" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" priority="500" constant="14" id="uVb-l1-ce1"/>
|
||||
<constraint firstItem="E8T-WR-b4P" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="12" id="vdO-bJ-CRg"/>
|
||||
<constraint firstItem="a6S-xz-wDs" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="w85-cS-Uky"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<viewLayoutGuide key="safeArea" id="Kac-Pe-J2L"/>
|
||||
<connections>
|
||||
<outlet property="dragImage" destination="a6S-xz-wDs" id="zxX-KV-uIQ"/>
|
||||
<outlet property="separator1" destination="e4S-qN-tx8" id="tXc-oD-GpR"/>
|
||||
<outlet property="separator2" destination="E4r-3f-9l2" id="dVo-Qx-Nf1"/>
|
||||
<outlet property="subtitleLabel" destination="ec0-Sc-NrV" id="XfG-GI-QSP"/>
|
||||
<outlet property="titleLabel" destination="E8T-WR-b4P" id="hNR-bg-Aik"/>
|
||||
<outlet property="typeImage" destination="We3-dE-JYe" id="yzw-GT-nXU"/>
|
||||
<outletCollection property="subtitleConstraints" destination="vdO-bJ-CRg" collectionClass="NSMutableArray" id="YBl-7I-Qow"/>
|
||||
<outletCollection property="subtitleConstraints" destination="OFV-X4-OWD" collectionClass="NSMutableArray" id="0A7-Qz-hws"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="139" y="154"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
</document>
|
||||
|
|
@ -0,0 +1,88 @@
|
|||
final class RouteManagerDimView: UIView {
|
||||
@IBOutlet private weak var image: UIImageView!
|
||||
@IBOutlet private weak var label: UILabel!
|
||||
@IBOutlet private weak var messageView: UIView!
|
||||
@IBOutlet private weak var messageViewContainer: UIView!
|
||||
@IBOutlet private var messageViewVerticalCenter: NSLayoutConstraint!
|
||||
@IBOutlet private var labelVerticalCenter: NSLayoutConstraint!
|
||||
|
||||
enum State {
|
||||
case visible
|
||||
case binOpenned
|
||||
case hidden
|
||||
}
|
||||
|
||||
var state = State.hidden {
|
||||
didSet {
|
||||
guard state != oldValue else { return }
|
||||
switch state {
|
||||
case .visible:
|
||||
isVisible = true
|
||||
image.image = #imageLiteral(resourceName: "ic_route_manager_trash")
|
||||
case .binOpenned:
|
||||
isVisible = true
|
||||
image.image = #imageLiteral(resourceName: "ic_route_manager_trash_open")
|
||||
case .hidden:
|
||||
isVisible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var binDropPoint: CGPoint {
|
||||
return convert(image.isHidden ? label.center : image.center, from: messageView)
|
||||
}
|
||||
|
||||
private var isVisible = false {
|
||||
didSet {
|
||||
guard isVisible != oldValue else { return }
|
||||
let componentsAlpha: CGFloat = 0.5
|
||||
setStyle(.blackStatusBarBackground)
|
||||
alpha = isVisible ? 0 : 1
|
||||
image.alpha = isVisible ? 0 : componentsAlpha
|
||||
label.alpha = isVisible ? 0 : componentsAlpha
|
||||
UIView.animate(withDuration: kDefaultAnimationDuration,
|
||||
animations: {
|
||||
self.alpha = self.isVisible ? 1 : 0
|
||||
self.image.alpha = self.isVisible ? componentsAlpha : 0
|
||||
self.label.alpha = self.isVisible ? componentsAlpha : 0
|
||||
},
|
||||
completion: { _ in
|
||||
self.alpha = 1
|
||||
if !self.isVisible {
|
||||
self.backgroundColor = UIColor.clear
|
||||
}
|
||||
})
|
||||
setNeedsLayout()
|
||||
}
|
||||
}
|
||||
|
||||
func setViews(container: UIView, controller: UIView, manager: UIView) {
|
||||
alpha = 0
|
||||
|
||||
alternative(iPhone: {
|
||||
controller.insertSubview(self, at: 0)
|
||||
|
||||
NSLayoutConstraint(item: self, attribute: .left, relatedBy: .equal, toItem: self.messageViewContainer, attribute: .left, multiplier: 1, constant: 0).isActive = true
|
||||
NSLayoutConstraint(item: manager, attribute: .top, relatedBy: .equal, toItem: self.messageViewContainer, attribute: .bottom, multiplier: 1, constant: 0).isActive = true
|
||||
},
|
||||
iPad: {
|
||||
container.insertSubview(self, at: 0)
|
||||
|
||||
NSLayoutConstraint(item: self, attribute: .bottom, relatedBy: .equal, toItem: self.messageViewContainer, attribute: .bottom, multiplier: 1, constant: 0).isActive = true
|
||||
NSLayoutConstraint(item: controller, attribute: .right, relatedBy: .equal, toItem: self.messageViewContainer, attribute: .left, multiplier: 1, constant: 0).isActive = true
|
||||
})()
|
||||
|
||||
NSLayoutConstraint(item: container, attribute: .top, relatedBy: .equal, toItem: self, attribute: .top, multiplier: 1, constant: 0).isActive = true
|
||||
NSLayoutConstraint(item: container, attribute: .bottom, relatedBy: .equal, toItem: self, attribute: .bottom, multiplier: 1, constant: 0).isActive = true
|
||||
NSLayoutConstraint(item: container, attribute: .left, relatedBy: .equal, toItem: self, attribute: .left, multiplier: 1, constant: 0).isActive = true
|
||||
NSLayoutConstraint(item: container, attribute: .right, relatedBy: .equal, toItem: self, attribute: .right, multiplier: 1, constant: 0).isActive = true
|
||||
}
|
||||
|
||||
override func layoutSubviews() {
|
||||
super.layoutSubviews()
|
||||
let isImageHidden = messageView.height > messageViewContainer.height
|
||||
image.isHidden = isImageHidden
|
||||
messageViewVerticalCenter.isActive = !isImageHidden
|
||||
labelVerticalCenter.isActive = isImageHidden
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
final class RouteManagerFooterView: UIView {
|
||||
@IBOutlet private weak var cancelButton: UIButton!
|
||||
@IBOutlet private weak var planButton: UIButton!
|
||||
@IBOutlet weak var separator: UIView!
|
||||
@IBOutlet weak var background: UIView!
|
||||
var isPlanButtonEnabled = true {
|
||||
didSet {
|
||||
planButton.isEnabled = isPlanButtonEnabled
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
final class RouteManagerHeaderView: UIView {
|
||||
@IBOutlet private weak var titleLabel: UILabel!
|
||||
@IBOutlet private weak var addLocationButton: UIButton! {
|
||||
didSet {
|
||||
// TODO(igrechuhin): Uncomment when start_from_my_position translation is ready.
|
||||
// addLocationButton.setTitle(L("start_from_my_position"), for: .normal)
|
||||
// addLocationButton.setTitleColor(UIColor.linkBlue(), for: .normal)
|
||||
// addLocationButton.setTitleColor(UIColor.buttonDisabledBlueText(), for: .disabled)
|
||||
// addLocationButton.tintColor = UIColor.linkBlue()
|
||||
//
|
||||
// let flipLR = CGAffineTransform(scaleX: -1.0, y: 1.0)
|
||||
// addLocationButton.transform = flipLR
|
||||
// addLocationButton.titleLabel?.transform = flipLR
|
||||
// addLocationButton.imageView?.transform = flipLR
|
||||
}
|
||||
}
|
||||
@IBOutlet weak var separator: UIView!
|
||||
|
||||
var isLocationButtonEnabled = true {
|
||||
didSet {
|
||||
addLocationButton.isEnabled = isLocationButtonEnabled
|
||||
addLocationButton.tintColor = isLocationButtonEnabled ? UIColor.linkBlue() : UIColor.buttonDisabledBlueText()
|
||||
}
|
||||
}
|
||||
|
||||
override func awakeFromNib() {
|
||||
super.awakeFromNib()
|
||||
}
|
||||
|
||||
override func applyTheme() {
|
||||
super.applyTheme()
|
||||
addLocationButton.tintColor = isLocationButtonEnabled ? UIColor.linkBlue() : UIColor.buttonDisabledBlueText()
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
final class RouteManagerPresentationController: UIPresentationController {
|
||||
override func containerViewWillLayoutSubviews() {
|
||||
super.containerViewWillLayoutSubviews()
|
||||
(presentedViewController as? RouteManagerViewController)?.chromeView.frame = containerView!.bounds
|
||||
presentedView?.frame = frameOfPresentedViewInContainerView
|
||||
}
|
||||
|
||||
override func presentationTransitionWillBegin() {
|
||||
super.presentationTransitionWillBegin()
|
||||
guard let presentedViewController = presentedViewController as? RouteManagerViewController,
|
||||
let coordinator = presentedViewController.transitionCoordinator,
|
||||
let containerView = containerView else { return }
|
||||
|
||||
containerView.addSubview(presentedView!)
|
||||
presentedViewController.containerView = containerView
|
||||
presentedViewController.chromeView.frame = containerView.bounds
|
||||
presentedViewController.chromeView.alpha = 0
|
||||
|
||||
coordinator.animate(alongsideTransition: { _ in
|
||||
presentedViewController.chromeView.alpha = 1
|
||||
}, completion: nil)
|
||||
}
|
||||
|
||||
override func dismissalTransitionWillBegin() {
|
||||
super.dismissalTransitionWillBegin()
|
||||
guard let presentedViewController = presentedViewController as? RouteManagerViewController,
|
||||
let coordinator = presentedViewController.transitionCoordinator,
|
||||
let presentedView = presentedView else { return }
|
||||
|
||||
coordinator.animate(alongsideTransition: { _ in
|
||||
presentedViewController.chromeView.alpha = 0
|
||||
}, completion: { _ in
|
||||
presentedView.removeFromSuperview()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
final class RouteManagerTableView: UITableView {
|
||||
@IBOutlet private weak var tableViewHeight: NSLayoutConstraint!
|
||||
|
||||
enum HeightUpdateStyle {
|
||||
case animated
|
||||
case deferred
|
||||
case off
|
||||
}
|
||||
|
||||
var heightUpdateStyle = HeightUpdateStyle.deferred
|
||||
|
||||
private var scheduledUpdate: DispatchWorkItem?
|
||||
|
||||
override var contentSize: CGSize {
|
||||
didSet {
|
||||
guard contentSize != oldValue else { return }
|
||||
scheduledUpdate?.cancel()
|
||||
let update = { [weak self] in
|
||||
guard let s = self else { return }
|
||||
s.tableViewHeight.constant = s.contentSize.height
|
||||
}
|
||||
switch heightUpdateStyle {
|
||||
case .animated: superview?.animateConstraints(animations: update)
|
||||
case .deferred:
|
||||
scheduledUpdate = DispatchWorkItem(block: update)
|
||||
DispatchQueue.main.async(execute: scheduledUpdate!)
|
||||
case .off: break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
final class RouteManagerTransitioning: NSObject, UIViewControllerAnimatedTransitioning {
|
||||
private let isPresentation: Bool
|
||||
|
||||
init(isPresentation: Bool) {
|
||||
self.isPresentation = isPresentation
|
||||
super.init()
|
||||
}
|
||||
|
||||
func transitionDuration(using _: UIViewControllerContextTransitioning?) -> TimeInterval {
|
||||
return kDefaultAnimationDuration
|
||||
}
|
||||
|
||||
func animateTransition(using transitionContext: UIViewControllerContextTransitioning) {
|
||||
guard let fromVC = transitionContext.viewController(forKey: .from),
|
||||
let toVC = transitionContext.viewController(forKey: .to) else { return }
|
||||
|
||||
let animatingVC = isPresentation ? toVC : fromVC
|
||||
guard let animatingView = animatingVC.view else { return }
|
||||
|
||||
let finalFrameForVC = transitionContext.finalFrame(for: animatingVC)
|
||||
var initialFrameForVC = finalFrameForVC
|
||||
initialFrameForVC.origin.y += initialFrameForVC.size.height
|
||||
|
||||
let initialFrame = isPresentation ? initialFrameForVC : finalFrameForVC
|
||||
let finalFrame = isPresentation ? finalFrameForVC : initialFrameForVC
|
||||
|
||||
animatingView.frame = initialFrame
|
||||
|
||||
UIView.animate(withDuration: transitionDuration(using: transitionContext),
|
||||
animations: { animatingView.frame = finalFrame },
|
||||
completion: { _ in
|
||||
transitionContext.completeTransition(true)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
@objc(MWMRouteManagerTransitioningManager)
|
||||
final class RouteManagerTransitioningManager: NSObject, UIViewControllerTransitioningDelegate {
|
||||
override init() {
|
||||
super.init()
|
||||
}
|
||||
|
||||
func presentationController(forPresented presented: UIViewController, presenting: UIViewController?, source _: UIViewController) -> UIPresentationController? {
|
||||
RouteManagerPresentationController(presentedViewController: presented,
|
||||
presenting: presenting)
|
||||
}
|
||||
|
||||
func animationController(forPresented _: UIViewController, presenting _: UIViewController, source _: UIViewController) -> UIViewControllerAnimatedTransitioning? {
|
||||
return RouteManagerTransitioning(isPresentation: true)
|
||||
}
|
||||
|
||||
func animationController(forDismissed _: UIViewController) -> UIViewControllerAnimatedTransitioning? {
|
||||
return RouteManagerTransitioning(isPresentation: false)
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,257 @@
|
|||
@objc(MWMRouteManagerViewController)
|
||||
final class RouteManagerViewController: MWMViewController, UITableViewDataSource, UITableViewDelegate {
|
||||
let viewModel: RouteManagerViewModelProtocol
|
||||
|
||||
@IBOutlet private var dimView: RouteManagerDimView!
|
||||
@IBOutlet private weak var footerViewHeight: NSLayoutConstraint!
|
||||
@IBOutlet private weak var headerView: RouteManagerHeaderView!
|
||||
@IBOutlet private weak var footerView: RouteManagerFooterView!
|
||||
@IBOutlet private weak var headerViewHeight: NSLayoutConstraint!
|
||||
@IBOutlet private weak var managerView: UIView!
|
||||
@IBOutlet private weak var managerWidth: NSLayoutConstraint!
|
||||
@IBOutlet private weak var minManagerTopOffset: NSLayoutConstraint!
|
||||
@IBOutlet private weak var tableView: RouteManagerTableView!
|
||||
|
||||
lazy var chromeView: UIView = {
|
||||
let view = UIView()
|
||||
view.setStyle(.blackStatusBarBackground)
|
||||
return view
|
||||
}()
|
||||
|
||||
weak var containerView: UIView!
|
||||
|
||||
private var canDeleteRow: Bool { return viewModel.routePoints.count > 2 }
|
||||
|
||||
final class DragCell {
|
||||
weak var controller: RouteManagerViewController!
|
||||
let snapshot: UIView
|
||||
var indexPath: IndexPath
|
||||
|
||||
init(controller: RouteManagerViewController, cell: UITableViewCell, dragPoint: CGPoint, indexPath: IndexPath) {
|
||||
self.controller = controller
|
||||
snapshot = cell.snapshot
|
||||
self.indexPath = indexPath
|
||||
addSubView(cell: cell, dragPoint: dragPoint)
|
||||
controller.tableView.heightUpdateStyle = .off
|
||||
if controller.canDeleteRow {
|
||||
controller.dimView.state = .visible
|
||||
}
|
||||
}
|
||||
|
||||
private func addSubView(cell: UITableViewCell, dragPoint: CGPoint) {
|
||||
let view = controller.containerView!
|
||||
view.addSubview(snapshot)
|
||||
snapshot.center = view.convert(cell.center, from: controller.tableView)
|
||||
cell.isHidden = true
|
||||
UIView.animate(withDuration: kDefaultAnimationDuration,
|
||||
animations: { [snapshot] in
|
||||
snapshot.center = dragPoint
|
||||
let scaleFactor: CGFloat = 1.05
|
||||
snapshot.transform = CGAffineTransform(scaleX: scaleFactor, y: scaleFactor)
|
||||
})
|
||||
}
|
||||
|
||||
func move(dragPoint: CGPoint, indexPath: IndexPath?, inManagerView: Bool) {
|
||||
snapshot.center = dragPoint
|
||||
if controller.canDeleteRow {
|
||||
controller.dimView.state = inManagerView ? .visible : .binOpenned
|
||||
}
|
||||
guard let newIP = indexPath else { return }
|
||||
let tv = controller.tableView!
|
||||
let cell = tv.cellForRow(at: newIP)
|
||||
let canMoveCell: Bool
|
||||
if let cell = cell {
|
||||
let (centerX, centerY) = (snapshot.width / 2, snapshot.height / 2)
|
||||
canMoveCell = cell.point(inside: cell.convert(CGPoint(x: centerX, y: 1.5 * centerY), from: snapshot), with: nil) &&
|
||||
cell.point(inside: cell.convert(CGPoint(x: centerX, y: 0.5 * centerY), from: snapshot), with: nil)
|
||||
} else {
|
||||
canMoveCell = true
|
||||
}
|
||||
guard canMoveCell else { return }
|
||||
let currentIP = self.indexPath
|
||||
if newIP != currentIP {
|
||||
let (currentRow, newRow) = (currentIP.row, newIP.row)
|
||||
controller.viewModel.movePoint(at: currentRow, to: newRow)
|
||||
|
||||
tv.moveRow(at: currentIP, to: newIP)
|
||||
let reloadRows = (min(currentRow, newRow) ... max(currentRow, newRow)).map { IndexPath(row: $0, section: 0) }
|
||||
tv.reloadRows(at: reloadRows, with: .fade)
|
||||
tv.cellForRow(at: newIP)?.isHidden = true
|
||||
|
||||
self.indexPath = newIP
|
||||
}
|
||||
}
|
||||
|
||||
func drop(inManagerView: Bool) {
|
||||
let removeSnapshot = {
|
||||
self.snapshot.removeFromSuperview()
|
||||
self.controller.dimView.state = .hidden
|
||||
}
|
||||
let containerView = controller.containerView!
|
||||
let tv = controller.tableView!
|
||||
if inManagerView || !controller.canDeleteRow {
|
||||
let dropCenter = tv.cellForRow(at: indexPath)?.center ?? snapshot.center
|
||||
UIView.animate(withDuration: kDefaultAnimationDuration,
|
||||
animations: { [snapshot] in
|
||||
snapshot.center = containerView.convert(dropCenter, from: tv)
|
||||
snapshot.transform = CGAffineTransform.identity
|
||||
},
|
||||
completion: { [indexPath] _ in
|
||||
tv.reloadRows(at: [indexPath], with: .none)
|
||||
removeSnapshot()
|
||||
})
|
||||
} else {
|
||||
tv.heightUpdateStyle = .animated
|
||||
tv.update {
|
||||
controller.viewModel.deletePoint(at: indexPath.row)
|
||||
tv.deleteRows(at: [indexPath], with: .automatic)
|
||||
}
|
||||
let dimView = controller.dimView!
|
||||
UIView.animate(withDuration: kDefaultAnimationDuration,
|
||||
animations: { [snapshot] in
|
||||
snapshot.center = containerView.convert(dimView.binDropPoint, from: dimView)
|
||||
let scaleFactor: CGFloat = 0.2
|
||||
snapshot.transform = CGAffineTransform(scaleX: scaleFactor, y: scaleFactor)
|
||||
},
|
||||
completion: { _ in
|
||||
removeSnapshot()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
deinit {
|
||||
controller.tableView.heightUpdateStyle = .deferred
|
||||
}
|
||||
}
|
||||
|
||||
var dragCell: DragCell?
|
||||
|
||||
@objc init(viewModel: RouteManagerViewModelProtocol) {
|
||||
self.viewModel = viewModel
|
||||
super.init(nibName: toString(type(of: self)), bundle: nil)
|
||||
}
|
||||
|
||||
required init?(coder _: NSCoder) {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
setupTableView()
|
||||
setupLayout()
|
||||
|
||||
viewModel.refreshControlsCallback = { [unowned viewModel, unowned self] in
|
||||
let points = viewModel.routePoints
|
||||
self.footerView.isPlanButtonEnabled = points.count >= 2
|
||||
self.headerView.isLocationButtonEnabled = true
|
||||
points.forEach {
|
||||
if $0.isMyPosition {
|
||||
self.headerView.isLocationButtonEnabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
viewModel.refreshControlsCallback()
|
||||
|
||||
viewModel.reloadCallback = { [tableView] in
|
||||
tableView?.reloadSections(IndexSet(integer: 0), with: .fade)
|
||||
}
|
||||
|
||||
viewModel.startTransaction()
|
||||
}
|
||||
|
||||
override func viewDidAppear(_ animated: Bool) {
|
||||
super.viewDidAppear(animated)
|
||||
dimView.setViews(container: containerView, controller: view, manager: managerView)
|
||||
containerView.insertSubview(chromeView, at: 0)
|
||||
}
|
||||
|
||||
override func viewWillDisappear(_ animated: Bool) {
|
||||
super.viewWillDisappear(animated)
|
||||
}
|
||||
|
||||
override func viewWillLayoutSubviews() {
|
||||
super.viewWillLayoutSubviews()
|
||||
if preferredContentSize != managerView.size {
|
||||
preferredContentSize = managerView.size
|
||||
}
|
||||
}
|
||||
|
||||
private func setupLayout() {
|
||||
alternative(iPhone: { self.managerWidth.isActive = false },
|
||||
iPad: { self.minManagerTopOffset.isActive = false })()
|
||||
}
|
||||
|
||||
private func setupTableView() {
|
||||
tableView.registerNib(cellClass: RouteManagerCell.self)
|
||||
tableView.estimatedRowHeight = 48
|
||||
tableView.rowHeight = UITableView.automaticDimension
|
||||
}
|
||||
|
||||
@IBAction func onCancel() {
|
||||
viewModel.cancelTransaction()
|
||||
dismiss(animated: true, completion: nil)
|
||||
}
|
||||
|
||||
@IBAction func onPlan() {
|
||||
viewModel.finishTransaction()
|
||||
dismiss(animated: true, completion: nil)
|
||||
}
|
||||
|
||||
@IBAction func onAdd() {
|
||||
viewModel.addLocationPoint()
|
||||
tableView.heightUpdateStyle = .off
|
||||
tableView.update({
|
||||
tableView.reloadRows(at: [IndexPath(row: 0, section: 0)], with: .fade)
|
||||
}, completion: {
|
||||
self.tableView.heightUpdateStyle = .deferred
|
||||
})
|
||||
}
|
||||
|
||||
@IBAction private func gestureRecognized(_ longPress: UIGestureRecognizer) {
|
||||
let locationInView = gestureLocation(longPress, in: containerView)
|
||||
let locationInTableView = gestureLocation(longPress, in: tableView)
|
||||
switch longPress.state {
|
||||
case .began:
|
||||
guard let indexPath = tableView.indexPathForRow(at: locationInTableView),
|
||||
let cell = tableView.cellForRow(at: indexPath) else { return }
|
||||
dragCell = DragCell(controller: self, cell: cell, dragPoint: locationInView, indexPath: indexPath)
|
||||
case .changed:
|
||||
guard let dragCell = dragCell else { return }
|
||||
let indexPath = tableView.indexPathForRow(at: locationInTableView)
|
||||
let inManagerView = managerView.point(inside: gestureLocation(longPress, in: managerView), with: nil)
|
||||
dragCell.move(dragPoint: locationInView, indexPath: indexPath, inManagerView: inManagerView)
|
||||
default:
|
||||
guard let dragCell = dragCell else { return }
|
||||
let inManagerView = managerView.point(inside: gestureLocation(longPress, in: managerView), with: nil)
|
||||
dragCell.drop(inManagerView: inManagerView)
|
||||
self.dragCell = nil
|
||||
}
|
||||
}
|
||||
|
||||
private func gestureLocation(_ gestureRecognizer: UIGestureRecognizer, in view: UIView) -> CGPoint {
|
||||
var location = gestureRecognizer.location(in: view)
|
||||
iPhoneSpecific { location.x = view.width / 2 }
|
||||
return location
|
||||
}
|
||||
|
||||
// MARK: - UITableViewDataSource
|
||||
func tableView(_: UITableView, numberOfRowsInSection _: Int) -> Int {
|
||||
return viewModel.routePoints.count
|
||||
}
|
||||
|
||||
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
||||
let cell = tableView.dequeueReusableCell(withCellClass: RouteManagerCell.self, indexPath: indexPath) as! RouteManagerCell
|
||||
let row = indexPath.row
|
||||
cell.set(model: viewModel.routePoints[row], atIndex: row)
|
||||
return cell
|
||||
}
|
||||
|
||||
func tableView(_ tableView: UITableView, commit _: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath) {
|
||||
viewModel.deletePoint(at: indexPath.row)
|
||||
}
|
||||
|
||||
// MARK: - UITableViewDelegate
|
||||
func tableView(_: UITableView, editingStyleForRowAt _: IndexPath) -> UITableViewCell.EditingStyle {
|
||||
return canDeleteRow ? .delete : .none
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,293 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15705" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina6_1" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15706"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="MWMRouteManagerViewController">
|
||||
<connections>
|
||||
<outlet property="dimView" destination="3y4-jh-JUF" id="Eto-KX-XRu"/>
|
||||
<outlet property="footerView" destination="mqc-M4-MPb" id="8im-uy-Rgm"/>
|
||||
<outlet property="footerViewHeight" destination="1qG-Md-L9w" id="ffF-cw-Lp0"/>
|
||||
<outlet property="headerView" destination="s0L-ul-gog" id="X5t-Xe-g5Y"/>
|
||||
<outlet property="headerViewHeight" destination="e4y-UI-hxr" id="ERb-fS-AcU"/>
|
||||
<outlet property="managerView" destination="i5M-Pr-FkT" id="zz4-k2-Tf1"/>
|
||||
<outlet property="managerWidth" destination="6Nm-Md-fZo" id="7X5-IX-4cy"/>
|
||||
<outlet property="minManagerTopOffset" destination="sYB-lu-PhM" id="C8h-tU-enB"/>
|
||||
<outlet property="tableView" destination="Zqd-YQ-ksD" id="ROT-An-z3D"/>
|
||||
<outlet property="view" destination="TKX-qe-h4F" id="ORc-Ju-S5N"/>
|
||||
</connections>
|
||||
</placeholder>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3y4-jh-JUF" customClass="RouteManagerDimView" customModule="CoMaps" customModuleProvider="target" propertyAccessControl="none">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
||||
<subviews>
|
||||
<view userInteractionEnabled="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="TC7-xW-EwE">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="kTd-fr-ia7">
|
||||
<rect key="frame" x="186" y="380" width="42" height="136.5"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" alpha="0.0" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_route_manager_trash" translatesAutoresizingMaskIntoConstraints="NO" id="ZEN-kK-2CA">
|
||||
<rect key="frame" x="-3" y="40" width="48" height="48"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="48" id="QJJ-DB-WF7"/>
|
||||
<constraint firstAttribute="width" secondItem="ZEN-kK-2CA" secondAttribute="height" multiplier="1:1" id="YdZ-dM-iEr"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" alpha="0.0" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1ks-iR-Wia">
|
||||
<rect key="frame" x="0.0" y="96" width="42" height="20.5"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="regular18:whiteText"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="planning_route_remove_title"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<accessibility key="accessibilityConfiguration" identifier="MessageView"/>
|
||||
<constraints>
|
||||
<constraint firstItem="1ks-iR-Wia" firstAttribute="leading" secondItem="kTd-fr-ia7" secondAttribute="leading" id="OZ4-Jc-PiA"/>
|
||||
<constraint firstAttribute="bottom" secondItem="1ks-iR-Wia" secondAttribute="bottom" constant="20" id="PXJ-Xl-pHA"/>
|
||||
<constraint firstItem="1ks-iR-Wia" firstAttribute="top" secondItem="ZEN-kK-2CA" secondAttribute="bottom" constant="8" id="iOV-1C-4Ak"/>
|
||||
<constraint firstItem="ZEN-kK-2CA" firstAttribute="top" secondItem="kTd-fr-ia7" secondAttribute="top" constant="40" id="jma-ai-kFd"/>
|
||||
<constraint firstItem="ZEN-kK-2CA" firstAttribute="centerX" secondItem="kTd-fr-ia7" secondAttribute="centerX" id="kue-ke-ivS"/>
|
||||
<constraint firstAttribute="trailing" secondItem="1ks-iR-Wia" secondAttribute="trailing" id="oTF-hI-m7B"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<accessibility key="accessibilityConfiguration" identifier="MessageContainerView"/>
|
||||
<constraints>
|
||||
<constraint firstItem="kTd-fr-ia7" firstAttribute="centerX" secondItem="TC7-xW-EwE" secondAttribute="centerX" id="3Xc-xT-Z2O"/>
|
||||
<constraint firstItem="kTd-fr-ia7" firstAttribute="centerY" secondItem="TC7-xW-EwE" secondAttribute="centerY" priority="700" id="EcF-uM-iaP"/>
|
||||
<constraint firstItem="1ks-iR-Wia" firstAttribute="centerY" secondItem="TC7-xW-EwE" secondAttribute="centerY" priority="600" id="F2s-Or-gaN"/>
|
||||
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="72" id="niX-df-uVo"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<accessibility key="accessibilityConfiguration" identifier="DimView"/>
|
||||
<gestureRecognizers/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="TC7-xW-EwE" secondAttribute="bottom" placeholder="YES" id="2x4-NF-KU5"/>
|
||||
<constraint firstItem="TC7-xW-EwE" firstAttribute="leading" secondItem="3y4-jh-JUF" secondAttribute="leading" placeholder="YES" id="D86-wV-E74"/>
|
||||
<constraint firstAttribute="trailing" secondItem="TC7-xW-EwE" secondAttribute="trailing" id="kvp-My-OQZ"/>
|
||||
<constraint firstItem="TC7-xW-EwE" firstAttribute="top" secondItem="3y4-jh-JUF" secondAttribute="top" id="lfE-MZ-Cvp"/>
|
||||
</constraints>
|
||||
<viewLayoutGuide key="safeArea" id="aNC-Xj-cAv"/>
|
||||
<connections>
|
||||
<outlet property="image" destination="ZEN-kK-2CA" id="zkv-Ag-qOp"/>
|
||||
<outlet property="label" destination="1ks-iR-Wia" id="jsa-mi-iZ2"/>
|
||||
<outlet property="labelVerticalCenter" destination="F2s-Or-gaN" id="Ztj-AC-Re4"/>
|
||||
<outlet property="messageView" destination="kTd-fr-ia7" id="dq4-iL-VA4"/>
|
||||
<outlet property="messageViewContainer" destination="TC7-xW-EwE" id="gfd-5J-Tc3"/>
|
||||
<outlet property="messageViewVerticalCenter" destination="EcF-uM-iaP" id="zyb-VY-6pA"/>
|
||||
<outletCollection property="gestureRecognizers" destination="deN-Z9-rbS" appends="YES" id="Mcr-eR-ObL"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="288" y="-49"/>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" id="TKX-qe-h4F" propertyAccessControl="none">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="i5M-Pr-FkT">
|
||||
<rect key="frame" x="0.0" y="758" width="414" height="138"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="s0L-ul-gog" customClass="RouteManagerHeaderView" customModule="CoMaps" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="48"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="760" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dQh-uc-65J">
|
||||
<rect key="frame" x="16" y="14" width="42" height="20.5"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="bold22:blackPrimaryText"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="planning_route_manage_route"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="0Fo-Ae-QrQ">
|
||||
<rect key="frame" x="370" y="0.0" width="28" height="48"/>
|
||||
<inset key="contentEdgeInsets" minX="8" minY="0.0" maxX="0.0" maxY="0.0"/>
|
||||
<inset key="imageEdgeInsets" minX="-8" minY="0.0" maxX="0.0" maxY="0.0"/>
|
||||
<state key="normal" image="ic_get_position"/>
|
||||
<connections>
|
||||
<action selector="onAdd" destination="-1" eventType="touchUpInside" id="zGx-NU-Hzq"/>
|
||||
</connections>
|
||||
</button>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="MJB-bK-y5c">
|
||||
<rect key="frame" x="16" y="47" width="398" height="1"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="1" id="aOa-8P-yGw"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="Divider"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="MJB-bK-y5c" firstAttribute="leading" secondItem="s0L-ul-gog" secondAttribute="leading" constant="16" id="0en-v6-Ij2"/>
|
||||
<constraint firstItem="0Fo-Ae-QrQ" firstAttribute="top" secondItem="s0L-ul-gog" secondAttribute="top" id="8Bf-WP-AF2"/>
|
||||
<constraint firstAttribute="bottom" secondItem="0Fo-Ae-QrQ" secondAttribute="bottom" id="BjQ-l3-bKd"/>
|
||||
<constraint firstAttribute="trailing" secondItem="MJB-bK-y5c" secondAttribute="trailing" id="F3U-0x-OCM"/>
|
||||
<constraint firstItem="dQh-uc-65J" firstAttribute="centerY" secondItem="s0L-ul-gog" secondAttribute="centerY" id="GNV-n4-tfI"/>
|
||||
<constraint firstItem="0Fo-Ae-QrQ" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="dQh-uc-65J" secondAttribute="trailing" constant="8" id="Zke-bf-VcT"/>
|
||||
<constraint firstAttribute="height" constant="48" id="e4y-UI-hxr"/>
|
||||
<constraint firstAttribute="bottom" secondItem="MJB-bK-y5c" secondAttribute="bottom" id="qQD-HE-tWa"/>
|
||||
<constraint firstItem="dQh-uc-65J" firstAttribute="leading" secondItem="s0L-ul-gog" secondAttribute="leading" constant="16" id="qSi-Cf-iFz"/>
|
||||
<constraint firstAttribute="trailing" secondItem="0Fo-Ae-QrQ" secondAttribute="trailing" constant="16" id="zfn-hK-yiy"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="Background"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<outlet property="addLocationButton" destination="0Fo-Ae-QrQ" id="svZ-xA-Txe"/>
|
||||
<outlet property="separator" destination="MJB-bK-y5c" id="xZC-xh-fJh"/>
|
||||
<outlet property="titleLabel" destination="dQh-uc-65J" id="xKP-bY-mQP"/>
|
||||
</connections>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="mqc-M4-MPb" customClass="RouteManagerFooterView" customModule="CoMaps" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="48" width="414" height="48"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="or0-Gy-0su">
|
||||
<rect key="frame" x="-100" y="0.0" width="614" height="148"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="BlackOpaqueBackground"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="pjx-6o-NWS">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="1"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="1" id="jFT-3E-Yrc"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="Divider"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="2WE-hS-hzl">
|
||||
<rect key="frame" x="16" y="0.0" width="46" height="48"/>
|
||||
<state key="normal" title="Button"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="FlatNormalTransButton"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="cancel"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="onCancel" destination="-1" eventType="touchUpInside" id="Lzk-mL-6Jg"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="u3h-0s-UBo">
|
||||
<rect key="frame" x="352" y="0.0" width="46" height="48"/>
|
||||
<state key="normal" title="Button"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="FlatNormalTransButton"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="button_plan"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="onPlan" destination="-1" eventType="touchUpInside" id="M1B-dr-vZS"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="48" id="1qG-Md-L9w"/>
|
||||
<constraint firstAttribute="trailing" secondItem="pjx-6o-NWS" secondAttribute="trailing" id="2pz-i3-nqy"/>
|
||||
<constraint firstItem="2WE-hS-hzl" firstAttribute="leading" secondItem="mqc-M4-MPb" secondAttribute="leading" constant="16" id="5pP-TA-d4M"/>
|
||||
<constraint firstItem="2WE-hS-hzl" firstAttribute="top" secondItem="mqc-M4-MPb" secondAttribute="top" id="CmY-Dg-Oyj"/>
|
||||
<constraint firstAttribute="bottom" secondItem="or0-Gy-0su" secondAttribute="bottom" constant="-100" id="Df9-Xs-6pB"/>
|
||||
<constraint firstAttribute="bottom" secondItem="u3h-0s-UBo" secondAttribute="bottom" id="GPn-YG-Q3q"/>
|
||||
<constraint firstItem="pjx-6o-NWS" firstAttribute="top" secondItem="mqc-M4-MPb" secondAttribute="top" id="JBh-gl-9Zv"/>
|
||||
<constraint firstItem="or0-Gy-0su" firstAttribute="leading" secondItem="mqc-M4-MPb" secondAttribute="leading" constant="-100" id="Nrk-kP-4Bh"/>
|
||||
<constraint firstAttribute="trailing" secondItem="u3h-0s-UBo" secondAttribute="trailing" constant="16" id="QGG-zB-H6Q"/>
|
||||
<constraint firstAttribute="bottom" secondItem="2WE-hS-hzl" secondAttribute="bottom" id="TJH-n6-XZn"/>
|
||||
<constraint firstItem="pjx-6o-NWS" firstAttribute="leading" secondItem="mqc-M4-MPb" secondAttribute="leading" id="isd-2j-Shn"/>
|
||||
<constraint firstItem="u3h-0s-UBo" firstAttribute="top" secondItem="mqc-M4-MPb" secondAttribute="top" id="jC7-jG-YeX"/>
|
||||
<constraint firstAttribute="trailing" secondItem="or0-Gy-0su" secondAttribute="trailing" constant="-100" id="zfL-pn-451"/>
|
||||
<constraint firstItem="or0-Gy-0su" firstAttribute="top" secondItem="mqc-M4-MPb" secondAttribute="top" id="ztB-hC-yRP"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="Background"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<outlet property="background" destination="or0-Gy-0su" id="aFx-YJ-deT"/>
|
||||
<outlet property="cancelButton" destination="2WE-hS-hzl" id="8op-cA-N4M"/>
|
||||
<outlet property="planButton" destination="u3h-0s-UBo" id="Fb9-pg-kh9"/>
|
||||
<outlet property="separator" destination="pjx-6o-NWS" id="EKT-Ba-Lcy"/>
|
||||
</connections>
|
||||
</view>
|
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" style="plain" separatorStyle="none" allowsSelection="NO" rowHeight="48" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="Zqd-YQ-ksD" customClass="RouteManagerTableView" customModule="CoMaps" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="48" width="414" height="0.0"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<gestureRecognizers/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" priority="750" id="69R-bB-eQ7"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="TableView"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<outlet property="dataSource" destination="-1" id="RZu-Qk-qvN"/>
|
||||
<outlet property="delegate" destination="-1" id="QdP-tL-Afh"/>
|
||||
<outlet property="tableViewHeight" destination="69R-bB-eQ7" id="iLN-YX-m5u"/>
|
||||
<outletCollection property="gestureRecognizers" destination="iVR-Au-pTp" appends="YES" id="abb-Ql-z0p"/>
|
||||
</connections>
|
||||
</tableView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<accessibility key="accessibilityConfiguration" identifier="ManagerView"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" priority="750" constant="375" id="6Nm-Md-fZo"/>
|
||||
<constraint firstItem="Zqd-YQ-ksD" firstAttribute="top" secondItem="s0L-ul-gog" secondAttribute="bottom" id="9N3-Ti-W95"/>
|
||||
<constraint firstItem="mqc-M4-MPb" firstAttribute="top" secondItem="Zqd-YQ-ksD" secondAttribute="bottom" id="A2s-eg-1CW"/>
|
||||
<constraint firstAttribute="bottomMargin" secondItem="mqc-M4-MPb" secondAttribute="bottom" id="JoD-oZ-xgY"/>
|
||||
<constraint firstAttribute="trailingMargin" secondItem="s0L-ul-gog" secondAttribute="trailing" constant="-8" id="Ndx-K2-qQ5"/>
|
||||
<constraint firstAttribute="trailingMargin" secondItem="mqc-M4-MPb" secondAttribute="trailing" constant="-8" id="WgX-mu-BCG"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Zqd-YQ-ksD" secondAttribute="trailing" id="XkJ-fe-lyj"/>
|
||||
<constraint firstItem="s0L-ul-gog" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leadingMargin" constant="-8" id="aDI-kT-6Ao"/>
|
||||
<constraint firstItem="Zqd-YQ-ksD" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="cgy-zG-Qpu"/>
|
||||
<constraint firstItem="mqc-M4-MPb" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leadingMargin" constant="-8" id="gvJ-kF-Ylk"/>
|
||||
<constraint firstItem="s0L-ul-gog" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="ub9-gl-pdn"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="Background"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<accessibility key="accessibilityConfiguration" identifier="ControllerView"/>
|
||||
<gestureRecognizers/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="i5M-Pr-FkT" secondAttribute="trailing" id="Bnz-SA-yXA"/>
|
||||
<constraint firstItem="i5M-Pr-FkT" firstAttribute="leading" secondItem="TKX-qe-h4F" secondAttribute="leading" id="Pui-FF-qOT"/>
|
||||
<constraint firstAttribute="bottom" secondItem="i5M-Pr-FkT" secondAttribute="bottom" id="qXL-Hf-8X6"/>
|
||||
<constraint firstItem="i5M-Pr-FkT" firstAttribute="top" relation="greaterThanOrEqual" secondItem="TKX-qe-h4F" secondAttribute="top" constant="72" id="sYB-lu-PhM"/>
|
||||
</constraints>
|
||||
<viewLayoutGuide key="safeArea" id="hNI-dt-MwJ"/>
|
||||
<point key="canvasLocation" x="-239.5" y="-48.5"/>
|
||||
</view>
|
||||
<tapGestureRecognizer id="deN-Z9-rbS" userLabel="Cancel Tap Gesture Recognizer">
|
||||
<connections>
|
||||
<action selector="onCancel" destination="-1" id="QyM-e1-7JM"/>
|
||||
</connections>
|
||||
</tapGestureRecognizer>
|
||||
<pongPressGestureRecognizer allowableMovement="10" minimumPressDuration="0.10000000000000001" id="iVR-Au-pTp">
|
||||
<connections>
|
||||
<action selector="gestureRecognized:" destination="-1" id="osy-Ks-njV"/>
|
||||
</connections>
|
||||
</pongPressGestureRecognizer>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="ic_get_position" width="20" height="20"/>
|
||||
<image name="ic_route_manager_trash" width="24" height="24"/>
|
||||
</resources>
|
||||
</document>
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
@objc(MWMRouteManagerViewModel)
|
||||
final class RouteManagerViewModel: NSObject, RouteManagerViewModelProtocol {
|
||||
var routePoints: [MWMRoutePoint] { return MWMRouter.points() }
|
||||
var refreshControlsCallback: (() -> Void)!
|
||||
var reloadCallback: (() -> Void)!
|
||||
|
||||
func startTransaction() { MWMRouter.openRouteManagerTransaction() }
|
||||
|
||||
func finishTransaction() {
|
||||
MWMRouter.applyRouteManagerTransaction()
|
||||
MWMRouter.rebuild(withBestRouter: false)
|
||||
}
|
||||
|
||||
func cancelTransaction() { MWMRouter.cancelRouteManagerTransaction() }
|
||||
|
||||
func addLocationPoint() {
|
||||
MWMRouter.addPoint(MWMRoutePoint(lastLocationAndType: .start, intermediateIndex: 0))
|
||||
MWMRouter.updatePreviewMode()
|
||||
refreshControlsCallback()
|
||||
}
|
||||
func movePoint(at index: Int, to newIndex: Int) {
|
||||
MWMRouter.movePoint(at: index, to: newIndex)
|
||||
MWMRouter.updatePreviewMode()
|
||||
refreshControlsCallback()
|
||||
}
|
||||
func deletePoint(at index: Int) {
|
||||
MWMRouter.removePoint(routePoints[index])
|
||||
MWMRouter.updatePreviewMode()
|
||||
refreshControlsCallback()
|
||||
reloadCallback()
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
@objc(MWMRouteManagerViewModelProtocol)
|
||||
protocol RouteManagerViewModelProtocol: AnyObject {
|
||||
var routePoints: [MWMRoutePoint] { get }
|
||||
|
||||
var refreshControlsCallback: (() -> Void)! { get set }
|
||||
var reloadCallback: (() -> Void)! { get set }
|
||||
|
||||
func startTransaction()
|
||||
func finishTransaction()
|
||||
func cancelTransaction()
|
||||
|
||||
func addLocationPoint()
|
||||
func movePoint(at index: Int, to newIndex: Int)
|
||||
func deletePoint(at index: Int)
|
||||
}
|
||||
|
|
@ -0,0 +1,194 @@
|
|||
@objc(MWMBaseRoutePreviewStatus)
|
||||
final class BaseRoutePreviewStatus: SolidTouchView {
|
||||
@IBOutlet private weak var errorBox: UIView!
|
||||
@IBOutlet private weak var resultsBox: UIView!
|
||||
@IBOutlet private weak var heightBox: UIView!
|
||||
@IBOutlet private weak var manageRouteBox: UIView!
|
||||
@IBOutlet weak var manageRouteBoxBackground: UIView! {
|
||||
didSet {
|
||||
manageRouteBoxBackground.setStyle(.blackOpaqueBackground)
|
||||
}
|
||||
}
|
||||
|
||||
@IBOutlet private weak var errorLabel: UILabel!
|
||||
@IBOutlet private weak var resultLabel: UILabel!
|
||||
@IBOutlet private weak var arriveLabel: UILabel?
|
||||
@IBOutlet private weak var heightProfileImage: UIImageView!
|
||||
@IBOutlet private weak var heightProfileElevationHeight: UILabel?
|
||||
@IBOutlet private weak var manageRouteButtonRegular: UIButton! {
|
||||
didSet {
|
||||
configManageRouteButton(manageRouteButtonRegular)
|
||||
}
|
||||
}
|
||||
|
||||
@IBOutlet private weak var manageRouteButtonCompact: UIButton? {
|
||||
didSet {
|
||||
configManageRouteButton(manageRouteButtonCompact!)
|
||||
}
|
||||
}
|
||||
|
||||
@IBOutlet private weak var saveRouteAsTrackButtonRegular: UIButton! {
|
||||
didSet {
|
||||
configSaveRouteAsTrackButton(saveRouteAsTrackButtonRegular)
|
||||
}
|
||||
}
|
||||
|
||||
@IBOutlet private weak var saveRouteAsTrackButtonCompact: UIButton! {
|
||||
didSet {
|
||||
configSaveRouteAsTrackButton(saveRouteAsTrackButtonCompact)
|
||||
}
|
||||
}
|
||||
|
||||
@IBOutlet private var errorBoxBottom: NSLayoutConstraint!
|
||||
@IBOutlet private var resultsBoxBottom: NSLayoutConstraint!
|
||||
@IBOutlet private var heightBoxBottom: NSLayoutConstraint!
|
||||
@IBOutlet private var manageRouteBoxBottom: NSLayoutConstraint!
|
||||
@IBOutlet private var heightBoxBottomManageRouteBoxTop: NSLayoutConstraint!
|
||||
|
||||
@objc weak var ownerView: UIView!
|
||||
|
||||
weak var navigationInfo: MWMNavigationDashboardEntity?
|
||||
|
||||
static let elevationAttributes: [NSAttributedString.Key: Any] =
|
||||
[
|
||||
.foregroundColor: UIColor.linkBlue(),
|
||||
.font: UIFont.medium14()
|
||||
]
|
||||
|
||||
var elevation: NSAttributedString? {
|
||||
didSet {
|
||||
updateResultsLabel()
|
||||
}
|
||||
}
|
||||
|
||||
private var isVisible = false {
|
||||
didSet {
|
||||
addView()
|
||||
isHidden = !isVisible
|
||||
}
|
||||
}
|
||||
|
||||
private func addView() {
|
||||
guard superview != ownerView else { return }
|
||||
ownerView.addSubview(self)
|
||||
|
||||
let lg = ownerView.safeAreaLayoutGuide
|
||||
leadingAnchor.constraint(equalTo: lg.leadingAnchor).isActive = true
|
||||
trailingAnchor.constraint(equalTo: lg.trailingAnchor).isActive = true
|
||||
bottomAnchor.constraint(equalTo: lg.bottomAnchor).isActive = true
|
||||
ownerView.layoutIfNeeded()
|
||||
}
|
||||
|
||||
private func updateHeight() {
|
||||
DispatchQueue.main.async {
|
||||
self.animateConstraints(animations: {
|
||||
self.errorBoxBottom.isActive = !self.errorBox.isHidden
|
||||
self.resultsBoxBottom.isActive = !self.resultsBox.isHidden
|
||||
self.heightBoxBottom.isActive = !self.heightBox.isHidden
|
||||
self.heightBoxBottomManageRouteBoxTop.isActive = !self.heightBox.isHidden
|
||||
self.manageRouteBoxBottom.isActive = !self.manageRouteBox.isHidden
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
private func configManageRouteButton(_ button: UIButton) {
|
||||
button.setImagePadding(8)
|
||||
button.setTitle(L("planning_route_manage_route"), for: .normal)
|
||||
}
|
||||
|
||||
private func configSaveRouteAsTrackButton(_ button: UIButton) {
|
||||
button.setImagePadding(8)
|
||||
button.setTitle(L("save"), for: .normal)
|
||||
button.setTitle(L("saved"), for: .disabled)
|
||||
}
|
||||
|
||||
override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
|
||||
super.traitCollectionDidChange(previousTraitCollection)
|
||||
updateManageRouteVisibility()
|
||||
updateHeight()
|
||||
updateResultsLabel()
|
||||
}
|
||||
|
||||
private func updateManageRouteVisibility() {
|
||||
let isCompact = traitCollection.verticalSizeClass == .compact
|
||||
manageRouteBox.isHidden = isCompact || resultsBox.isHidden
|
||||
manageRouteButtonCompact?.isHidden = !isCompact
|
||||
saveRouteAsTrackButtonCompact.isHidden = !isCompact
|
||||
}
|
||||
|
||||
@objc func hide() {
|
||||
isVisible = false
|
||||
}
|
||||
|
||||
@objc func showError(message: String) {
|
||||
isVisible = true
|
||||
errorBox.isHidden = false
|
||||
resultsBox.isHidden = true
|
||||
heightBox.isHidden = true
|
||||
manageRouteBox.isHidden = true
|
||||
errorLabel.text = message
|
||||
updateHeight()
|
||||
}
|
||||
|
||||
@objc func showReady() {
|
||||
isVisible = true
|
||||
errorBox.isHidden = true
|
||||
resultsBox.isHidden = false
|
||||
elevation = nil
|
||||
if MWMRouter.hasRouteAltitude() {
|
||||
heightBox.isHidden = false
|
||||
MWMRouter.routeAltitudeImage(for: heightProfileImage.frame.size,
|
||||
completion: { image, totalAscent, totalDescent in
|
||||
self.heightProfileImage.image = image
|
||||
if let totalAscent = totalAscent, let totalDescent = totalDescent {
|
||||
self.elevation = NSAttributedString(string: "↗ \(totalAscent) ↘ \(totalDescent)", attributes: BaseRoutePreviewStatus.elevationAttributes)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
heightBox.isHidden = true
|
||||
}
|
||||
setRouteAsTrackButtonEnabled(true)
|
||||
updateManageRouteVisibility()
|
||||
updateHeight()
|
||||
}
|
||||
|
||||
@objc func setRouteSaved(_ isSaved: Bool) {
|
||||
setRouteAsTrackButtonEnabled(!isSaved)
|
||||
}
|
||||
|
||||
private func setRouteAsTrackButtonEnabled(_ isEnabled: Bool) {
|
||||
saveRouteAsTrackButtonRegular.isEnabled = isEnabled
|
||||
saveRouteAsTrackButtonCompact.isEnabled = isEnabled
|
||||
}
|
||||
|
||||
private func updateResultsLabel() {
|
||||
guard let info = navigationInfo else { return }
|
||||
|
||||
if let result = info.estimate().mutableCopy() as? NSMutableAttributedString {
|
||||
if let elevation = self.elevation {
|
||||
result.append(MWMNavigationDashboardEntity.estimateDot())
|
||||
result.append(elevation)
|
||||
}
|
||||
|
||||
resultLabel.attributedText = result
|
||||
}
|
||||
}
|
||||
|
||||
@objc func onNavigationInfoUpdated(_ info: MWMNavigationDashboardEntity) {
|
||||
navigationInfo = info
|
||||
updateResultsLabel()
|
||||
arriveLabel?.text = String(format: L("routing_arrive"), arguments: [info.arrival])
|
||||
}
|
||||
|
||||
override var sideButtonsAreaAffectDirections: MWMAvailableAreaAffectDirections {
|
||||
return .bottom
|
||||
}
|
||||
|
||||
override var visibleAreaAffectDirections: MWMAvailableAreaAffectDirections {
|
||||
return .bottom
|
||||
}
|
||||
|
||||
override var widgetsAreaAffectDirections: MWMAvailableAreaAffectDirections {
|
||||
return .bottom
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,93 @@
|
|||
@objc(MWMTransportRoutePreviewStatus)
|
||||
final class TransportRoutePreviewStatus: SolidTouchView {
|
||||
@IBOutlet private weak var etaLabel: UILabel!
|
||||
@IBOutlet private weak var stepsCollectionView: TransportTransitStepsCollectionView!
|
||||
@IBOutlet private weak var stepsCollectionViewHeight: NSLayoutConstraint!
|
||||
@IBOutlet private weak var stepsCollectionScrollView: UIScrollView?
|
||||
|
||||
@objc weak var ownerView: UIView!
|
||||
|
||||
weak var navigationInfo: MWMNavigationDashboardEntity?
|
||||
|
||||
private var isVisible = false {
|
||||
didSet {
|
||||
guard isVisible != oldValue else { return }
|
||||
if isVisible {
|
||||
addView()
|
||||
} else {
|
||||
self.removeFromSuperview()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private func addView() {
|
||||
guard superview != ownerView else { return }
|
||||
ownerView.addSubview(self)
|
||||
|
||||
let lg = ownerView.safeAreaLayoutGuide
|
||||
leadingAnchor.constraint(equalTo: lg.leadingAnchor).isActive = true
|
||||
trailingAnchor.constraint(equalTo: lg.trailingAnchor).isActive = true
|
||||
bottomAnchor.constraint(equalTo: lg.bottomAnchor).isActive = true
|
||||
}
|
||||
|
||||
@objc func hide() {
|
||||
isVisible = false
|
||||
}
|
||||
|
||||
@objc func showReady() {
|
||||
isVisible = true
|
||||
updateHeight()
|
||||
}
|
||||
|
||||
@objc func onNavigationInfoUpdated(_ info: MWMNavigationDashboardEntity, prependDistance: Bool) {
|
||||
navigationInfo = info
|
||||
if (prependDistance) {
|
||||
let labelText = NSMutableAttributedString(string: NSLocalizedString("placepage_distance", comment: "") + ": ")
|
||||
labelText.append(info.estimate())
|
||||
etaLabel.attributedText = labelText
|
||||
}
|
||||
else {
|
||||
etaLabel.attributedText = info.estimate()
|
||||
}
|
||||
stepsCollectionView.steps = info.transitSteps
|
||||
|
||||
stepsCollectionView.isHidden = info.transitSteps.isEmpty
|
||||
stepsCollectionScrollView?.isHidden = info.transitSteps.isEmpty
|
||||
}
|
||||
|
||||
private func updateHeight() {
|
||||
guard stepsCollectionViewHeight.constant != stepsCollectionView.contentSize.height else { return }
|
||||
DispatchQueue.main.async {
|
||||
self.animateConstraints(animations: {
|
||||
self.stepsCollectionViewHeight.constant = self.stepsCollectionView.contentSize.height
|
||||
})
|
||||
|
||||
if let sv = self.stepsCollectionScrollView {
|
||||
let bottomOffset = CGPoint(x: 0, y: sv.contentSize.height - sv.bounds.size.height)
|
||||
sv.setContentOffset(bottomOffset, animated: true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override func layoutSubviews() {
|
||||
super.layoutSubviews()
|
||||
updateHeight()
|
||||
}
|
||||
|
||||
override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
|
||||
super.traitCollectionDidChange(previousTraitCollection)
|
||||
updateHeight()
|
||||
}
|
||||
|
||||
override var sideButtonsAreaAffectDirections: MWMAvailableAreaAffectDirections {
|
||||
return .bottom
|
||||
}
|
||||
|
||||
override var visibleAreaAffectDirections: MWMAvailableAreaAffectDirections {
|
||||
return .bottom
|
||||
}
|
||||
|
||||
override var widgetsAreaAffectDirections: MWMAvailableAreaAffectDirections {
|
||||
return .bottom
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
final class TransportRuler: TransportTransitCell {
|
||||
enum Config {
|
||||
static var backgroundColor: UIColor { return UIColor.blackOpaque() }
|
||||
static var imageColor: UIColor { return UIColor.blackSecondaryText() }
|
||||
static var labelTextColor: UIColor { return .black }
|
||||
static let labelTextFont = UIFont.bold12()
|
||||
static let labelTrailing: CGFloat = 8
|
||||
}
|
||||
|
||||
@IBOutlet private weak var background: UIView! {
|
||||
didSet {
|
||||
background.layer.setCornerRadius(.buttonSmall)
|
||||
background.backgroundColor = Config.backgroundColor
|
||||
}
|
||||
}
|
||||
|
||||
@IBOutlet private weak var label: UILabel! {
|
||||
didSet {
|
||||
label.textColor = Config.labelTextColor
|
||||
label.font = Config.labelTextFont
|
||||
}
|
||||
}
|
||||
|
||||
override class func estimatedCellSize(step: MWMRouterTransitStepInfo) -> CGSize {
|
||||
let defaultSize = super.estimatedCellSize(step: step)
|
||||
let labelText = step.distance + " " + step.distanceUnits;
|
||||
let labelSize = labelText.size(width: CGFloat.greatestFiniteMagnitude, font: Config.labelTextFont, maxNumberOfLines: 1)
|
||||
return CGSize(width: labelSize.width + Config.labelTrailing, height: defaultSize.height)
|
||||
}
|
||||
|
||||
override func config(step: MWMRouterTransitStepInfo) {
|
||||
label.isHidden = step.distance.isEmpty && step.distanceUnits.isEmpty
|
||||
label.text = step.distance + " " + step.distanceUnits
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="gTV-IL-0wX" customClass="TransportRuler" customModule="CoMaps" customModuleProvider="target" propertyAccessControl="all">
|
||||
<rect key="frame" x="0.0" y="0.0" width="20" height="20"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
|
||||
<rect key="frame" x="0.0" y="0.0" width="20" height="20"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="zFu-7m-DoW">
|
||||
<rect key="frame" x="0.0" y="0.0" width="20" height="20"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="450" verticalCompressionResistancePriority="450" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="E5p-F1-lok">
|
||||
<rect key="frame" x="-25.5" y="0.0" width="41.5" height="20"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="E5p-F1-lok" secondAttribute="trailing" priority="750" id="5NZ-eM-6di"/>
|
||||
<constraint firstAttribute="bottom" secondItem="E5p-F1-lok" secondAttribute="bottom" id="Gu9-KZ-D9R"/>
|
||||
<constraint firstAttribute="trailing" secondItem="E5p-F1-lok" secondAttribute="trailing" priority="250" constant="4" id="YNn-8w-SmG"/>
|
||||
<constraint firstItem="E5p-F1-lok" firstAttribute="top" secondItem="zFu-7m-DoW" secondAttribute="top" id="ZPx-f9-8LV"/>
|
||||
<constraint firstAttribute="height" constant="20" id="nQ0-T1-CvV"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
</view>
|
||||
<viewLayoutGuide key="safeArea" id="UN7-Tp-qio"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="zFu-7m-DoW" secondAttribute="bottom" id="3wL-hq-d5s"/>
|
||||
<constraint firstItem="zFu-7m-DoW" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="JMg-4a-h4Z"/>
|
||||
<constraint firstItem="zFu-7m-DoW" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="MOo-JD-4vU"/>
|
||||
<constraint firstAttribute="trailing" secondItem="zFu-7m-DoW" secondAttribute="trailing" id="gmg-yt-uVD"/>
|
||||
</constraints>
|
||||
<size key="customSize" width="744" height="20"/>
|
||||
<connections>
|
||||
<outlet property="background" destination="zFu-7m-DoW" id="fh8-Ss-FeL"/>
|
||||
<outlet property="label" destination="E5p-F1-lok" id="rsx-8D-Hvq"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="612.79999999999995" y="48.575712143928037"/>
|
||||
</collectionViewCell>
|
||||
</objects>
|
||||
</document>
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
class TransportTransitCell: UICollectionViewCell {
|
||||
enum Config {
|
||||
static let cellSize = CGSize(width: 20, height: 20)
|
||||
}
|
||||
|
||||
class func estimatedCellSize(step _: MWMRouterTransitStepInfo) -> CGSize {
|
||||
return Config.cellSize
|
||||
}
|
||||
|
||||
func config(step _: MWMRouterTransitStepInfo) {}
|
||||
}
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
final class TransportTransitFlowLayout: UICollectionViewLayout {
|
||||
enum Config {
|
||||
static let lineSpacing = CGFloat(8)
|
||||
static let separator = TransportTransitSeparator.self
|
||||
static let separatorKind = toString(separator)
|
||||
static let separatorSize = CGSize(width: 16, height: 20)
|
||||
static let minimumCellWidthAfterShrink = CGFloat(56)
|
||||
}
|
||||
|
||||
private var cellsLayoutAttrs = [UICollectionViewLayoutAttributes]()
|
||||
private var decoratorsLayoutAttrs = [UICollectionViewLayoutAttributes]()
|
||||
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
register(Config.separator, forDecorationViewOfKind: Config.separatorKind)
|
||||
}
|
||||
|
||||
override var collectionViewContentSize: CGSize {
|
||||
let width = collectionView?.frame.width ?? 0
|
||||
let height = cellsLayoutAttrs.reduce(0) { return max($0, $1.frame.maxY) }
|
||||
return CGSize(width: width, height: height)
|
||||
}
|
||||
|
||||
override func prepare() {
|
||||
super.prepare()
|
||||
let cv = collectionView as! TransportTransitStepsCollectionView
|
||||
|
||||
let section = 0
|
||||
let width = cv.width
|
||||
var x = CGFloat(0)
|
||||
var y = CGFloat(0)
|
||||
|
||||
cellsLayoutAttrs = []
|
||||
decoratorsLayoutAttrs = []
|
||||
for item in 0 ..< cv.numberOfItems(inSection: section) {
|
||||
let ip = IndexPath(item: item, section: section)
|
||||
|
||||
if item != 0 {
|
||||
let sepAttr = UICollectionViewLayoutAttributes(forDecorationViewOfKind: Config.separatorKind, with: ip)
|
||||
sepAttr.frame = CGRect(origin: CGPoint(x: x, y: y), size: Config.separatorSize)
|
||||
decoratorsLayoutAttrs.append(sepAttr)
|
||||
|
||||
x += Config.separatorSize.width
|
||||
}
|
||||
|
||||
var cellSize = cv.estimatedCellSize(item: item)
|
||||
let spaceLeft = width - x - Config.separatorSize.width
|
||||
let minimumSpaceRequired = min(cellSize.width, Config.minimumCellWidthAfterShrink)
|
||||
if spaceLeft < minimumSpaceRequired {
|
||||
x = 0
|
||||
y += Config.separatorSize.height + Config.lineSpacing
|
||||
} else {
|
||||
cellSize.width = min(cellSize.width, spaceLeft)
|
||||
}
|
||||
|
||||
let cellAttr = UICollectionViewLayoutAttributes(forCellWith: ip)
|
||||
cellAttr.frame = CGRect(origin: CGPoint(x: x, y: y), size: cellSize)
|
||||
cellsLayoutAttrs.append(cellAttr)
|
||||
|
||||
x += cellSize.width
|
||||
}
|
||||
}
|
||||
|
||||
override func layoutAttributesForItem(at indexPath: IndexPath) -> UICollectionViewLayoutAttributes? {
|
||||
return cellsLayoutAttrs.first(where: { $0.indexPath == indexPath })
|
||||
}
|
||||
|
||||
override func layoutAttributesForDecorationView(ofKind _: String, at indexPath: IndexPath) -> UICollectionViewLayoutAttributes? {
|
||||
return decoratorsLayoutAttrs.first(where: { $0.indexPath == indexPath })
|
||||
}
|
||||
|
||||
override func layoutAttributesForElements(in rect: CGRect) -> [UICollectionViewLayoutAttributes]? {
|
||||
var layoutAttrs = cellsLayoutAttrs.filter { $0.frame.intersects(rect) }
|
||||
layoutAttrs.append(contentsOf: decoratorsLayoutAttrs.filter { $0.frame.intersects(rect) })
|
||||
return layoutAttrs
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
final class TransportTransitIntermediatePoint: TransportTransitCell {
|
||||
enum Config {
|
||||
static var imageColor: UIColor { return UIColor.primary() }
|
||||
}
|
||||
|
||||
@IBOutlet private weak var image: UIImageView!
|
||||
override func config(step: MWMRouterTransitStepInfo) {
|
||||
super.config(step: step)
|
||||
let i = step.intermediateIndex + 1
|
||||
// TODO: Properly support more than 20 icons.
|
||||
var iconName = "route-point-20"
|
||||
if (i >= 1 && i < 20) {
|
||||
iconName = "route-point-" + String(i)
|
||||
}
|
||||
image.image = #imageLiteral(resourceName: iconName)
|
||||
image.tintColor = Config.imageColor
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="gTV-IL-0wX" customClass="TransportTransitIntermediatePoint" customModule="CoMaps" customModuleProvider="target" propertyAccessControl="all">
|
||||
<rect key="frame" x="0.0" y="0.0" width="20" height="20"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
|
||||
<rect key="frame" x="0.0" y="0.0" width="20" height="20"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="route-point-1" translatesAutoresizingMaskIntoConstraints="NO" id="kZf-7J-OZ5">
|
||||
<rect key="frame" x="0.0" y="0.0" width="20" height="20"/>
|
||||
<color key="tintColor" red="0.1215686275" green="0.59999999999999998" blue="0.32156862749999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="20" id="OkK-UD-TWr"/>
|
||||
<constraint firstAttribute="height" constant="20" id="n8x-xG-gUb"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
</subviews>
|
||||
</view>
|
||||
<constraints>
|
||||
<constraint firstItem="kZf-7J-OZ5" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="5rb-Q4-qua"/>
|
||||
<constraint firstAttribute="bottom" secondItem="kZf-7J-OZ5" secondAttribute="bottom" id="5uG-SP-l0m"/>
|
||||
<constraint firstItem="kZf-7J-OZ5" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="KiE-6N-4Jp"/>
|
||||
<constraint firstAttribute="trailing" secondItem="kZf-7J-OZ5" secondAttribute="trailing" id="mJI-lD-bsw"/>
|
||||
</constraints>
|
||||
<viewLayoutGuide key="safeArea" id="Aa6-gi-Bkw"/>
|
||||
<size key="customSize" width="490" height="20"/>
|
||||
<connections>
|
||||
<outlet property="image" destination="kZf-7J-OZ5" id="b9M-uB-XoA"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="270" y="54"/>
|
||||
</collectionViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="route-point-1" width="24" height="24"/>
|
||||
</resources>
|
||||
</document>
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
final class TransportTransitPedestrian: TransportTransitCell {
|
||||
enum Config {
|
||||
static var backgroundColor: UIColor { return UIColor.blackOpaque() }
|
||||
static var imageColor: UIColor { return UIColor.blackSecondaryText() }
|
||||
}
|
||||
|
||||
@IBOutlet private weak var background: UIView! {
|
||||
didSet {
|
||||
background.layer.setCornerRadius(.buttonSmall)
|
||||
background.backgroundColor = Config.backgroundColor
|
||||
}
|
||||
}
|
||||
|
||||
@IBOutlet private weak var image: UIImageView! {
|
||||
didSet {
|
||||
image.image = UIImage(resource: .icWalk)
|
||||
image.tintColor = Config.imageColor
|
||||
image.contentMode = .scaleAspectFit
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="gTV-IL-0wX" customClass="TransportTransitPedestrian" customModule="CoMaps" customModuleProvider="target" propertyAccessControl="all">
|
||||
<rect key="frame" x="0.0" y="0.0" width="20" height="20"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
|
||||
<rect key="frame" x="0.0" y="0.0" width="20" height="20"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Shb-td-cXL">
|
||||
<rect key="frame" x="0.0" y="0.0" width="20" height="20"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" insetsLayoutMarginsFromSafeArea="NO" image="ic_walk" translatesAutoresizingMaskIntoConstraints="NO" id="9hI-Y9-uRa">
|
||||
<rect key="frame" x="3" y="3" width="14" height="14"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="14" id="EeL-qS-rKg"/>
|
||||
<constraint firstAttribute="height" constant="14" id="WCk-l4-hQF"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="9hI-Y9-uRa" firstAttribute="centerY" secondItem="Shb-td-cXL" secondAttribute="centerY" id="IkJ-Yh-48o"/>
|
||||
<constraint firstAttribute="height" constant="20" id="hEu-YE-u8j"/>
|
||||
<constraint firstAttribute="width" constant="20" id="pxM-8S-VsE"/>
|
||||
<constraint firstItem="9hI-Y9-uRa" firstAttribute="centerX" secondItem="Shb-td-cXL" secondAttribute="centerX" id="vZX-k3-HmM"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
</view>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="Shb-td-cXL" secondAttribute="trailing" id="JRQ-z7-d3U"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Shb-td-cXL" secondAttribute="bottom" id="nDY-rn-9J0"/>
|
||||
<constraint firstItem="Shb-td-cXL" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="pu1-LW-wkd"/>
|
||||
<constraint firstItem="Shb-td-cXL" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="ymH-iI-Ify"/>
|
||||
</constraints>
|
||||
<viewLayoutGuide key="safeArea" id="gmH-YP-0pW"/>
|
||||
<size key="customSize" width="227" height="20"/>
|
||||
<connections>
|
||||
<outlet property="background" destination="Shb-td-cXL" id="YAM-iA-NYW"/>
|
||||
<outlet property="image" destination="9hI-Y9-uRa" id="9i8-eW-XWO"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="137.5" y="54"/>
|
||||
</collectionViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="ic_walk" width="24" height="24"/>
|
||||
</resources>
|
||||
</document>
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
final class TransportTransitSeparator: UICollectionReusableView {
|
||||
override init(frame: CGRect) {
|
||||
super.init(frame: frame)
|
||||
setup()
|
||||
}
|
||||
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
setup()
|
||||
}
|
||||
|
||||
private func setup() {
|
||||
let image = UIImageView(image: #imageLiteral(resourceName: "ic_arrow"))
|
||||
image.setStyle(.black)
|
||||
image.contentMode = .scaleAspectFit
|
||||
addSubview(image)
|
||||
}
|
||||
|
||||
override func layoutSubviews() {
|
||||
super.layoutSubviews()
|
||||
subviews.first!.frame = bounds
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
final class TransportTransitStepsCollectionView: UICollectionView {
|
||||
var steps: [MWMRouterTransitStepInfo] = [] {
|
||||
didSet {
|
||||
reloadData()
|
||||
}
|
||||
}
|
||||
|
||||
override var frame: CGRect {
|
||||
didSet {
|
||||
collectionViewLayout.invalidateLayout()
|
||||
}
|
||||
}
|
||||
|
||||
override var bounds: CGRect {
|
||||
didSet {
|
||||
collectionViewLayout.invalidateLayout()
|
||||
}
|
||||
}
|
||||
|
||||
override func awakeFromNib() {
|
||||
super.awakeFromNib()
|
||||
dataSource = self
|
||||
[TransportTransitIntermediatePoint.self, TransportTransitPedestrian.self,
|
||||
TransportTransitTrain.self, TransportRuler.self].forEach {
|
||||
register(cellClass: $0)
|
||||
}
|
||||
}
|
||||
|
||||
private func cellClass(item: Int) -> TransportTransitCell.Type {
|
||||
let step = steps[item]
|
||||
switch step.type {
|
||||
case .intermediatePoint: return TransportTransitIntermediatePoint.self
|
||||
case .pedestrian: return TransportTransitPedestrian.self
|
||||
case .train: fallthrough
|
||||
case .subway: fallthrough
|
||||
case .lightRail: fallthrough
|
||||
case .monorail: return TransportTransitTrain.self
|
||||
case .ruler: return TransportRuler.self
|
||||
}
|
||||
}
|
||||
|
||||
func estimatedCellSize(item: Int) -> CGSize {
|
||||
return cellClass(item: item).estimatedCellSize(step: steps[item])
|
||||
}
|
||||
}
|
||||
|
||||
extension TransportTransitStepsCollectionView: UICollectionViewDataSource {
|
||||
func collectionView(_: UICollectionView, numberOfItemsInSection _: Int) -> Int {
|
||||
return steps.count
|
||||
}
|
||||
|
||||
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
|
||||
let item = indexPath.item
|
||||
let cellClass = self.cellClass(item: item)
|
||||
let cell = collectionView.dequeueReusableCell(withCellClass: cellClass, indexPath: indexPath) as! TransportTransitCell
|
||||
cell.config(step: steps[item])
|
||||
return cell
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
final class TransportTransitTrain: TransportTransitCell {
|
||||
enum Config {
|
||||
static var labelTextColor: UIColor { return .white }
|
||||
static let labelTextFont = UIFont.bold12()
|
||||
static let labelTrailing: CGFloat = 4
|
||||
}
|
||||
|
||||
@IBOutlet private weak var background: UIView! {
|
||||
didSet {
|
||||
background.layer.setCornerRadius(.buttonSmall)
|
||||
}
|
||||
}
|
||||
|
||||
@IBOutlet private weak var image: UIImageView!
|
||||
@IBOutlet private weak var label: UILabel! {
|
||||
didSet {
|
||||
label.textColor = Config.labelTextColor
|
||||
label.font = Config.labelTextFont
|
||||
}
|
||||
}
|
||||
|
||||
@IBOutlet private weak var labelTrailing: NSLayoutConstraint! {
|
||||
didSet {
|
||||
labelTrailing.constant = Config.labelTrailing
|
||||
}
|
||||
}
|
||||
|
||||
@IBOutlet private var emptyNumberTrailingOffset: NSLayoutConstraint!
|
||||
|
||||
override class func estimatedCellSize(step: MWMRouterTransitStepInfo) -> CGSize {
|
||||
let defaultSize = super.estimatedCellSize(step: step)
|
||||
let labelSize = step.number.size(width: CGFloat.greatestFiniteMagnitude, font: Config.labelTextFont, maxNumberOfLines: 1)
|
||||
return CGSize(width: defaultSize.width + labelSize.width + Config.labelTrailing, height: defaultSize.height)
|
||||
}
|
||||
|
||||
override func config(step: MWMRouterTransitStepInfo) {
|
||||
switch step.type {
|
||||
case .intermediatePoint: fallthrough
|
||||
case .pedestrian: fatalError()
|
||||
case .train: image.image = #imageLiteral(resourceName: "ic_20px_route_planning_train")
|
||||
case .subway: image.image = #imageLiteral(resourceName: "ic_20px_route_planning_metro")
|
||||
case .lightRail: image.image = #imageLiteral(resourceName: "ic_20px_route_planning_lightrail")
|
||||
case .monorail: image.image = #imageLiteral(resourceName: "ic_20px_route_planning_monorail")
|
||||
case .ruler: fatalError()
|
||||
}
|
||||
background.backgroundColor = step.color
|
||||
|
||||
emptyNumberTrailingOffset.isActive = step.number.isEmpty
|
||||
label.isHidden = step.number.isEmpty
|
||||
label.text = step.number
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
|
||||
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="gTV-IL-0wX" customClass="TransportTransitTrain" customModule="CoMaps" customModuleProvider="target" propertyAccessControl="all">
|
||||
<rect key="frame" x="0.0" y="0.0" width="20" height="20"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
|
||||
<rect key="frame" x="0.0" y="0.0" width="20" height="20"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="kDc-o2-JUp">
|
||||
<rect key="frame" x="0.0" y="0.0" width="20" height="20"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="9d1-PP-h28">
|
||||
<rect key="frame" x="0.0" y="0.0" width="20" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" secondItem="9d1-PP-h28" secondAttribute="height" multiplier="1:1" id="g45-u1-mQs"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="450" verticalCompressionResistancePriority="450" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0Eo-0D-mup">
|
||||
<rect key="frame" x="20" y="0.0" width="0.0" height="20"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="9d1-PP-h28" firstAttribute="top" secondItem="kDc-o2-JUp" secondAttribute="top" id="3Nm-tA-OCb"/>
|
||||
<constraint firstItem="0Eo-0D-mup" firstAttribute="leading" secondItem="9d1-PP-h28" secondAttribute="trailing" id="3sb-9G-W6c"/>
|
||||
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="0Eo-0D-mup" secondAttribute="trailing" priority="750" id="5NZ-eM-6di"/>
|
||||
<constraint firstAttribute="bottom" secondItem="0Eo-0D-mup" secondAttribute="bottom" id="Gu9-KZ-D9R"/>
|
||||
<constraint firstAttribute="trailing" secondItem="0Eo-0D-mup" secondAttribute="trailing" priority="250" constant="4" id="YNn-8w-SmG"/>
|
||||
<constraint firstItem="0Eo-0D-mup" firstAttribute="top" secondItem="kDc-o2-JUp" secondAttribute="top" id="ZPx-f9-8LV"/>
|
||||
<constraint firstItem="9d1-PP-h28" firstAttribute="leading" secondItem="kDc-o2-JUp" secondAttribute="leading" id="cQu-Lg-9xy"/>
|
||||
<constraint firstAttribute="bottom" secondItem="9d1-PP-h28" secondAttribute="bottom" id="m4N-mH-YaE"/>
|
||||
<constraint firstAttribute="trailing" secondItem="9d1-PP-h28" secondAttribute="trailing" id="mCa-Ah-9Xz"/>
|
||||
<constraint firstAttribute="height" constant="20" id="nQ0-T1-CvV"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
</view>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="kDc-o2-JUp" secondAttribute="bottom" id="3wL-hq-d5s"/>
|
||||
<constraint firstItem="kDc-o2-JUp" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="JMg-4a-h4Z"/>
|
||||
<constraint firstItem="kDc-o2-JUp" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="MOo-JD-4vU"/>
|
||||
<constraint firstAttribute="trailing" secondItem="kDc-o2-JUp" secondAttribute="trailing" id="gmg-yt-uVD"/>
|
||||
</constraints>
|
||||
<viewLayoutGuide key="safeArea" id="UN7-Tp-qio"/>
|
||||
<size key="customSize" width="744" height="20"/>
|
||||
<connections>
|
||||
<outlet property="background" destination="kDc-o2-JUp" id="fh8-Ss-FeL"/>
|
||||
<outlet property="emptyNumberTrailingOffset" destination="mCa-Ah-9Xz" id="k8k-Ca-u6s"/>
|
||||
<outlet property="image" destination="9d1-PP-h28" id="Kpo-zR-osU"/>
|
||||
<outlet property="label" destination="0Eo-0D-mup" id="Z15-fa-Wkx"/>
|
||||
<outlet property="labelTrailing" destination="YNn-8w-SmG" id="lL1-5q-mjx"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="383" y="54"/>
|
||||
</collectionViewCell>
|
||||
</objects>
|
||||
</document>
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
@objc(MWMRouteStartButton)
|
||||
final class RouteStartButton: UIButton {
|
||||
@objc func statePrepare() {
|
||||
isHidden = false
|
||||
isEnabled = false
|
||||
}
|
||||
|
||||
@objc func stateError() {
|
||||
isHidden = true
|
||||
isEnabled = false
|
||||
}
|
||||
|
||||
@objc func stateReady() {
|
||||
isHidden = false
|
||||
isEnabled = true
|
||||
}
|
||||
|
||||
@objc func stateHidden() {
|
||||
isHidden = true
|
||||
isEnabled = true
|
||||
}
|
||||
|
||||
override func applyTheme() {
|
||||
super.applyTheme()
|
||||
setBackgroundImage(UIColor.linkBlue().getImage(), for: .normal)
|
||||
setBackgroundImage(UIColor.linkBlueHighlighted().getImage(), for: .highlighted)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue