From 8e615cde35c81e327dea9662758f9e462c8f8bd0 Mon Sep 17 00:00:00 2001 From: Alexander Boriskov Date: Wed, 16 Oct 2019 16:03:03 +0300 Subject: [PATCH] [iOS] All Pass Subscription screen https://jira.mail.ru/browse/MAPSME-12083 --- .../Catalog/CatalogWebViewController.swift | 2 +- ...> SubscriptionExpiredViewController.swift} | 2 +- ... => SubscriptionExpiredViewController.xib} | 18 +- ...t => SubscriptionFailViewController.swift} | 2 +- ...xib => SubscriptionFailViewController.xib} | 18 +- ...bscriptionGoToCatalogViewController.swift} | 2 +- ...SubscriptionGoToCatalogViewController.xib} | 10 +- ...> SubscriptionSuccessViewController.swift} | 2 +- ... => SubscriptionSuccessViewController.xib} | 2 +- .../Catalog/PaidRouteViewController.swift | 6 +- .../AllPassSubscriptionViewController.swift | 280 ++++++++++ .../AllPassSubscriptionViewController.xib | 480 ++++++++++++++++++ .../BookmarksSubscriptionButton.swift | 0 .../BookmarksSubscriptionViewController.swift | 49 +- .../BookmarksSubscriptionViewController.xib | 5 +- .../UIViewController+Subscription.swift | 2 +- iphone/Maps/Categories/UIColor+MapsMeColor.mm | 51 ++ .../Categories/UIColor+Modifications.swift | 20 + iphone/Maps/Categories/UIFont+MapsMeFonts.h | 3 + iphone/Maps/Categories/UIFont+MapsMeFonts.mm | 4 + .../MWMMapViewControlsManager.mm | 4 +- .../Classes/Pages/ImageViewCrossDisolve.swift | 46 ++ iphone/Maps/Classes/Pages/PageIndicator.swift | 66 +++ .../Core/InappPurchase/InAppPurchase.swift | 6 + .../Core/Subscriptions/MWMPurchaseManager.h | 3 + .../Core/Subscriptions/MWMPurchaseManager.mm | 16 + .../Subscriptions/SubscriptionGroup.swift | 56 ++ .../Subscriptions/SubscriptionGroupItem.swift | 63 +++ iphone/Maps/FredokaOne-Regular.ttf | Bin 0 -> 42452 bytes .../Contents.json | 23 + .../iPhone 8 Plus - 1.png | Bin 0 -> 653079 bytes .../iPhone 8 Plus - 1@2x.png | Bin 0 -> 2302145 bytes .../iPhone 8 Plus - 1@3x.png | Bin 0 -> 4657329 bytes .../Contents.json | 23 + .../iPhone 8 Plus - 2.png | Bin 0 -> 723613 bytes .../iPhone 8 Plus - 2@2x.png | Bin 0 -> 2871564 bytes .../iPhone 8 Plus - 2@3x.png | Bin 0 -> 6430901 bytes .../Contents.json | 23 + .../iPhone 8 Plus - 3.png | Bin 0 -> 651691 bytes .../iPhone 8 Plus - 3@2x.png | Bin 0 -> 2335912 bytes .../iPhone 8 Plus - 3@3x.png | Bin 0 -> 4903213 bytes iphone/Maps/MAPSME.plist | 6 + iphone/Maps/Maps.xcodeproj/project.pbxproj | 120 +++-- xcode/common-debug.xcconfig | 2 +- .../shaders/shaders.xcodeproj/project.pbxproj | 2 +- 45 files changed, 1307 insertions(+), 110 deletions(-) rename iphone/Maps/Bookmarks/Catalog/Dialogs/{BookmarksSubscriptionExpiredViewController.swift => SubscriptionExpiredViewController.swift} (91%) rename iphone/Maps/Bookmarks/Catalog/Dialogs/{BookmarksSubscriptionExpiredViewController.xib => SubscriptionExpiredViewController.xib} (88%) rename iphone/Maps/Bookmarks/Catalog/Dialogs/{BookmarksSubscriptionFailViewController.swift => SubscriptionFailViewController.swift} (88%) rename iphone/Maps/Bookmarks/Catalog/Dialogs/{BookmarksSubscriptionFailViewController.xib => SubscriptionFailViewController.xib} (86%) rename iphone/Maps/Bookmarks/Catalog/Dialogs/{BookmarksSubscriptionGoToCatalogViewController.swift => SubscriptionGoToCatalogViewController.swift} (88%) rename iphone/Maps/Bookmarks/Catalog/Dialogs/{BookmarksSubscriptionGoToCatalogViewController.xib => SubscriptionGoToCatalogViewController.xib} (96%) rename iphone/Maps/Bookmarks/Catalog/Dialogs/{BookmarksSubscriptionSuccessViewController.swift => SubscriptionSuccessViewController.swift} (88%) rename iphone/Maps/Bookmarks/Catalog/Dialogs/{BookmarksSubscriptionSuccessViewController.xib => SubscriptionSuccessViewController.xib} (98%) create mode 100644 iphone/Maps/Bookmarks/Catalog/Subscription/AllPassSubscriptionViewController.swift create mode 100644 iphone/Maps/Bookmarks/Catalog/Subscription/AllPassSubscriptionViewController.xib rename iphone/Maps/Bookmarks/Catalog/{ => Subscription}/BookmarksSubscriptionButton.swift (100%) rename iphone/Maps/Bookmarks/Catalog/{ => Subscription}/BookmarksSubscriptionViewController.swift (80%) rename iphone/Maps/Bookmarks/Catalog/{ => Subscription}/BookmarksSubscriptionViewController.xib (99%) create mode 100644 iphone/Maps/Classes/Pages/ImageViewCrossDisolve.swift create mode 100644 iphone/Maps/Classes/Pages/PageIndicator.swift create mode 100644 iphone/Maps/Core/Subscriptions/SubscriptionGroup.swift create mode 100644 iphone/Maps/Core/Subscriptions/SubscriptionGroupItem.swift create mode 100755 iphone/Maps/FredokaOne-Regular.ttf create mode 100644 iphone/Maps/Images.xcassets/BookmarksSubscription/AllPassSubscriptionBg1.imageset/Contents.json create mode 100644 iphone/Maps/Images.xcassets/BookmarksSubscription/AllPassSubscriptionBg1.imageset/iPhone 8 Plus - 1.png create mode 100644 iphone/Maps/Images.xcassets/BookmarksSubscription/AllPassSubscriptionBg1.imageset/iPhone 8 Plus - 1@2x.png create mode 100644 iphone/Maps/Images.xcassets/BookmarksSubscription/AllPassSubscriptionBg1.imageset/iPhone 8 Plus - 1@3x.png create mode 100644 iphone/Maps/Images.xcassets/BookmarksSubscription/AllPassSubscriptionBg2.imageset/Contents.json create mode 100644 iphone/Maps/Images.xcassets/BookmarksSubscription/AllPassSubscriptionBg2.imageset/iPhone 8 Plus - 2.png create mode 100644 iphone/Maps/Images.xcassets/BookmarksSubscription/AllPassSubscriptionBg2.imageset/iPhone 8 Plus - 2@2x.png create mode 100644 iphone/Maps/Images.xcassets/BookmarksSubscription/AllPassSubscriptionBg2.imageset/iPhone 8 Plus - 2@3x.png create mode 100644 iphone/Maps/Images.xcassets/BookmarksSubscription/AllPassSubscriptionBg3.imageset/Contents.json create mode 100644 iphone/Maps/Images.xcassets/BookmarksSubscription/AllPassSubscriptionBg3.imageset/iPhone 8 Plus - 3.png create mode 100644 iphone/Maps/Images.xcassets/BookmarksSubscription/AllPassSubscriptionBg3.imageset/iPhone 8 Plus - 3@2x.png create mode 100644 iphone/Maps/Images.xcassets/BookmarksSubscription/AllPassSubscriptionBg3.imageset/iPhone 8 Plus - 3@3x.png diff --git a/iphone/Maps/Bookmarks/Catalog/CatalogWebViewController.swift b/iphone/Maps/Bookmarks/Catalog/CatalogWebViewController.swift index bc22f4a7ae..abe0ab5568 100644 --- a/iphone/Maps/Bookmarks/Catalog/CatalogWebViewController.swift +++ b/iphone/Maps/Bookmarks/Catalog/CatalogWebViewController.swift @@ -223,7 +223,7 @@ final class CatalogWebViewController: WebViewController { subscribeViewController.onSubscribe = { [weak self] in self?.webView.reloadFromOrigin() self?.dismiss(animated: true) - let successDialog = BookmarksSubscriptionSuccessViewController { [weak self] in + let successDialog = SubscriptionSuccessViewController { [weak self] in self?.dismiss(animated: true) } self?.present(successDialog, animated: true) diff --git a/iphone/Maps/Bookmarks/Catalog/Dialogs/BookmarksSubscriptionExpiredViewController.swift b/iphone/Maps/Bookmarks/Catalog/Dialogs/SubscriptionExpiredViewController.swift similarity index 91% rename from iphone/Maps/Bookmarks/Catalog/Dialogs/BookmarksSubscriptionExpiredViewController.swift rename to iphone/Maps/Bookmarks/Catalog/Dialogs/SubscriptionExpiredViewController.swift index 6f1c671eca..ceb73969bf 100644 --- a/iphone/Maps/Bookmarks/Catalog/Dialogs/BookmarksSubscriptionExpiredViewController.swift +++ b/iphone/Maps/Bookmarks/Catalog/Dialogs/SubscriptionExpiredViewController.swift @@ -1,4 +1,4 @@ -class BookmarksSubscriptionExpiredViewController: UIViewController { +class SubscriptionExpiredViewController: UIViewController { private let transitioning = FadeTransitioning(cancellable: false) private let onSubscribe: MWMVoidBlock private let onDelete: MWMVoidBlock diff --git a/iphone/Maps/Bookmarks/Catalog/Dialogs/BookmarksSubscriptionExpiredViewController.xib b/iphone/Maps/Bookmarks/Catalog/Dialogs/SubscriptionExpiredViewController.xib similarity index 88% rename from iphone/Maps/Bookmarks/Catalog/Dialogs/BookmarksSubscriptionExpiredViewController.xib rename to iphone/Maps/Bookmarks/Catalog/Dialogs/SubscriptionExpiredViewController.xib index be329a0507..d942bf9f63 100644 --- a/iphone/Maps/Bookmarks/Catalog/Dialogs/BookmarksSubscriptionExpiredViewController.xib +++ b/iphone/Maps/Bookmarks/Catalog/Dialogs/SubscriptionExpiredViewController.xib @@ -1,16 +1,12 @@ - - - - + - - + - + @@ -20,10 +16,10 @@ - - + + -