[ios] Remove invisible taxi button from route preview (#3456)

* [ios] Remove invisible taxi button from route preview

The icons are now aligned in center

* [ios] Add invisible helicopter button in route preview storyboard

This is not connected to anything else, it's just a placeholder for future.

* [ios] Use maki bicycle icons

Add the licence to data/copyright.html

* [ios] Add hidden helicopter routing icon and placeholder routing logic

The helicopter routing does not work now, its just a placeholder for future.
The icon is hidden anyway.

* [ios] Remove old code for taxi routing

* [ios] Remove helicopter references from routing code

Router Preview property remains, as it's connected to storyboard

Signed-off-by: Nojus Gudinavičius <nojus.gudinavicius@gmail.com>
This commit is contained in:
nojus297 2022-10-11 00:16:10 +03:00 committed by GitHub
parent 24e5164b74
commit 314273fb4e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 49 additions and 26 deletions

View file

@ -329,6 +329,9 @@
<li><a href="https://www.freepik.com" title="Freepik">Freepik</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a><br>
&copy; 2021 Freepik <a href="https://www.freepikcompany.com/legal#nav-flaticon-agreement" class="license">Freepik Free License</a></li>
<li><a href="https://github.com/mapbox/maki" title="Maki">Maki</a><br>
&copy; 2022 Mapbox <a href="#cc0-1" class="license">CC0 1.0 Universal</a></li>
</ul>
</div>

View file

@ -18,7 +18,7 @@ static CGFloat const kDrivingOptionsHeight = 48;
@property(weak, nonatomic) IBOutlet UIView * contentView;
@property(weak, nonatomic) IBOutlet UIView * pedestrian;
@property(weak, nonatomic) IBOutlet UIView * publicTransport;
@property(weak, nonatomic) IBOutlet UIView * taxi;
@property(weak, nonatomic) IBOutlet UIView * helicopter;
@property(weak, nonatomic) IBOutlet UIView * vehicle;
@property(strong, nonatomic) IBOutlet NSLayoutConstraint * drivingOptionHeightConstraint;
@property(strong, nonatomic) IBOutlet UIButton * drivingOptionsButton;
@ -104,9 +104,6 @@ static CGFloat const kDrivingOptionsHeight = 48;
{
for (auto const & progress : m_progresses)
progress.second.state = MWMCircularProgressStateNormal;
//if (!MWMLocationManager.lastLocation || !Platform::IsConnected())
[self.taxi removeFromSuperview];
}
- (void)selectRouter:(MWMRouterType)routerType

View file

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21225" 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="17703"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21207"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
@ -74,7 +74,7 @@
</connections>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="sXu-tl-a0m" userLabel="Buttons Box">
<rect key="frame" x="52" y="4" width="244" height="40"/>
<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"/>
@ -109,10 +109,10 @@
<constraint firstAttribute="width" secondItem="yiM-fM-sSS" secondAttribute="height" multiplier="1:1" id="1N1-y5-Mwc"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="f6i-lw-K3R" userLabel="Taxi">
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="f6i-lw-K3R" userLabel="Helicopter">
<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="routeTaxi"/>
<accessibility key="accessibilityConfiguration" identifier="routeHelicopter"/>
<constraints>
<constraint firstAttribute="width" secondItem="f6i-lw-K3R" secondAttribute="height" multiplier="1:1" id="iex-7v-w3k"/>
</constraints>
@ -138,6 +138,17 @@
<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="subviews">
<exclude reference="f6i-lw-K3R"/>
</mask>
<mask key="constraints">
<exclude reference="BWr-hr-pwo"/>
<exclude reference="Cd3-ev-uFS"/>
<exclude reference="Zs5-bj-AR6"/>
<exclude reference="qTV-BL-cX4"/>
</mask>
</variation>
</view>
</subviews>
<color key="backgroundColor" red="0.1215686275" green="0.59999999999999998" blue="0.32156862749999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@ -353,13 +364,13 @@
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<collectionView clipsSubviews="YES" 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="8Ey-lL-uzF" customClass="TransportTransitStepsCollectionView" customModule="OMaps" customModuleProvider="target">
<collectionView clipsSubviews="YES" 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="8Ey-lL-uzF" customClass="TransportTransitStepsCollectionView" customModule="Organic_Maps" 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="OMaps" customModuleProvider="target"/>
<collectionViewLayout key="collectionViewLayout" id="PJv-Hi-Xu3" customClass="TransportTransitFlowLayout" customModule="Organic_Maps" customModuleProvider="target"/>
</collectionView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>

View file

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21225" 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="17703"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21207"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
@ -68,7 +68,7 @@
</connections>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="oQc-l8-sZH" userLabel="Buttons Box">
<rect key="frame" x="52" y="4" width="244" height="40"/>
<rect key="frame" x="62" y="4" width="196" height="40"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="cZF-Ha-2tB">
<rect key="frame" x="6" y="0.0" width="40" height="40"/>
@ -105,10 +105,10 @@
<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="Taxi">
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="15Q-ZN-NzE" userLabel="Helicopter">
<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="routeTaxi"/>
<accessibility key="accessibilityConfiguration" identifier="routeHelicopter"/>
<constraints>
<constraint firstAttribute="width" secondItem="15Q-ZN-NzE" secondAttribute="height" multiplier="1:1" id="8os-Sl-i57"/>
</constraints>
@ -142,6 +142,17 @@
<variation key="heightClass=compact" constant="16"/>
</constraint>
</constraints>
<variation key="default">
<mask key="subviews">
<exclude reference="15Q-ZN-NzE"/>
</mask>
<mask key="constraints">
<exclude reference="D1r-cA-jTR"/>
<exclude reference="WHK-N0-dCc"/>
<exclude reference="Wve-9m-8zL"/>
<exclude reference="my7-I5-Qu3"/>
</mask>
</variation>
</view>
</subviews>
<color key="backgroundColor" red="0.12156862745098039" green="0.59999999999999998" blue="0.32156862745098036" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@ -187,6 +198,7 @@
<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="helicopter" destination="15Q-ZN-NzE" id="Hel-ic-Opt"/>
<outlet property="pedestrian" destination="6D3-QF-6wm" id="bdh-zx-9LW"/>
<outlet property="publicTransport" destination="yIt-eq-pV5" id="yIX-eM-Hrs"/>
<outlet property="vehicle" destination="cZF-Ha-2tB" id="QP3-tU-nfO"/>
@ -228,7 +240,7 @@
<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" baselineAdjustment="alignBaselines" minimumFontSize="12" adjustsLetterSpacingToFitWidth="YES" translatesAutoresizingMaskIntoConstraints="NO" id="sjQ-Sc-mtN">
<rect key="frame" x="16" y="14" width="50.5" height="20"/>
<rect key="frame" x="16" y="14" width="51" 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"/>
@ -406,13 +418,13 @@
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<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="OMaps" customModuleProvider="target">
<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="Organic_Maps" 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="eGu-Mr-auv"/>
</constraints>
<collectionViewLayout key="collectionViewLayout" id="d3P-nT-IFD" customClass="TransportTransitFlowLayout" customModule="OMaps" customModuleProvider="target"/>
<collectionViewLayout key="collectionViewLayout" id="d3P-nT-IFD" customClass="TransportTransitFlowLayout" customModule="Organic_Maps" customModuleProvider="target"/>
</collectionView>
</subviews>
<viewLayoutGuide key="safeArea" id="YJK-Xe-9oN"/>

View file

@ -2,5 +2,5 @@ typedef NS_ENUM(NSUInteger, MWMRouterType) {
MWMRouterTypeVehicle,
MWMRouterTypePedestrian,
MWMRouterTypePublicTransport,
MWMRouterTypeBicycle
MWMRouterTypeBicycle,
};

View file

@ -1,6 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
}
}
}

View file

@ -2,7 +2,7 @@
"images" : [
{
"idiom" : "universal",
"filename" : "ic_taxi.pdf"
"filename" : "ic_helicopter.pdf"
}
],
"info" : {

View file

@ -2,7 +2,7 @@
"images" : [
{
"idiom" : "universal",
"filename" : "ic_taxi_highlighted.pdf"
"filename" : "ic_helicopter_highlighted.pdf"
}
],
"info" : {

View file

@ -2,7 +2,7 @@
"images" : [
{
"idiom" : "universal",
"filename" : "ic_taxi_selected.pdf"
"filename" : "ic_helicopter_selected.pdf"
}
],
"info" : {