[iOS] bookmarks subscription screen

This commit is contained in:
Aleksey Belouosv 2019-07-17 13:42:21 +03:00 committed by Vlad Mihaylenko
parent 9ed6d65a3f
commit 7e3bd94cd6
17 changed files with 763 additions and 4 deletions

View file

@ -0,0 +1,90 @@
class BookmarksSubscriptionCellViewController: UIViewController {
@IBOutlet private var subtitleLabel: UILabel!
@IBOutlet private var titleLabel: UILabel!
@IBOutlet private var priceLabel: UILabel!
@IBOutlet private var discountView: UIView!
@IBOutlet private var discountLabel: UILabel!
@IBOutlet private var imageView: UIImageView!
@IBOutlet private var containerView: UIView!
@IBOutlet private var contentView: UIView!
private(set) var isSelected = false
override func viewDidLoad() {
super.viewDidLoad()
if !UIColor.isNightMode() {
setupShadow(containerView, color: .shadowColorBlue())
setupShadow(discountView, color: .shadowColorPurple())
}
contentView.layer.borderColor = UIColor.subscriptionCellBorder().cgColor
setSelected(false, animated: false)
}
func setSelected(_ selected: Bool, animated: Bool = false) {
isSelected = selected
let setSelectedClosure = { [unowned self] in
self.titleLabel.textColor = selected ? .linkBlue() : .blackPrimaryText()
self.subtitleLabel.textColor = selected ? .linkBlue() : .blackSecondaryText()
self.priceLabel.textColor = selected ? .linkBlue() : .blackPrimaryText()
self.contentView.backgroundColor = selected ? .linkBlueHighlighted() : .clear
self.containerView.backgroundColor = selected ? .white() : .clear
}
if animated {
UIView.animate(withDuration: kDefaultAnimationDuration) {
setSelectedClosure()
}
animateBorder(contentView, show: !selected)
if !UIColor.isNightMode() {
animateShadow(containerView, opacity: selected ? 0.5 : 0)
animateShadow(discountView, opacity: selected ? 0.62 : 0)
}
} else {
setSelectedClosure()
contentView.layer.borderWidth = selected ? 0 : 1
if !UIColor.isNightMode() {
containerView.layer.shadowOpacity = selected ? 0.5 : 0
discountView.layer.shadowOpacity = selected ? 0.62 : 0
}
}
}
func config(title: String, subtitle: String, price: String, image: UIImage, discount: String? = nil) {
titleLabel.text = title
subtitleLabel.text = subtitle
priceLabel.text = price
imageView.image = image
guard let discount = discount else {
discountView.isHidden = true
return
}
discountLabel.text = discount
discountView.isHidden = false
}
private func setupShadow(_ view: UIView, color: UIColor) {
view.layer.shadowRadius = 4
view.layer.shadowOffset = CGSize(width: 0, height: 2)
view.layer.shadowColor = color.cgColor
}
private func animateShadow(_ view: UIView, opacity: Float) {
let shadowOpacityKey = "shadowOpacity"
let animation = CABasicAnimation(keyPath: shadowOpacityKey)
animation.fromValue = view.layer.shadowOpacity
animation.duration = kDefaultAnimationDuration
view.layer.add(animation, forKey: shadowOpacityKey)
view.layer.shadowOpacity = opacity
}
private func animateBorder(_ view: UIView, show: Bool) {
let borderWidthKey = "borderWidth"
let animation = CABasicAnimation(keyPath: borderWidthKey)
animation.fromValue = view.layer.borderWidth
animation.duration = kDefaultAnimationDuration
view.layer.add(animation, forKey: borderWidthKey)
view.layer.borderWidth = show ? 1 : 0
}
}

View file

@ -0,0 +1,149 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
<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="BookmarksSubscriptionCellViewController" customModule="maps_me" customModuleProvider="target">
<connections>
<outlet property="containerView" destination="5im-1k-ZSt" id="KFK-PM-Aq7"/>
<outlet property="contentView" destination="MkX-w4-BJH" id="wvB-ug-ZxF"/>
<outlet property="discountLabel" destination="Udv-PO-OUs" id="TWf-Rw-Mdg"/>
<outlet property="discountView" destination="T1l-r7-y0s" id="QwX-Ie-Awz"/>
<outlet property="imageView" destination="seQ-P4-q7a" id="c98-Ed-EYY"/>
<outlet property="priceLabel" destination="udg-sP-X24" id="Rxw-0m-IGk"/>
<outlet property="subtitleLabel" destination="sD6-bq-sR9" id="RqJ-a5-WGF"/>
<outlet property="titleLabel" destination="RSU-fu-mKp" id="GRu-u9-L94"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="166" height="254"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="brj-0e-hWP">
<rect key="frame" x="0.0" y="0.0" width="166" height="254"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="5im-1k-ZSt">
<rect key="frame" x="0.0" y="23" width="166" height="231"/>
<subviews>
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="MkX-w4-BJH">
<rect key="frame" x="3" y="3" width="160" height="225"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="bookmarksSubscriptionYear" translatesAutoresizingMaskIntoConstraints="NO" id="seQ-P4-q7a">
<rect key="frame" x="0.0" y="0.0" width="160" height="90"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Annual" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="17" adjustsLetterSpacingToFitWidth="YES" translatesAutoresizingMaskIntoConstraints="NO" id="RSU-fu-mKp">
<rect key="frame" x="12" y="92" width="136" height="26"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="21"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="12 month unlimited guides" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="sD6-bq-sR9">
<rect key="frame" x="12" y="123" width="136" height="33.5"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="$29.99" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="udg-sP-X24">
<rect key="frame" x="12" y="192" width="60" height="21"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="seQ-P4-q7a" secondAttribute="trailing" id="3OW-ye-Bgc"/>
<constraint firstAttribute="trailing" secondItem="RSU-fu-mKp" secondAttribute="trailing" constant="12" id="FXV-bc-was"/>
<constraint firstItem="udg-sP-X24" firstAttribute="leading" secondItem="MkX-w4-BJH" secondAttribute="leading" constant="12" id="Gfz-tP-WVx"/>
<constraint firstItem="sD6-bq-sR9" firstAttribute="top" secondItem="RSU-fu-mKp" secondAttribute="bottom" constant="5" id="SLD-GM-dh0"/>
<constraint firstItem="seQ-P4-q7a" firstAttribute="top" secondItem="MkX-w4-BJH" secondAttribute="top" id="T6I-jw-sah"/>
<constraint firstAttribute="bottom" secondItem="udg-sP-X24" secondAttribute="bottom" constant="12" id="UqO-55-UZx"/>
<constraint firstItem="sD6-bq-sR9" firstAttribute="leading" secondItem="MkX-w4-BJH" secondAttribute="leading" constant="12" id="XOh-t3-MhF"/>
<constraint firstAttribute="trailing" secondItem="sD6-bq-sR9" secondAttribute="trailing" constant="12" id="bLV-g1-tND"/>
<constraint firstItem="seQ-P4-q7a" firstAttribute="leading" secondItem="MkX-w4-BJH" secondAttribute="leading" id="fVs-iN-QlK"/>
<constraint firstItem="RSU-fu-mKp" firstAttribute="leading" secondItem="MkX-w4-BJH" secondAttribute="leading" constant="12" id="gfN-Wt-ehy"/>
<constraint firstItem="RSU-fu-mKp" firstAttribute="top" secondItem="MkX-w4-BJH" secondAttribute="top" constant="92" id="no0-Lz-cuL"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="7"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<gestureRecognizers/>
<constraints>
<constraint firstAttribute="bottom" secondItem="MkX-w4-BJH" secondAttribute="bottom" constant="3" id="HD7-Dy-l0d"/>
<constraint firstItem="MkX-w4-BJH" firstAttribute="top" secondItem="5im-1k-ZSt" secondAttribute="top" constant="3" id="Jyz-d9-hWa"/>
<constraint firstAttribute="trailing" secondItem="MkX-w4-BJH" secondAttribute="trailing" constant="3" id="R83-rm-27x"/>
<constraint firstItem="MkX-w4-BJH" firstAttribute="leading" secondItem="5im-1k-ZSt" secondAttribute="leading" constant="3" id="cKq-HI-5nL"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="10"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="T1l-r7-y0s">
<rect key="frame" x="0.0" y="0.0" width="116" height="35"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="SAVE $38" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Udv-PO-OUs">
<rect key="frame" x="0.0" y="7" width="116" height="21"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="0.63921568630000003" green="0.20784313730000001" blue="0.95686274510000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="35" id="1hc-rF-WeJ"/>
<constraint firstAttribute="width" constant="116" id="MmH-NQ-a79"/>
<constraint firstItem="Udv-PO-OUs" firstAttribute="centerY" secondItem="T1l-r7-y0s" secondAttribute="centerY" id="Rc1-MY-abl"/>
<constraint firstAttribute="trailing" secondItem="Udv-PO-OUs" secondAttribute="trailing" id="Ugx-X0-X5n"/>
<constraint firstItem="Udv-PO-OUs" firstAttribute="leading" secondItem="T1l-r7-y0s" secondAttribute="leading" id="ftl-Dn-UeW"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="6"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="T1l-r7-y0s" firstAttribute="top" secondItem="brj-0e-hWP" secondAttribute="top" id="8fR-FO-nnO"/>
<constraint firstAttribute="trailing" secondItem="5im-1k-ZSt" secondAttribute="trailing" id="9A1-Mp-LlU"/>
<constraint firstAttribute="width" constant="166" id="XlP-bR-oy4"/>
<constraint firstItem="5im-1k-ZSt" firstAttribute="top" secondItem="brj-0e-hWP" secondAttribute="top" constant="23" id="dYu-M1-Tnx"/>
<constraint firstAttribute="bottom" secondItem="5im-1k-ZSt" secondAttribute="bottom" id="kDE-4I-7LZ"/>
<constraint firstItem="5im-1k-ZSt" firstAttribute="leading" secondItem="brj-0e-hWP" secondAttribute="leading" id="kyQ-R7-x0Y"/>
<constraint firstItem="T1l-r7-y0s" firstAttribute="leading" secondItem="brj-0e-hWP" secondAttribute="leading" id="pAD-k1-weD"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="brj-0e-hWP" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="2LO-Qg-bMl"/>
<constraint firstItem="brj-0e-hWP" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="AoM-wo-8Fy"/>
<constraint firstAttribute="bottom" secondItem="brj-0e-hWP" secondAttribute="bottom" id="EKl-sH-rak"/>
<constraint firstAttribute="trailing" secondItem="brj-0e-hWP" secondAttribute="trailing" id="z6f-Go-kJT"/>
</constraints>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
<point key="canvasLocation" x="137.68115942028987" y="-20.758928571428569"/>
</view>
</objects>
<resources>
<image name="bookmarksSubscriptionYear" width="160" height="90"/>
</resources>
</document>

View file

@ -0,0 +1,73 @@
class BookmarksSubscriptionViewController: MWMViewController {
@IBOutlet private var annualView: UIView!
@IBOutlet private var monthlyView: UIView!
@IBOutlet private var gradientView: GradientView!
@IBOutlet var scrollView: UIScrollView!
private let annualViewController = BookmarksSubscriptionCellViewController()
private let monthlyViewController = BookmarksSubscriptionCellViewController()
var onSubscribe: MWMVoidBlock?
var onCancel: MWMVoidBlock?
override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
get { return [.portrait] }
}
override var preferredStatusBarStyle: UIStatusBarStyle {
get { return UIColor.isNightMode() ? .lightContent : .default }
}
override func viewDidLoad() {
super.viewDidLoad()
gradientView.isHidden = UIColor.isNightMode()
addChildViewController(annualViewController)
annualView.addSubview(annualViewController.view)
annualViewController.view.alignToSuperview()
annualViewController.didMove(toParentViewController: self)
addChildViewController(monthlyViewController)
monthlyView.addSubview(monthlyViewController.view)
monthlyViewController.view.alignToSuperview()
monthlyViewController.didMove(toParentViewController: self)
annualViewController.config(title: L("annual_subscription_title"),
subtitle: L("annual_subscription_message"),
price: "$29.99",
image: UIImage(named: "bookmarksSubscriptionYear")!,
discount: "SAVE $38")
monthlyViewController.config(title: L("montly_subscription_title"),
subtitle: L("montly_subscription_message"),
price: "$3.99",
image: UIImage(named: "bookmarksSubscriptionMonth")!)
annualViewController.setSelected(true, animated: false)
}
@IBAction func onAnnualViewTap(_ sender: UITapGestureRecognizer) {
guard !annualViewController.isSelected else {
return
}
annualViewController.setSelected(true, animated: true)
monthlyViewController.setSelected(false, animated: true)
scrollView.scrollRectToVisible(annualView.convert(annualView.bounds, to: scrollView), animated: true)
}
@IBAction func onMonthlyViewTap(_ sender: UITapGestureRecognizer) {
guard !monthlyViewController.isSelected else {
return
}
annualViewController.setSelected(false, animated: true)
monthlyViewController.setSelected(true, animated: true)
scrollView.scrollRectToVisible(monthlyView.convert(monthlyView.bounds, to: scrollView), animated: true)
}
@IBAction func onContinue(_ sender: UIButton) {
onSubscribe?()
}
@IBAction func onClose(_ sender: UIButton) {
onCancel?()
}
}

View file

@ -0,0 +1,288 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina5_5" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
<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="BookmarksSubscriptionViewController" customModule="maps_me" customModuleProvider="target">
<connections>
<outlet property="annualView" destination="Bae-oL-ekX" id="l9n-u0-LNW"/>
<outlet property="gradientView" destination="BcI-3g-iCI" id="Rmd-LB-Rl5"/>
<outlet property="monthlyView" destination="Jpy-cA-wCv" id="6yi-OC-MrD"/>
<outlet property="scrollView" destination="q5w-jW-Chn" id="dMR-TM-gMC"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="414" height="736"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="BcI-3g-iCI" customClass="GradientView" customModule="maps_me" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="414" height="736"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="startColor">
<color key="value" red="0.81568627450980391" green="0.92156862745098034" blue="1" alpha="0.70424871575342463" colorSpace="custom" customColorSpace="sRGB"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="color" keyPath="endColor">
<color key="value" white="1" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
<scrollView multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0eE-hs-sId">
<rect key="frame" x="0.0" y="20" width="414" height="716"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Eiz-QQ-h0b">
<rect key="frame" x="0.0" y="0.0" width="414" height="669.66666666666663"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Unlimited access to 5000+ guides!" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bOS-sQ-rkD">
<rect key="frame" x="16" y="16.000000000000004" width="382" height="57.333333333333343"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="24"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="bold24"/>
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackPrimaryText"/>
</userDefinedRuntimeAttributes>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Every kind of journey. Whether alone or with friends, hiking or sunbathing" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vzD-qz-Fwt">
<rect key="frame" x="16" y="89.333333333333329" width="382" height="33.666666666666671"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular14"/>
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackPrimaryText"/>
</userDefinedRuntimeAttributes>
</label>
<scrollView multipleTouchEnabled="YES" contentMode="scaleToFill" bounces="NO" scrollEnabled="NO" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" bouncesZoom="NO" translatesAutoresizingMaskIntoConstraints="NO" id="q5w-jW-Chn">
<rect key="frame" x="33" y="157" width="348" height="254"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="GGO-lU-mzy">
<rect key="frame" x="0.0" y="0.0" width="348" height="254"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Bae-oL-ekX">
<rect key="frame" x="0.0" y="0.0" width="166" height="254"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="width" constant="166" id="VWj-No-rzW"/>
</constraints>
<connections>
<outletCollection property="gestureRecognizers" destination="CPT-bP-cim" appends="YES" id="1dj-wC-eaz"/>
</connections>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Jpy-cA-wCv">
<rect key="frame" x="182" y="0.0" width="166" height="254"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="width" constant="166" id="RXq-j7-sUf"/>
</constraints>
<connections>
<outletCollection property="gestureRecognizers" destination="6bt-Wj-I8y" appends="YES" id="CUa-Ee-sVX"/>
</connections>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="Bae-oL-ekX" secondAttribute="bottom" id="72v-2J-b39"/>
<constraint firstItem="Bae-oL-ekX" firstAttribute="leading" secondItem="GGO-lU-mzy" secondAttribute="leading" id="9Xb-Ed-LrY"/>
<constraint firstItem="Jpy-cA-wCv" firstAttribute="top" secondItem="GGO-lU-mzy" secondAttribute="top" id="AcV-qq-Sad"/>
<constraint firstAttribute="trailing" secondItem="Jpy-cA-wCv" secondAttribute="trailing" id="PHw-4l-fxy"/>
<constraint firstAttribute="bottom" secondItem="Jpy-cA-wCv" secondAttribute="bottom" id="Uy5-XO-hD6"/>
<constraint firstItem="Jpy-cA-wCv" firstAttribute="leading" secondItem="Bae-oL-ekX" secondAttribute="trailing" constant="16" id="qkv-Ia-8dz"/>
<constraint firstItem="Bae-oL-ekX" firstAttribute="top" secondItem="GGO-lU-mzy" secondAttribute="top" id="x9A-wI-c5M"/>
</constraints>
</view>
</subviews>
<constraints>
<constraint firstItem="GGO-lU-mzy" firstAttribute="leading" secondItem="q5w-jW-Chn" secondAttribute="leading" id="0go-36-y89"/>
<constraint firstItem="GGO-lU-mzy" firstAttribute="height" secondItem="q5w-jW-Chn" secondAttribute="height" id="Hu0-Yv-PbT"/>
<constraint firstAttribute="height" constant="254" id="KST-Zr-MUU"/>
<constraint firstAttribute="bottom" secondItem="GGO-lU-mzy" secondAttribute="bottom" id="Nt2-u8-Jy8"/>
<constraint firstItem="GGO-lU-mzy" firstAttribute="width" secondItem="q5w-jW-Chn" secondAttribute="width" priority="750" id="TCc-RX-U0D"/>
<constraint firstAttribute="trailing" secondItem="GGO-lU-mzy" secondAttribute="trailing" id="bZ7-83-JVY"/>
<constraint firstItem="GGO-lU-mzy" firstAttribute="top" secondItem="q5w-jW-Chn" secondAttribute="top" id="bqg-vJ-nua"/>
</constraints>
</scrollView>
<button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="neX-0h-hs4" userLabel="Continue">
<rect key="frame" x="50" y="445" width="314" height="50"/>
<color key="backgroundColor" red="0.1176470588" green="0.58823529409999997" blue="0.94117647059999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<accessibility key="accessibilityConfiguration" identifier="welcome_storyboard.button_next2"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="fov-Od-QwC"/>
</constraints>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
<state key="normal" title="CONTINUE">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="textColorHighlightedName" value="white"/>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="medium14"/>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="6"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="string" keyPath="textColorName" value="white"/>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="linkBlue"/>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundHighlightedColorName" value="linkBlueHighlighted"/>
</userDefinedRuntimeAttributes>
<connections>
<action selector="onContinue:" destination="-1" eventType="touchUpInside" id="aAu-Te-fXW"/>
</connections>
</button>
<button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="a64-qc-DrZ" userLabel="Restore">
<rect key="frame" x="50" y="503" width="314" height="50"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<accessibility key="accessibilityConfiguration" identifier="welcome_storyboard.button_next2"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="1uG-VX-pBy"/>
</constraints>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
<state key="normal" title="Restore purchases">
<color key="titleColor" red="0.1176470588" green="0.58823529409999997" blue="0.94117647059999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="textColorHighlightedName" value="linkBlueHighlighted"/>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="medium14"/>
<userDefinedRuntimeAttribute type="string" keyPath="textColorName" value="linkBlue"/>
</userDefinedRuntimeAttributes>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="justified" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tWZ-GP-RxW">
<rect key="frame" x="20" y="561" width="374" height="64.666666666666629"/>
<string key="text">Payment will be charged to your iTunes account at confirmation of purchase. The subscription will automatically renew unless auto-renew is turned off at least 24 hours before the end of the current period. Your account will be charged according to your plan for renewal within 24 hours prior to the end of the current period. You can manage or turn off auto-renew in your Apple ID account settings at any time of your purchase.</string>
<fontDescription key="fontDescription" type="system" pointSize="9"/>
<color key="textColor" white="0.0" alpha="0.31555008561643838" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular9"/>
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackHintText"/>
</userDefinedRuntimeAttributes>
</label>
<button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="awa-we-Pjk" userLabel="TermsOfUse">
<rect key="frame" x="20" y="625.66666666666663" width="66" height="44"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<accessibility key="accessibilityConfiguration" identifier="welcome_storyboard.button_next2"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="A7q-HV-LBa"/>
</constraints>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="10"/>
<state key="normal" title="Terms of Use">
<color key="titleColor" white="0.5591291287173964" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="textColorHighlightedName" value="blackHintText"/>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="medium10"/>
<userDefinedRuntimeAttribute type="string" keyPath="textColorName" value="blackSecondaryText"/>
</userDefinedRuntimeAttributes>
</button>
<button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="60B-kT-Eev" userLabel="PrivacyPolicy">
<rect key="frame" x="325" y="625.66666666666663" width="69" height="44"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<accessibility key="accessibilityConfiguration" identifier="welcome_storyboard.button_next2"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="HTR-mY-eCe"/>
</constraints>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="10"/>
<state key="normal" title="Privacy Policy">
<color key="titleColor" white="0.55912912869999998" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="textColorHighlightedName" value="blackHintText"/>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="medium10"/>
<userDefinedRuntimeAttribute type="string" keyPath="textColorName" value="blackSecondaryText"/>
</userDefinedRuntimeAttributes>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="v0Z-5m-unD">
<rect key="frame" x="362" y="0.0" width="44" height="44"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="9dL-YL-GLY"/>
<constraint firstAttribute="width" constant="44" id="tIs-g1-eI6"/>
</constraints>
<color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<state key="normal" image="bookmarksSubscriptionClose"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="tintColorName" value="linkBlue"/>
</userDefinedRuntimeAttributes>
<connections>
<action selector="onClose:" destination="-1" eventType="touchUpInside" id="VMj-IW-RNx"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="bOS-sQ-rkD" firstAttribute="leading" secondItem="Eiz-QQ-h0b" secondAttribute="leading" constant="16" id="2dJ-3J-bOG"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="q5w-jW-Chn" secondAttribute="trailing" constant="13" id="3OB-ln-ZP1"/>
<constraint firstAttribute="trailing" secondItem="vzD-qz-Fwt" secondAttribute="trailing" constant="16" id="3Xf-Bz-ISk"/>
<constraint firstItem="awa-we-Pjk" firstAttribute="top" secondItem="tWZ-GP-RxW" secondAttribute="bottom" id="7ey-rc-AJD"/>
<constraint firstItem="vzD-qz-Fwt" firstAttribute="leading" secondItem="Eiz-QQ-h0b" secondAttribute="leading" constant="16" id="819-Wz-tmt"/>
<constraint firstItem="q5w-jW-Chn" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="Eiz-QQ-h0b" secondAttribute="leading" constant="13" id="9kc-0C-7dp"/>
<constraint firstItem="60B-kT-Eev" firstAttribute="top" secondItem="tWZ-GP-RxW" secondAttribute="bottom" id="HNk-gd-Qc6"/>
<constraint firstAttribute="trailing" secondItem="a64-qc-DrZ" secondAttribute="trailing" constant="50" id="INc-Pv-5M3"/>
<constraint firstItem="bOS-sQ-rkD" firstAttribute="top" secondItem="Eiz-QQ-h0b" secondAttribute="top" constant="16" id="JTG-8l-iqj"/>
<constraint firstItem="awa-we-Pjk" firstAttribute="leading" secondItem="Eiz-QQ-h0b" secondAttribute="leading" constant="20" id="Loh-WS-cJr"/>
<constraint firstAttribute="trailing" secondItem="tWZ-GP-RxW" secondAttribute="trailing" constant="20" id="OFb-vM-2cl"/>
<constraint firstItem="a64-qc-DrZ" firstAttribute="leading" secondItem="Eiz-QQ-h0b" secondAttribute="leading" constant="50" id="R8g-2f-TIi"/>
<constraint firstItem="q5w-jW-Chn" firstAttribute="centerX" secondItem="Eiz-QQ-h0b" secondAttribute="centerX" id="RqB-aN-G6b"/>
<constraint firstItem="neX-0h-hs4" firstAttribute="leading" secondItem="Eiz-QQ-h0b" secondAttribute="leading" constant="50" id="SOV-6g-yrG"/>
<constraint firstAttribute="trailing" secondItem="bOS-sQ-rkD" secondAttribute="trailing" constant="16" id="UBz-JQ-dSq"/>
<constraint firstAttribute="trailing" secondItem="neX-0h-hs4" secondAttribute="trailing" constant="50" id="UTD-bj-67L"/>
<constraint firstAttribute="trailing" secondItem="v0Z-5m-unD" secondAttribute="trailing" constant="8" id="aj5-SM-A2m"/>
<constraint firstItem="neX-0h-hs4" firstAttribute="top" secondItem="q5w-jW-Chn" secondAttribute="bottom" constant="34" id="cZ6-hC-ePD"/>
<constraint firstItem="q5w-jW-Chn" firstAttribute="top" secondItem="vzD-qz-Fwt" secondAttribute="bottom" constant="34" id="esu-FS-r9d"/>
<constraint firstItem="vzD-qz-Fwt" firstAttribute="top" secondItem="bOS-sQ-rkD" secondAttribute="bottom" constant="16" id="f5X-2e-9pD"/>
<constraint firstItem="tWZ-GP-RxW" firstAttribute="top" secondItem="a64-qc-DrZ" secondAttribute="bottom" constant="8" id="fUL-gY-evu"/>
<constraint firstItem="a64-qc-DrZ" firstAttribute="top" secondItem="neX-0h-hs4" secondAttribute="bottom" constant="8" id="gEf-O0-spw"/>
<constraint firstItem="tWZ-GP-RxW" firstAttribute="leading" secondItem="Eiz-QQ-h0b" secondAttribute="leading" constant="20" id="km3-TI-Nnc"/>
<constraint firstItem="v0Z-5m-unD" firstAttribute="top" secondItem="Eiz-QQ-h0b" secondAttribute="top" id="lx8-MC-GlM"/>
<constraint firstAttribute="trailing" secondItem="60B-kT-Eev" secondAttribute="trailing" constant="20" id="wEX-hK-g2z"/>
<constraint firstAttribute="bottom" secondItem="awa-we-Pjk" secondAttribute="bottom" id="yuL-cU-wGM"/>
</constraints>
</view>
</subviews>
<constraints>
<constraint firstItem="Eiz-QQ-h0b" firstAttribute="top" secondItem="0eE-hs-sId" secondAttribute="top" id="9jr-XF-OP2"/>
<constraint firstItem="Eiz-QQ-h0b" firstAttribute="leading" secondItem="0eE-hs-sId" secondAttribute="leading" id="DjF-kC-58d"/>
<constraint firstAttribute="trailing" secondItem="Eiz-QQ-h0b" secondAttribute="trailing" id="GL8-iC-MmT"/>
<constraint firstAttribute="bottom" secondItem="Eiz-QQ-h0b" secondAttribute="bottom" id="amI-MH-1yy"/>
<constraint firstItem="Eiz-QQ-h0b" firstAttribute="width" secondItem="0eE-hs-sId" secondAttribute="width" id="ke9-ke-QPG"/>
</constraints>
</scrollView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="BcI-3g-iCI" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="1cC-us-Ehh"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="0eE-hs-sId" secondAttribute="trailing" id="7gZ-TD-rRu"/>
<constraint firstItem="0eE-hs-sId" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" id="Avd-W3-cXU"/>
<constraint firstAttribute="trailing" secondItem="BcI-3g-iCI" secondAttribute="trailing" id="IKZ-OT-jxC"/>
<constraint firstAttribute="bottom" secondItem="BcI-3g-iCI" secondAttribute="bottom" id="SHg-Ke-dap"/>
<constraint firstItem="BcI-3g-iCI" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="doL-Dw-bDS"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="0eE-hs-sId" secondAttribute="bottom" id="ku8-zI-AI4"/>
<constraint firstItem="0eE-hs-sId" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="sv4-ek-sAP"/>
</constraints>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="white"/>
</userDefinedRuntimeAttributes>
<point key="canvasLocation" x="47.200000000000003" y="111.0944527736132"/>
</view>
<tapGestureRecognizer id="CPT-bP-cim">
<connections>
<action selector="onAnnualViewTap:" destination="-1" id="Hzt-LN-ieo"/>
</connections>
</tapGestureRecognizer>
<tapGestureRecognizer id="6bt-Wj-I8y">
<connections>
<action selector="onMonthlyViewTap:" destination="-1" id="Chj-Fs-aef"/>
</connections>
</tapGestureRecognizer>
</objects>
<resources>
<image name="bookmarksSubscriptionClose" width="24" height="24"/>
</resources>
</document>

View file

@ -146,12 +146,19 @@ final class CatalogWebViewController: WebViewController {
override func webView(_ webView: WKWebView,
decidePolicyFor navigationAction: WKNavigationAction,
decisionHandler: @escaping (WKNavigationActionPolicy) -> Void) {
let subscribePath = "/mobilefront/subscribe"
guard let url = navigationAction.request.url,
url.scheme == "mapsme" || url.path == "/mobilefront/buy_kml" else {
url.scheme == "mapsme" || url.path == "/mobilefront/buy_kml" || url.path == subscribePath else {
super.webView(webView, decidePolicyFor: navigationAction, decisionHandler: decisionHandler)
return
}
if url.path == subscribePath {
showSubscribe()
decisionHandler(.cancel);
return
}
processDeeplink(url)
decisionHandler(.cancel);
}
@ -180,6 +187,18 @@ final class CatalogWebViewController: WebViewController {
loadingIndicator.stopAnimating()
}
private func showSubscribe() {
let subscribeViewController = BookmarksSubscriptionViewController()
subscribeViewController.onSubscribe = { [weak self] in
self?.dismiss(animated: true)
}
subscribeViewController.onCancel = { [weak self] in
self?.dismiss(animated: true)
}
present(subscribeViewController, animated: true)
}
private func buildHeaders(completion: @escaping ([String : String]?) -> Void) {
billing.requestProducts(Set(MWMPurchaseManager.bookmarkInappIds()), completion: { (products, error) in
var productsInfo: [String : [String: String]] = [:]

View file

@ -53,6 +53,9 @@
+ (UIColor *)speedLimitWhite;
+ (UIColor *)speedLimitLightGray;
+ (UIColor *)speedLimitDarkGray;
+ (UIColor *)shadowColorBlue;
+ (UIColor *)shadowColorPurple;
+ (UIColor *)subscriptionCellBorder;
+ (UIColor *)colorWithName:(NSString *)colorName;
+ (UIColor *)colorFromHexString:(NSString *)hexString;

View file

@ -395,4 +395,16 @@ UIColor * color(SEL cmd)
return [UIColor colorWithRed:scaled(51) green:scaled(51) blue:scaled(50) alpha:alpha100];
}
+ (UIColor *)shadowColorBlue {
return [UIColor colorWithRed:scaled(5) green:scaled(70) blue:scaled(134) alpha:alpha100];
}
+ (UIColor *)shadowColorPurple {
return [UIColor colorWithRed:scaled(88) green:scaled(0) blue:scaled(153) alpha:alpha100];
}
+ (UIColor *)subscriptionCellBorder {
return [UIColor colorWithRed:scaled(174) green:scaled(184) blue:scaled(190) alpha:alpha100];
}
@end

View file

@ -7,4 +7,14 @@ extension UIView {
backgroundColor = UIColor.clear
subviews.forEach { $0.clearTreeBackground() }
}
func alignToSuperview() {
translatesAutoresizingMaskIntoConstraints = false
NSLayoutConstraint.activate([
topAnchor.constraint(equalTo: superview!.topAnchor),
leftAnchor.constraint(equalTo: superview!.leftAnchor),
bottomAnchor.constraint(equalTo: superview!.bottomAnchor),
rightAnchor.constraint(equalTo: superview!.rightAnchor)
])
}
}

View file

@ -0,0 +1,50 @@
@IBDesignable
class GradientView: UIView {
enum GradientDirection {
case horizontal
case vertical
}
var gradientDirection: GradientDirection = .vertical {
didSet {
let angle = gradientDirection == .horizontal ? -CGFloat.pi / 2 : 0
gradientLayer.transform = CATransform3DMakeRotation(angle, 0, 0, 1)
}
}
@IBInspectable
var startColor: UIColor = .clear {
didSet {
updateColors()
}
}
@IBInspectable
var endColor: UIColor = .lightGray {
didSet {
updateColors()
}
}
private func updateColors() {
gradientLayer.colors = [startColor.cgColor, endColor.cgColor]
}
override class var layerClass: AnyClass {
return CAGradientLayer.self
}
var gradientLayer: CAGradientLayer {
return layer as! CAGradientLayer
}
override init(frame: CGRect) {
super.init(frame: frame)
updateColors()
}
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
updateColors()
}
}

View file

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

View file

@ -0,0 +1,15 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "clear.pdf"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "template"
}
}

View file

@ -0,0 +1,12 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "Monthly_img.pdf"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

View file

@ -0,0 +1,12 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "Annual_img.pdf"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

View file

@ -355,7 +355,7 @@
4577B28121F2066A00864FAC /* libvulkan_wrapper.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4577B28021F2066A00864FAC /* libvulkan_wrapper.a */; };
4586D0C41F48121A00DF9CE5 /* libbsdiff.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4586D0C31F48121A00DF9CE5 /* libbsdiff.a */; };
4586D0E71F4813AB00DF9CE5 /* libmwm_diff.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4586D0E61F4813AB00DF9CE5 /* libmwm_diff.a */; };
4598438621394CFD00F8CAB2 /* MetalPerformanceShaders.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4598438521394CFD00F8CAB2 /* MetalPerformanceShaders.framework */; };
4598438621394CFD00F8CAB2 /* MetalPerformanceShaders.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4598438521394CFD00F8CAB2 /* MetalPerformanceShaders.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
45A37B9E20B33F5E005FBDBB /* FBAudienceNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 45A37B9D20B33F5D005FBDBB /* FBAudienceNetwork.framework */; };
45CBCCBA20590AAB006B55C2 /* libkml.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 45CBCCBB20590AAB006B55C2 /* libkml.a */; };
45FFD65D1E965EBE00DB854E /* liblocal_ads.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 45FFD65C1E965EBE00DB854E /* liblocal_ads.a */; };
@ -366,6 +366,8 @@
470F5A5C2181DE7500754295 /* PaidRouteViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 470F5A5A2181DE7400754295 /* PaidRouteViewController.xib */; };
470F5A7D2189BB2F00754295 /* PaidRoutePurchase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 470F5A7C2189BB2F00754295 /* PaidRoutePurchase.swift */; };
470F5A7F2189C30800754295 /* InAppPurchase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 470F5A7E2189C30800754295 /* InAppPurchase.swift */; };
4710366522D3764600585272 /* BookmarksSubscriptionCellViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4710366322D3764600585272 /* BookmarksSubscriptionCellViewController.swift */; };
4710366622D3764600585272 /* BookmarksSubscriptionCellViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4710366422D3764600585272 /* BookmarksSubscriptionCellViewController.xib */; };
4716EABA21A325310029B886 /* IPaidRouteStatistics.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4716EAB921A325310029B886 /* IPaidRouteStatistics.swift */; };
4716EAC121A6E0570029B886 /* BookmarksVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4716EAC021A6E0570029B886 /* BookmarksVC.xib */; };
4719A643219CB61D009F9AA7 /* BillingPendingTransaction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4719A642219CB61D009F9AA7 /* BillingPendingTransaction.swift */; };
@ -376,6 +378,9 @@
4726254921C27D4B00C7BAAD /* PlacePageDescriptionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4726254821C27D4B00C7BAAD /* PlacePageDescriptionViewController.swift */; };
47289E5A2212DFFF002ABFC0 /* EditOnWebAlertViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47289E582212DFFF002ABFC0 /* EditOnWebAlertViewController.swift */; };
47289E5B2212DFFF002ABFC0 /* EditOnWebAlertViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 47289E592212DFFF002ABFC0 /* EditOnWebAlertViewController.xib */; };
4728F69022CE430800E00028 /* BookmarksSubscriptionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4728F68E22CE430800E00028 /* BookmarksSubscriptionViewController.swift */; };
4728F69122CE430800E00028 /* BookmarksSubscriptionViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4728F68F22CE430800E00028 /* BookmarksSubscriptionViewController.xib */; };
4728F69322CF89A400E00028 /* GradientView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4728F69222CF89A400E00028 /* GradientView.swift */; };
472E3F472146BCD30020E412 /* SubscriptionManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 472E3F462146BCD30020E412 /* SubscriptionManager.swift */; };
472E3F4A2146C4CD0020E412 /* MWMPurchaseManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 472E3F492146C4CD0020E412 /* MWMPurchaseManager.mm */; };
472E3F4C2147D5700020E412 /* Subscription.swift in Sources */ = {isa = PBXBuildFile; fileRef = 472E3F4B2147D5700020E412 /* Subscription.swift */; };
@ -569,8 +574,8 @@
BB25B1A71FB32767007276FA /* transit_colors.txt in Resources */ = {isa = PBXBuildFile; fileRef = BB25B1A51FB32767007276FA /* transit_colors.txt */; };
BB2C99B021B6AB4500F7371C /* libdescriptions.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BB2C99AF21B6AB4500F7371C /* libdescriptions.a */; };
BB7626B61E85599C0031D71C /* icudt57l.dat in Resources */ = {isa = PBXBuildFile; fileRef = BB7626B41E8559980031D71C /* icudt57l.dat */; };
BB8123CF212C264700ADE512 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BB8123CD212C264700ADE512 /* Metal.framework */; };
BB8123D0212C264700ADE512 /* MetalKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BB8123CE212C264700ADE512 /* MetalKit.framework */; };
BB8123CF212C264700ADE512 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BB8123CD212C264700ADE512 /* Metal.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
BB8123D0212C264700ADE512 /* MetalKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BB8123CE212C264700ADE512 /* MetalKit.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
BB8123D62130427E00ADE512 /* MetalContextFactory.mm in Sources */ = {isa = PBXBuildFile; fileRef = BB8123D52130427E00ADE512 /* MetalContextFactory.mm */; };
CD08887422B7ABB400C1368D /* MWMDiscoveryCollectionView.mm in Sources */ = {isa = PBXBuildFile; fileRef = CD08887322B7ABB400C1368D /* MWMDiscoveryCollectionView.mm */; };
CD6E8677226774C700D1EDF7 /* CPConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD6E8676226774C700D1EDF7 /* CPConstants.swift */; };
@ -1431,6 +1436,8 @@
470F5A5A2181DE7400754295 /* PaidRouteViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PaidRouteViewController.xib; sourceTree = "<group>"; };
470F5A7C2189BB2F00754295 /* PaidRoutePurchase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PaidRoutePurchase.swift; sourceTree = "<group>"; };
470F5A7E2189C30800754295 /* InAppPurchase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InAppPurchase.swift; sourceTree = "<group>"; };
4710366322D3764600585272 /* BookmarksSubscriptionCellViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BookmarksSubscriptionCellViewController.swift; sourceTree = "<group>"; };
4710366422D3764600585272 /* BookmarksSubscriptionCellViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = BookmarksSubscriptionCellViewController.xib; sourceTree = "<group>"; };
4716EAB921A325310029B886 /* IPaidRouteStatistics.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IPaidRouteStatistics.swift; sourceTree = "<group>"; };
4716EAC021A6E0570029B886 /* BookmarksVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = BookmarksVC.xib; sourceTree = "<group>"; };
4716EACA21B01C270029B886 /* MWMUGCReviewSource.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MWMUGCReviewSource.h; sourceTree = "<group>"; };
@ -1442,6 +1449,9 @@
4726254821C27D4B00C7BAAD /* PlacePageDescriptionViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlacePageDescriptionViewController.swift; sourceTree = "<group>"; };
47289E582212DFFF002ABFC0 /* EditOnWebAlertViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditOnWebAlertViewController.swift; sourceTree = "<group>"; };
47289E592212DFFF002ABFC0 /* EditOnWebAlertViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = EditOnWebAlertViewController.xib; sourceTree = "<group>"; };
4728F68E22CE430800E00028 /* BookmarksSubscriptionViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BookmarksSubscriptionViewController.swift; sourceTree = "<group>"; };
4728F68F22CE430800E00028 /* BookmarksSubscriptionViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = BookmarksSubscriptionViewController.xib; sourceTree = "<group>"; };
4728F69222CF89A400E00028 /* GradientView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = GradientView.swift; path = CustomViews/GradientView.swift; sourceTree = "<group>"; };
472E3F462146BCD30020E412 /* SubscriptionManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SubscriptionManager.swift; sourceTree = "<group>"; };
472E3F482146C4CD0020E412 /* MWMPurchaseManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MWMPurchaseManager.h; sourceTree = "<group>"; };
472E3F492146C4CD0020E412 /* MWMPurchaseManager.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMPurchaseManager.mm; sourceTree = "<group>"; };
@ -3586,6 +3596,7 @@
34BC72091B0DECAE0012A34B /* MapViewControls */,
34AB65C41FC5AA320078E451 /* NavigationDashboard */,
479EE9492292FB03009DEBA6 /* ActivityIndicator.swift */,
4728F69222CF89A400E00028 /* GradientView.swift */,
);
name = "Custom Views";
sourceTree = "<group>";
@ -3606,6 +3617,10 @@
470F5A592181DE7400754295 /* PaidRouteViewController.swift */,
470F5A5A2181DE7400754295 /* PaidRouteViewController.xib */,
45AC339022C4F57C004DC574 /* MWMUTM.h */,
4728F68E22CE430800E00028 /* BookmarksSubscriptionViewController.swift */,
4728F68F22CE430800E00028 /* BookmarksSubscriptionViewController.xib */,
4710366322D3764600585272 /* BookmarksSubscriptionCellViewController.swift */,
4710366422D3764600585272 /* BookmarksSubscriptionCellViewController.xib */,
);
path = Catalog;
sourceTree = "<group>";
@ -4801,6 +4816,7 @@
F61757F11FC731F5000AD0D0 /* DiscoveryOnlineTemplateCell.xib in Resources */,
6741A95B1BF340DE002C974C /* 06_code2000.ttf in Resources */,
F603E05E1FDE9703006B84D6 /* DiscoverySearchCollectionHolderCell.xib in Resources */,
4710366622D3764600585272 /* BookmarksSubscriptionCellViewController.xib in Resources */,
6741A99F1BF340DE002C974C /* 07_roboto_medium.ttf in Resources */,
F6E2FE6D1E097BA00083EBEC /* _MWMOHHeaderCell.xib in Resources */,
F6E2FE701E097BA00083EBEC /* _MWMOHSubCell.xib in Resources */,
@ -4811,6 +4827,7 @@
F65D1E1A20E4F11600FE31DD /* ugc_migration in Resources */,
F6E2FEAF1E097BA00083EBEC /* _MWMPPPExternalTitle.xib in Resources */,
F6E2FEB21E097BA00083EBEC /* _MWMPPPSchedule.xib in Resources */,
4728F69122CE430800E00028 /* BookmarksSubscriptionViewController.xib in Resources */,
F6E2FEB51E097BA00083EBEC /* _MWMPPPSpace.xib in Resources */,
F6E2FEB81E097BA00083EBEC /* _MWMPPPSubtitle.xib in Resources */,
4554B6EE1E55F0F30084017F /* drules_proto_vehicle_dark.bin in Resources */,
@ -5392,6 +5409,7 @@
4767CDC120B477BA00BD8166 /* WelcomeViewController.swift in Sources */,
34E7761F1F14DB48003040B3 /* PlacePageArea.swift in Sources */,
346DB82E1E5C4F6700E3123E /* GalleryItemViewController.swift in Sources */,
4728F69322CF89A400E00028 /* GradientView.swift in Sources */,
340475561E081A4600C92850 /* Statistics.mm in Sources */,
CD96C71722A7B5DE00DB7CFE /* MWMDiscoveryCityGalleryObjects.mm in Sources */,
F6381BF61CD12045004CA943 /* LocaleTranslator.mm in Sources */,
@ -5560,6 +5578,7 @@
340475651E081A4600C92850 /* MWMRouter.mm in Sources */,
47E3C72F2111F472008B3B27 /* CoverVerticalModalTransitioning.swift in Sources */,
346DB83D1E5C4F6700E3123E /* GalleryModel.swift in Sources */,
4710366522D3764600585272 /* BookmarksSubscriptionCellViewController.swift in Sources */,
34E776101F14B165003040B3 /* VisibleArea.swift in Sources */,
330473EA21F7440C00DC4AEA /* MWMHotelParams.mm in Sources */,
3454D7D71E07F045004AF2AD /* UIKitCategories.mm in Sources */,
@ -5568,6 +5587,7 @@
3488B01A1E9D0B230068AFD8 /* UIColor+Modifications.swift in Sources */,
34E50DD81F6FCAB1008EED49 /* UGCSummaryRatingCell.swift in Sources */,
6741AA281BF340DE002C974C /* MWMAlert.mm in Sources */,
4728F69022CE430800E00028 /* BookmarksSubscriptionViewController.swift in Sources */,
F6E2FF571E097BA00083EBEC /* MWMMobileInternetViewController.mm in Sources */,
4797A4E22270997E00D3A984 /* DeepLinkHelper.mm in Sources */,
47B06E0021BAAC270094CCAD /* GeoZoneTracker.swift in Sources */,