From f62ad5be5fd08b3195ff5f38a283b095ba6b1526 Mon Sep 17 00:00:00 2001 From: Boyko Mihail Date: Wed, 23 Sep 2020 13:42:38 +0300 Subject: [PATCH 01/18] cherry-pick 45d88b4cf6888b6c4f10bc3eda8e4faaad7fd8d1 --- LeadKit.xcodeproj/project.pbxproj | 16 ++++++++++ .../BaseConfigurableController.swift | 30 +++++++++++++++++++ .../BaseOrientationNavigationController.swift | 25 ++++++++++++++++ .../UIDevice/UIDevice+ScreenOrientation.swift | 14 +++++++++ 4 files changed, 85 insertions(+) create mode 100644 Sources/Classes/Controllers/BaseOrientationNavigationController.swift create mode 100644 Sources/Extensions/UIKit/UIDevice/UIDevice+ScreenOrientation.swift diff --git a/LeadKit.xcodeproj/project.pbxproj b/LeadKit.xcodeproj/project.pbxproj index 010fe015..c531db4d 100644 --- a/LeadKit.xcodeproj/project.pbxproj +++ b/LeadKit.xcodeproj/project.pbxproj @@ -16,6 +16,8 @@ 40F118471F8FEF97004AADAF /* AppearanceConfigurable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40F118461F8FEF97004AADAF /* AppearanceConfigurable.swift */; }; 40F118491F8FF223004AADAF /* TableRow+AppearanceExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40F118481F8FF223004AADAF /* TableRow+AppearanceExtension.swift */; }; 411073AF23466B41002DD9B9 /* UIViewController+PresentFullScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 411073AE23466B41002DD9B9 /* UIViewController+PresentFullScreen.swift */; }; + 5ED2C0B2251A354E00D4E258 /* BaseOrientationNavigationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5ED2C0B1251A354E00D4E258 /* BaseOrientationNavigationController.swift */; }; + 5ED2C0B5251A366700D4E258 /* UIDevice+ScreenOrientation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5ED2C0B4251A366700D4E258 /* UIDevice+ScreenOrientation.swift */; }; 67051ADB1EBC7C36008EADC0 /* SpinnerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67051ADA1EBC7C36008EADC0 /* SpinnerView.swift */; }; 67051ADD1EBC7C36008EADC0 /* SpinnerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67051ADA1EBC7C36008EADC0 /* SpinnerView.swift */; }; 6713C23720AF0C4D00875921 /* NetworkOperationState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6713C23620AF0C4D00875921 /* NetworkOperationState.swift */; }; @@ -550,6 +552,8 @@ 40F118461F8FEF97004AADAF /* AppearanceConfigurable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppearanceConfigurable.swift; sourceTree = ""; }; 40F118481F8FF223004AADAF /* TableRow+AppearanceExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "TableRow+AppearanceExtension.swift"; sourceTree = ""; }; 411073AE23466B41002DD9B9 /* UIViewController+PresentFullScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIViewController+PresentFullScreen.swift"; sourceTree = ""; }; + 5ED2C0B1251A354E00D4E258 /* BaseOrientationNavigationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseOrientationNavigationController.swift; sourceTree = ""; }; + 5ED2C0B4251A366700D4E258 /* UIDevice+ScreenOrientation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIDevice+ScreenOrientation.swift"; sourceTree = ""; }; 67051ADA1EBC7C36008EADC0 /* SpinnerView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SpinnerView.swift; sourceTree = ""; }; 6713C23620AF0C4D00875921 /* NetworkOperationState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkOperationState.swift; sourceTree = ""; }; 6713C23B20AF0D5900875921 /* NetworkOperationModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkOperationModel.swift; sourceTree = ""; }; @@ -859,6 +863,14 @@ path = UITableView; sourceTree = ""; }; + 5ED2C0B3251A365800D4E258 /* UIDevice */ = { + isa = PBXGroup; + children = ( + 5ED2C0B4251A366700D4E258 /* UIDevice+ScreenOrientation.swift */, + ); + path = UIDevice; + sourceTree = ""; + }; 671461C41EB3396E00EAB194 /* Classes */ = { isa = PBXGroup; children = ( @@ -1323,6 +1335,7 @@ 672947E0206EA36B00AC6B6B /* UIKit */ = { isa = PBXGroup; children = ( + 5ED2C0B3251A365800D4E258 /* UIDevice */, 6741CEB220E242B600FEC4D9 /* CollectionViewHolder */, 6741CEAD20E2428A00FEC4D9 /* TableViewHolder */, 674AF55A1EC45B1600038A8F /* UIActivityIndicatorView */, @@ -1482,6 +1495,7 @@ 6741CECC20E243F800FEC4D9 /* BaseCustomViewController.swift */, 675E0AA821072FF400CDC143 /* BaseScrollContentController.swift */, 67DB776321086A12001CB56B /* BaseTableContentController.swift */, + 5ED2C0B1251A354E00D4E258 /* BaseOrientationNavigationController.swift */, ); path = Controllers; sourceTree = ""; @@ -2428,6 +2442,7 @@ 6774528D20625C9E0024EEEF /* GeneralDataLoadingState.swift in Sources */, 72005A1F2266226800ECE090 /* CustomizableButtonViewModel.swift in Sources */, 677B06C4211884F3006C947D /* BaseTextAttributes.swift in Sources */, + 5ED2C0B2251A354E00D4E258 /* BaseOrientationNavigationController.swift in Sources */, 675E0AA921072FF400CDC143 /* BaseScrollContentController.swift in Sources */, 671462D01EB3396E00EAB194 /* UIScrollView+Support.swift in Sources */, 671463901EB3396E00EAB194 /* TemplateDrawingOperation.swift in Sources */, @@ -2470,6 +2485,7 @@ 67E902572125B66E008EDF45 /* UIImageView+ExpandCollapseDisclosure.swift in Sources */, 671462781EB3396E00EAB194 /* ResizeMode.swift in Sources */, 67E902512125B064008EDF45 /* BuildInNumberTypes+NSNumberConvertible.swift in Sources */, + 5ED2C0B5251A366700D4E258 /* UIDevice+ScreenOrientation.swift in Sources */, A676AE551F98112E001F9214 /* ObservableMappable.swift in Sources */, 6741CEA520E2418200FEC4D9 /* TableViewHolder.swift in Sources */, 8546C2E3224E86280059C255 /* ApiUploadRequestParameters.swift in Sources */, diff --git a/Sources/Classes/Controllers/BaseConfigurableController.swift b/Sources/Classes/Controllers/BaseConfigurableController.swift index 9c3ee826..40ad1f7f 100644 --- a/Sources/Classes/Controllers/BaseConfigurableController.swift +++ b/Sources/Classes/Controllers/BaseConfigurableController.swift @@ -25,9 +25,39 @@ import UIKit.UIViewController /// Base controller that should be configured with view model. open class BaseConfigurableController: UIViewController, ConfigurableController { + /// Ability to set forced screen orientation + open var forcedInterfaceOrientation: UIInterfaceOrientation? + /// A view model instance used by this controller. public let viewModel: ViewModel + override var interfaceOrientation: UIInterfaceOrientation { + return forcedInterfaceOrientation ?? super.interfaceOrientation + } + + open override var supportedInterfaceOrientations: UIInterfaceOrientationMask { + switch interfaceOrientation { + case .landscapeLeft: + return .landscapeLeft + + case .landscapeRight: + return .landscapeRight + + case .portrait: + return .portrait + + case .portraitUpsideDown: + return .portraitUpsideDown + + default: + return .portrait + } + } + + open override var preferredInterfaceOrientationForPresentation: UIInterfaceOrientation { + return interfaceOrientation + } + /// Initializer with view model parameter. /// /// - Parameter viewModel: A view model to configure this controller. diff --git a/Sources/Classes/Controllers/BaseOrientationNavigationController.swift b/Sources/Classes/Controllers/BaseOrientationNavigationController.swift new file mode 100644 index 00000000..342a8885 --- /dev/null +++ b/Sources/Classes/Controllers/BaseOrientationNavigationController.swift @@ -0,0 +1,25 @@ +import RxSwift +import UIKit + +open class OrientationNavigationController: UINavigationController { + + // MARK: - Public properties + + open override var shouldAutorotate: Bool { + return presentedViewController?.shouldAutorotate + ?? topViewController?.shouldAutorotate + ?? false + } + + open override var supportedInterfaceOrientations: UIInterfaceOrientationMask { + return presentedViewController?.supportedInterfaceOrientations + ?? topViewController?.supportedInterfaceOrientations + ?? .portrait + } + + open override var preferredInterfaceOrientationForPresentation: UIInterfaceOrientation { + return presentedViewController?.preferredInterfaceOrientationForPresentation + ?? topViewController?.preferredInterfaceOrientationForPresentation + ?? .portrait + } +} diff --git a/Sources/Extensions/UIKit/UIDevice/UIDevice+ScreenOrientation.swift b/Sources/Extensions/UIKit/UIDevice/UIDevice+ScreenOrientation.swift new file mode 100644 index 00000000..49ba8e33 --- /dev/null +++ b/Sources/Extensions/UIKit/UIDevice/UIDevice+ScreenOrientation.swift @@ -0,0 +1,14 @@ +import UIKit + +public extension UIDevice { + + /// Вручную повернуть экран устройства + /// + /// - Parameters: + /// - orientation: ориентация в терминах ScreenOrientation + func rotateOrientationManually(to orientation: UIInterfaceOrientation) { + let orientationValue = Int(orientation.rawValue) + UIDevice.current.setValue(orientationValue, forKey: "orientation") + UIViewController.attemptRotationToDeviceOrientation() + } +} From 0bc80d98b8a228dab3562984638cb63c78f0eb72 Mon Sep 17 00:00:00 2001 From: Boyko Mihail Date: Wed, 23 Sep 2020 14:48:08 +0300 Subject: [PATCH 02/18] Fix PR issue from Ivan Smolin --- .../Controllers/BaseConfigurableController.swift | 10 +++------- .../BaseOrientationNavigationController.swift | 6 +++--- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/Sources/Classes/Controllers/BaseConfigurableController.swift b/Sources/Classes/Controllers/BaseConfigurableController.swift index 40ad1f7f..388cab40 100644 --- a/Sources/Classes/Controllers/BaseConfigurableController.swift +++ b/Sources/Classes/Controllers/BaseConfigurableController.swift @@ -31,12 +31,8 @@ open class BaseConfigurableController: UIViewController, Configurable /// A view model instance used by this controller. public let viewModel: ViewModel - override var interfaceOrientation: UIInterfaceOrientation { - return forcedInterfaceOrientation ?? super.interfaceOrientation - } - open override var supportedInterfaceOrientations: UIInterfaceOrientationMask { - switch interfaceOrientation { + switch forcedInterfaceOrientation { case .landscapeLeft: return .landscapeLeft @@ -50,12 +46,12 @@ open class BaseConfigurableController: UIViewController, Configurable return .portraitUpsideDown default: - return .portrait + return super.supportedInterfaceOrientations } } open override var preferredInterfaceOrientationForPresentation: UIInterfaceOrientation { - return interfaceOrientation + return forcedInterfaceOrientation ?? super.preferredInterfaceOrientationForPresentation } /// Initializer with view model parameter. diff --git a/Sources/Classes/Controllers/BaseOrientationNavigationController.swift b/Sources/Classes/Controllers/BaseOrientationNavigationController.swift index 342a8885..c24c0110 100644 --- a/Sources/Classes/Controllers/BaseOrientationNavigationController.swift +++ b/Sources/Classes/Controllers/BaseOrientationNavigationController.swift @@ -8,18 +8,18 @@ open class OrientationNavigationController: UINavigationController { open override var shouldAutorotate: Bool { return presentedViewController?.shouldAutorotate ?? topViewController?.shouldAutorotate - ?? false + ?? super.shouldAutorotate } open override var supportedInterfaceOrientations: UIInterfaceOrientationMask { return presentedViewController?.supportedInterfaceOrientations ?? topViewController?.supportedInterfaceOrientations - ?? .portrait + ?? super.supportedInterfaceOrientations } open override var preferredInterfaceOrientationForPresentation: UIInterfaceOrientation { return presentedViewController?.preferredInterfaceOrientationForPresentation ?? topViewController?.preferredInterfaceOrientationForPresentation - ?? .portrait + ?? super.preferredInterfaceOrientationForPresentation } } From ccc085df3c5df7bd16f99188055b3036449d4c75 Mon Sep 17 00:00:00 2001 From: Boyko Mihail Date: Thu, 1 Oct 2020 19:46:40 +0300 Subject: [PATCH 03/18] Add BaseOrientationController --- LeadKit.xcodeproj/project.pbxproj | 4 +++ .../BaseConfigurableController.swift | 28 +---------------- .../BaseOrientationController.swift | 30 +++++++++++++++++++ 3 files changed, 35 insertions(+), 27 deletions(-) create mode 100644 Sources/Classes/Controllers/BaseOrientationController.swift diff --git a/LeadKit.xcodeproj/project.pbxproj b/LeadKit.xcodeproj/project.pbxproj index c531db4d..4395f0cd 100644 --- a/LeadKit.xcodeproj/project.pbxproj +++ b/LeadKit.xcodeproj/project.pbxproj @@ -16,6 +16,7 @@ 40F118471F8FEF97004AADAF /* AppearanceConfigurable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40F118461F8FEF97004AADAF /* AppearanceConfigurable.swift */; }; 40F118491F8FF223004AADAF /* TableRow+AppearanceExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40F118481F8FF223004AADAF /* TableRow+AppearanceExtension.swift */; }; 411073AF23466B41002DD9B9 /* UIViewController+PresentFullScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 411073AE23466B41002DD9B9 /* UIViewController+PresentFullScreen.swift */; }; + 5E23631F25263EFA00E2F96B /* BaseOrientationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E23631E25263EFA00E2F96B /* BaseOrientationController.swift */; }; 5ED2C0B2251A354E00D4E258 /* BaseOrientationNavigationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5ED2C0B1251A354E00D4E258 /* BaseOrientationNavigationController.swift */; }; 5ED2C0B5251A366700D4E258 /* UIDevice+ScreenOrientation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5ED2C0B4251A366700D4E258 /* UIDevice+ScreenOrientation.swift */; }; 67051ADB1EBC7C36008EADC0 /* SpinnerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67051ADA1EBC7C36008EADC0 /* SpinnerView.swift */; }; @@ -552,6 +553,7 @@ 40F118461F8FEF97004AADAF /* AppearanceConfigurable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppearanceConfigurable.swift; sourceTree = ""; }; 40F118481F8FF223004AADAF /* TableRow+AppearanceExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "TableRow+AppearanceExtension.swift"; sourceTree = ""; }; 411073AE23466B41002DD9B9 /* UIViewController+PresentFullScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIViewController+PresentFullScreen.swift"; sourceTree = ""; }; + 5E23631E25263EFA00E2F96B /* BaseOrientationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseOrientationController.swift; sourceTree = ""; }; 5ED2C0B1251A354E00D4E258 /* BaseOrientationNavigationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseOrientationNavigationController.swift; sourceTree = ""; }; 5ED2C0B4251A366700D4E258 /* UIDevice+ScreenOrientation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIDevice+ScreenOrientation.swift"; sourceTree = ""; }; 67051ADA1EBC7C36008EADC0 /* SpinnerView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SpinnerView.swift; sourceTree = ""; }; @@ -1496,6 +1498,7 @@ 675E0AA821072FF400CDC143 /* BaseScrollContentController.swift */, 67DB776321086A12001CB56B /* BaseTableContentController.swift */, 5ED2C0B1251A354E00D4E258 /* BaseOrientationNavigationController.swift */, + 5E23631E25263EFA00E2F96B /* BaseOrientationController.swift */, ); path = Controllers; sourceTree = ""; @@ -2530,6 +2533,7 @@ 671463081EB3396E00EAB194 /* UIView+Rotation.swift in Sources */, 6714626C1EB3396E00EAB194 /* XibView.swift in Sources */, 67274778206CD0B500725163 /* UILabel+ViewTextConfigurable.swift in Sources */, + 5E23631F25263EFA00E2F96B /* BaseOrientationController.swift in Sources */, 67ED2BE520B44F4300508B3E /* InitializableView+DefaultImplementation.swift in Sources */, 36FE777020F669E300284C09 /* String+ConvertToHost.swift in Sources */, 6774529220625D170024EEEF /* GeneralDataLoadingModel.swift in Sources */, diff --git a/Sources/Classes/Controllers/BaseConfigurableController.swift b/Sources/Classes/Controllers/BaseConfigurableController.swift index 388cab40..9b8a3dee 100644 --- a/Sources/Classes/Controllers/BaseConfigurableController.swift +++ b/Sources/Classes/Controllers/BaseConfigurableController.swift @@ -23,37 +23,11 @@ import UIKit.UIViewController /// Base controller that should be configured with view model. -open class BaseConfigurableController: UIViewController, ConfigurableController { - - /// Ability to set forced screen orientation - open var forcedInterfaceOrientation: UIInterfaceOrientation? +open class BaseConfigurableController: BaseOrientationController, ConfigurableController { /// A view model instance used by this controller. public let viewModel: ViewModel - open override var supportedInterfaceOrientations: UIInterfaceOrientationMask { - switch forcedInterfaceOrientation { - case .landscapeLeft: - return .landscapeLeft - - case .landscapeRight: - return .landscapeRight - - case .portrait: - return .portrait - - case .portraitUpsideDown: - return .portraitUpsideDown - - default: - return super.supportedInterfaceOrientations - } - } - - open override var preferredInterfaceOrientationForPresentation: UIInterfaceOrientation { - return forcedInterfaceOrientation ?? super.preferredInterfaceOrientationForPresentation - } - /// Initializer with view model parameter. /// /// - Parameter viewModel: A view model to configure this controller. diff --git a/Sources/Classes/Controllers/BaseOrientationController.swift b/Sources/Classes/Controllers/BaseOrientationController.swift new file mode 100644 index 00000000..13a85aff --- /dev/null +++ b/Sources/Classes/Controllers/BaseOrientationController.swift @@ -0,0 +1,30 @@ +import Foundation + +open class BaseOrientationController: UIViewController { + + /// Ability to set forced screen orientation + open var forcedInterfaceOrientation: UIInterfaceOrientation? + + open override var supportedInterfaceOrientations: UIInterfaceOrientationMask { + switch forcedInterfaceOrientation { + case .landscapeLeft: + return .landscapeLeft + + case .landscapeRight: + return .landscapeRight + + case .portrait: + return .portrait + + case .portraitUpsideDown: + return .portraitUpsideDown + + default: + return super.supportedInterfaceOrientations + } + } + + open override var preferredInterfaceOrientationForPresentation: UIInterfaceOrientation { + return forcedInterfaceOrientation ?? super.preferredInterfaceOrientationForPresentation + } +} From dfeb41b91924b463ce972933d2c1113f6466a590 Mon Sep 17 00:00:00 2001 From: Boyko Mihail Date: Thu, 1 Oct 2020 20:28:46 +0300 Subject: [PATCH 04/18] Add videoOrientation extension --- .../UIInterfaceOrientation+ VideoOrientation.swift | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 Sources/Extensions/UIInterfaceOrientation/UIInterfaceOrientation+ VideoOrientation.swift diff --git a/Sources/Extensions/UIInterfaceOrientation/UIInterfaceOrientation+ VideoOrientation.swift b/Sources/Extensions/UIInterfaceOrientation/UIInterfaceOrientation+ VideoOrientation.swift new file mode 100644 index 00000000..25e1fcfd --- /dev/null +++ b/Sources/Extensions/UIInterfaceOrientation/UIInterfaceOrientation+ VideoOrientation.swift @@ -0,0 +1,9 @@ +// +// UIInterfaceOrientation+ VideoOrientation.swift +// LeadKit iOS +// +// Created by Mikhail Boyko on 01.10.2020. +// Copyright © 2020 Touch Instinct. All rights reserved. +// + +import Foundation From 28c51ae7f6f478987f86a9985705bcdd6e602309 Mon Sep 17 00:00:00 2001 From: Boyko Mihail Date: Thu, 1 Oct 2020 20:33:49 +0300 Subject: [PATCH 05/18] Add videoOrientation extension 2 --- LeadKit.xcodeproj/project.pbxproj | 12 +++++++++ ...terfaceOrientation+ VideoOrientation.swift | 27 +++++++++++++------ 2 files changed, 31 insertions(+), 8 deletions(-) diff --git a/LeadKit.xcodeproj/project.pbxproj b/LeadKit.xcodeproj/project.pbxproj index 4395f0cd..c881be76 100644 --- a/LeadKit.xcodeproj/project.pbxproj +++ b/LeadKit.xcodeproj/project.pbxproj @@ -17,6 +17,7 @@ 40F118491F8FF223004AADAF /* TableRow+AppearanceExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40F118481F8FF223004AADAF /* TableRow+AppearanceExtension.swift */; }; 411073AF23466B41002DD9B9 /* UIViewController+PresentFullScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 411073AE23466B41002DD9B9 /* UIViewController+PresentFullScreen.swift */; }; 5E23631F25263EFA00E2F96B /* BaseOrientationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E23631E25263EFA00E2F96B /* BaseOrientationController.swift */; }; + 5E2364182526489A00E2F96B /* UIInterfaceOrientation+ VideoOrientation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E2364172526489A00E2F96B /* UIInterfaceOrientation+ VideoOrientation.swift */; }; 5ED2C0B2251A354E00D4E258 /* BaseOrientationNavigationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5ED2C0B1251A354E00D4E258 /* BaseOrientationNavigationController.swift */; }; 5ED2C0B5251A366700D4E258 /* UIDevice+ScreenOrientation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5ED2C0B4251A366700D4E258 /* UIDevice+ScreenOrientation.swift */; }; 67051ADB1EBC7C36008EADC0 /* SpinnerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67051ADA1EBC7C36008EADC0 /* SpinnerView.swift */; }; @@ -554,6 +555,7 @@ 40F118481F8FF223004AADAF /* TableRow+AppearanceExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "TableRow+AppearanceExtension.swift"; sourceTree = ""; }; 411073AE23466B41002DD9B9 /* UIViewController+PresentFullScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIViewController+PresentFullScreen.swift"; sourceTree = ""; }; 5E23631E25263EFA00E2F96B /* BaseOrientationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseOrientationController.swift; sourceTree = ""; }; + 5E2364172526489A00E2F96B /* UIInterfaceOrientation+ VideoOrientation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIInterfaceOrientation+ VideoOrientation.swift"; sourceTree = ""; }; 5ED2C0B1251A354E00D4E258 /* BaseOrientationNavigationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseOrientationNavigationController.swift; sourceTree = ""; }; 5ED2C0B4251A366700D4E258 /* UIDevice+ScreenOrientation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIDevice+ScreenOrientation.swift"; sourceTree = ""; }; 67051ADA1EBC7C36008EADC0 /* SpinnerView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SpinnerView.swift; sourceTree = ""; }; @@ -865,6 +867,14 @@ path = UITableView; sourceTree = ""; }; + 5E2364162526488300E2F96B /* UIInterfaceOrientation */ = { + isa = PBXGroup; + children = ( + 5E2364172526489A00E2F96B /* UIInterfaceOrientation+ VideoOrientation.swift */, + ); + path = UIInterfaceOrientation; + sourceTree = ""; + }; 5ED2C0B3251A365800D4E258 /* UIDevice */ = { isa = PBXGroup; children = ( @@ -952,6 +962,7 @@ 671461DA1EB3396E00EAB194 /* Extensions */ = { isa = PBXGroup; children = ( + 5E2364162526488300E2F96B /* UIInterfaceOrientation */, 6732F23C214C09DF00B446F2 /* Foundation */, 671461DB1EB3396E00EAB194 /* Alamofire */, EFBE57CE1EC35ED90040E00A /* Array */, @@ -2460,6 +2471,7 @@ 82D2966D2264B1790067735C /* LabelTableViewCell.swift in Sources */, 671463301EB3396E00EAB194 /* CursorType.swift in Sources */, 67FDC25F1FA310EA00C76A77 /* RequestError.swift in Sources */, + 5E2364182526489A00E2F96B /* UIInterfaceOrientation+ VideoOrientation.swift in Sources */, 677B06A021186A69006C947D /* SharedSequence+Extensions.swift in Sources */, 6760DC4D212F351700020BAE /* UIView+AddSubviews.swift in Sources */, 67745268206249360024EEEF /* UITableView+PaginationWrappable.swift in Sources */, diff --git a/Sources/Extensions/UIInterfaceOrientation/UIInterfaceOrientation+ VideoOrientation.swift b/Sources/Extensions/UIInterfaceOrientation/UIInterfaceOrientation+ VideoOrientation.swift index 25e1fcfd..d087aa84 100644 --- a/Sources/Extensions/UIInterfaceOrientation/UIInterfaceOrientation+ VideoOrientation.swift +++ b/Sources/Extensions/UIInterfaceOrientation/UIInterfaceOrientation+ VideoOrientation.swift @@ -1,9 +1,20 @@ -// -// UIInterfaceOrientation+ VideoOrientation.swift -// LeadKit iOS -// -// Created by Mikhail Boyko on 01.10.2020. -// Copyright © 2020 Touch Instinct. All rights reserved. -// - import Foundation +import AVFoundation + +extension UIInterfaceOrientation { + + var videoOrientation: AVCaptureVideoOrientation { + switch self { + case .portrait: + return .portrait + case .landscapeLeft: + return .landscapeLeft + case .landscapeRight: + return .landscapeRight + case .portraitUpsideDown: + return .portraitUpsideDown + case .unknown: + return .portrait + } + } +} From 6fca1936df2f935bf406f50514c064b1644afe3f Mon Sep 17 00:00:00 2001 From: Boyko Mihail Date: Thu, 1 Oct 2020 20:43:01 +0300 Subject: [PATCH 06/18] fix public extension --- .../UIInterfaceOrientation+ VideoOrientation.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Extensions/UIInterfaceOrientation/UIInterfaceOrientation+ VideoOrientation.swift b/Sources/Extensions/UIInterfaceOrientation/UIInterfaceOrientation+ VideoOrientation.swift index d087aa84..dcf9bba5 100644 --- a/Sources/Extensions/UIInterfaceOrientation/UIInterfaceOrientation+ VideoOrientation.swift +++ b/Sources/Extensions/UIInterfaceOrientation/UIInterfaceOrientation+ VideoOrientation.swift @@ -1,7 +1,7 @@ import Foundation import AVFoundation -extension UIInterfaceOrientation { +public extension UIInterfaceOrientation { var videoOrientation: AVCaptureVideoOrientation { switch self { From ce26a914a05d7d47af4f1c06a8ba28de0f94f2ce Mon Sep 17 00:00:00 2001 From: Boyko Mihail Date: Thu, 1 Oct 2020 20:59:45 +0300 Subject: [PATCH 07/18] cherry-pick 5427b0f1bea990b511a220d34223f82ac31b978b --- LeadKit.xcodeproj/project.pbxproj | 78 +++++++++++++++++++++++++++---- 1 file changed, 68 insertions(+), 10 deletions(-) diff --git a/LeadKit.xcodeproj/project.pbxproj b/LeadKit.xcodeproj/project.pbxproj index c881be76..ab9769bd 100644 --- a/LeadKit.xcodeproj/project.pbxproj +++ b/LeadKit.xcodeproj/project.pbxproj @@ -16,6 +16,13 @@ 40F118471F8FEF97004AADAF /* AppearanceConfigurable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40F118461F8FEF97004AADAF /* AppearanceConfigurable.swift */; }; 40F118491F8FF223004AADAF /* TableRow+AppearanceExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40F118481F8FF223004AADAF /* TableRow+AppearanceExtension.swift */; }; 411073AF23466B41002DD9B9 /* UIViewController+PresentFullScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 411073AE23466B41002DD9B9 /* UIViewController+PresentFullScreen.swift */; }; + 4CF65D1424DD684A0006B001 /* ButtonHolder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF65D1324DD684A0006B001 /* ButtonHolder.swift */; }; + 4CF65D1624DD69250006B001 /* UIButton+ButtonHolder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF65D1524DD69250006B001 /* UIButton+ButtonHolder.swift */; }; + 4CF65D1824DD6C080006B001 /* ButtonHolderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF65D1724DD6C080006B001 /* ButtonHolderView.swift */; }; + 52421F8D24EAB52E00948DD1 /* ContainerTableCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52421F8C24EAB52E00948DD1 /* ContainerTableCell.swift */; }; + 52421F8F24EAB84900948DD1 /* BaseRxTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52421F8E24EAB84900948DD1 /* BaseRxTableViewCell.swift */; }; + 52421F9424EBCFAE00948DD1 /* VoidTappableViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52421F9324EBCFAE00948DD1 /* VoidTappableViewModel.swift */; }; + 52421F9624EBCFBB00948DD1 /* BaseTappableViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52421F9524EBCFBB00948DD1 /* BaseTappableViewModel.swift */; }; 5E23631F25263EFA00E2F96B /* BaseOrientationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E23631E25263EFA00E2F96B /* BaseOrientationController.swift */; }; 5E2364182526489A00E2F96B /* UIInterfaceOrientation+ VideoOrientation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E2364172526489A00E2F96B /* UIInterfaceOrientation+ VideoOrientation.swift */; }; 5ED2C0B2251A354E00D4E258 /* BaseOrientationNavigationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5ED2C0B1251A354E00D4E258 /* BaseOrientationNavigationController.swift */; }; @@ -92,7 +99,6 @@ 671462C81EB3396E00EAB194 /* String+Localization.swift in Sources */ = {isa = PBXBuildFile; fileRef = 671461FC1EB3396E00EAB194 /* String+Localization.swift */; }; 671462CA1EB3396E00EAB194 /* String+Localization.swift in Sources */ = {isa = PBXBuildFile; fileRef = 671461FC1EB3396E00EAB194 /* String+Localization.swift */; }; 671462CB1EB3396E00EAB194 /* String+Localization.swift in Sources */ = {isa = PBXBuildFile; fileRef = 671461FC1EB3396E00EAB194 /* String+Localization.swift */; }; - 671462D01EB3396E00EAB194 /* UIScrollView+Support.swift in Sources */ = {isa = PBXBuildFile; fileRef = 671461FF1EB3396E00EAB194 /* UIScrollView+Support.swift */; }; 671462D41EB3396E00EAB194 /* TableDirector+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 671462011EB3396E00EAB194 /* TableDirector+Extensions.swift */; }; 671462D81EB3396E00EAB194 /* TimeInterval+DateComponents.swift in Sources */ = {isa = PBXBuildFile; fileRef = 671462031EB3396E00EAB194 /* TimeInterval+DateComponents.swift */; }; 671462DA1EB3396E00EAB194 /* TimeInterval+DateComponents.swift in Sources */ = {isa = PBXBuildFile; fileRef = 671462031EB3396E00EAB194 /* TimeInterval+DateComponents.swift */; }; @@ -102,8 +108,6 @@ 671462E71EB3396E00EAB194 /* UIColor+Hex.swift in Sources */ = {isa = PBXBuildFile; fileRef = 671462091EB3396E00EAB194 /* UIColor+Hex.swift */; }; 671462EC1EB3396E00EAB194 /* UIImage+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6714620D1EB3396E00EAB194 /* UIImage+Extensions.swift */; }; 671462EF1EB3396E00EAB194 /* UIImage+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6714620D1EB3396E00EAB194 /* UIImage+Extensions.swift */; }; - 671462F01EB3396E00EAB194 /* UIImage+SupportExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6714620E1EB3396E00EAB194 /* UIImage+SupportExtensions.swift */; }; - 671462F31EB3396E00EAB194 /* UIImage+SupportExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6714620E1EB3396E00EAB194 /* UIImage+SupportExtensions.swift */; }; 671462FC1EB3396E00EAB194 /* UIView+XibNameProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 671462131EB3396E00EAB194 /* UIView+XibNameProtocol.swift */; }; 671462FF1EB3396E00EAB194 /* UIView+XibNameProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 671462131EB3396E00EAB194 /* UIView+XibNameProtocol.swift */; }; 671463001EB3396E00EAB194 /* UIView+LoadFromNib.swift in Sources */ = {isa = PBXBuildFile; fileRef = 671462141EB3396E00EAB194 /* UIView+LoadFromNib.swift */; }; @@ -554,6 +558,13 @@ 40F118461F8FEF97004AADAF /* AppearanceConfigurable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppearanceConfigurable.swift; sourceTree = ""; }; 40F118481F8FF223004AADAF /* TableRow+AppearanceExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "TableRow+AppearanceExtension.swift"; sourceTree = ""; }; 411073AE23466B41002DD9B9 /* UIViewController+PresentFullScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIViewController+PresentFullScreen.swift"; sourceTree = ""; }; + 4CF65D1324DD684A0006B001 /* ButtonHolder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ButtonHolder.swift; sourceTree = ""; }; + 4CF65D1524DD69250006B001 /* UIButton+ButtonHolder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIButton+ButtonHolder.swift"; sourceTree = ""; }; + 4CF65D1724DD6C080006B001 /* ButtonHolderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ButtonHolderView.swift; sourceTree = ""; }; + 52421F8C24EAB52E00948DD1 /* ContainerTableCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ContainerTableCell.swift; sourceTree = ""; }; + 52421F8E24EAB84900948DD1 /* BaseRxTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BaseRxTableViewCell.swift; sourceTree = ""; }; + 52421F9324EBCFAE00948DD1 /* VoidTappableViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VoidTappableViewModel.swift; sourceTree = ""; }; + 52421F9524EBCFBB00948DD1 /* BaseTappableViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseTappableViewModel.swift; sourceTree = ""; }; 5E23631E25263EFA00E2F96B /* BaseOrientationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseOrientationController.swift; sourceTree = ""; }; 5E2364172526489A00E2F96B /* UIInterfaceOrientation+ VideoOrientation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIInterfaceOrientation+ VideoOrientation.swift"; sourceTree = ""; }; 5ED2C0B1251A354E00D4E258 /* BaseOrientationNavigationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseOrientationNavigationController.swift; sourceTree = ""; }; @@ -583,12 +594,10 @@ 671461F11EB3396E00EAB194 /* Observable+DeferredJust.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Observable+DeferredJust.swift"; sourceTree = ""; }; 671461F61EB3396E00EAB194 /* Sequence+ConcurrentMap.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Sequence+ConcurrentMap.swift"; sourceTree = ""; }; 671461FC1EB3396E00EAB194 /* String+Localization.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "String+Localization.swift"; sourceTree = ""; }; - 671461FF1EB3396E00EAB194 /* UIScrollView+Support.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIScrollView+Support.swift"; sourceTree = ""; }; 671462011EB3396E00EAB194 /* TableDirector+Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "TableDirector+Extensions.swift"; sourceTree = ""; }; 671462031EB3396E00EAB194 /* TimeInterval+DateComponents.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "TimeInterval+DateComponents.swift"; sourceTree = ""; }; 671462091EB3396E00EAB194 /* UIColor+Hex.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIColor+Hex.swift"; sourceTree = ""; }; 6714620D1EB3396E00EAB194 /* UIImage+Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIImage+Extensions.swift"; sourceTree = ""; }; - 6714620E1EB3396E00EAB194 /* UIImage+SupportExtensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIImage+SupportExtensions.swift"; sourceTree = ""; }; 671462131EB3396E00EAB194 /* UIView+XibNameProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+XibNameProtocol.swift"; sourceTree = ""; }; 671462141EB3396E00EAB194 /* UIView+LoadFromNib.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+LoadFromNib.swift"; sourceTree = ""; }; 671462151EB3396E00EAB194 /* UIView+LoadingIndicator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+LoadingIndicator.swift"; sourceTree = ""; }; @@ -867,6 +876,48 @@ path = UITableView; sourceTree = ""; }; + 4CF65D1924DD6C3D0006B001 /* ButtonHolder */ = { + isa = PBXGroup; + children = ( + 4CF65D1324DD684A0006B001 /* ButtonHolder.swift */, + 4CF65D1724DD6C080006B001 /* ButtonHolderView.swift */, + ); + path = ButtonHolder; + sourceTree = ""; + }; + 52421F8B24EAB52E00948DD1 /* ContainerTableCell */ = { + isa = PBXGroup; + children = ( + 52421F8C24EAB52E00948DD1 /* ContainerTableCell.swift */, + ); + path = ContainerTableCell; + sourceTree = ""; + }; + 52421F9024EAB84E00948DD1 /* BaseRxTableViewCell */ = { + isa = PBXGroup; + children = ( + 52421F8E24EAB84900948DD1 /* BaseRxTableViewCell.swift */, + ); + path = BaseRxTableViewCell; + sourceTree = ""; + }; + 52421F9124EBCF6E00948DD1 /* ViewModels */ = { + isa = PBXGroup; + children = ( + 52421F9224EBCF8600948DD1 /* TappableViewModel */, + ); + path = ViewModels; + sourceTree = ""; + }; + 52421F9224EBCF8600948DD1 /* TappableViewModel */ = { + isa = PBXGroup; + children = ( + 52421F9524EBCFBB00948DD1 /* BaseTappableViewModel.swift */, + 52421F9324EBCFAE00948DD1 /* VoidTappableViewModel.swift */, + ); + path = TappableViewModel; + sourceTree = ""; + }; 5E2364162526488300E2F96B /* UIInterfaceOrientation */ = { isa = PBXGroup; children = ( @@ -891,6 +942,7 @@ 6774527E2062566D0024EEEF /* DataLoading */, 671461D21EB3396E00EAB194 /* Services */, 671461D41EB3396E00EAB194 /* Views */, + 52421F9124EBCF6E00948DD1 /* ViewModels */, ); path = Classes; sourceTree = ""; @@ -928,6 +980,8 @@ 671461D41EB3396E00EAB194 /* Views */ = { isa = PBXGroup; children = ( + 52421F9024EAB84E00948DD1 /* BaseRxTableViewCell */, + 52421F8B24EAB52E00948DD1 /* ContainerTableCell */, 72005A1A2266226800ECE090 /* CustomizableButton */, 677B06B6211873E7006C947D /* BasePlaceholderView */, 67DB77672108714A001CB56B /* CollectionViewWrapperView */, @@ -1076,7 +1130,6 @@ isa = PBXGroup; children = ( 7295474121E6628C009558E7 /* UINavigationItem+Support.swift */, - 671461FF1EB3396E00EAB194 /* UIScrollView+Support.swift */, ); path = Support; sourceTree = ""; @@ -1111,7 +1164,6 @@ isa = PBXGroup; children = ( 6714620D1EB3396E00EAB194 /* UIImage+Extensions.swift */, - 6714620E1EB3396E00EAB194 /* UIImage+SupportExtensions.swift */, ); path = UIImage; sourceTree = ""; @@ -1459,6 +1511,7 @@ 6741CE9F20E2413300FEC4D9 /* UIKit */ = { isa = PBXGroup; children = ( + 4CF65D1924DD6C3D0006B001 /* ButtonHolder */, 6741CEA020E2416C00FEC4D9 /* ScrollViewHolder.swift */, 6741CEA420E2418200FEC4D9 /* TableViewHolder.swift */, 6741CEA820E2418B00FEC4D9 /* CollectionViewHolder.swift */, @@ -1873,6 +1926,7 @@ isa = PBXGroup; children = ( 67E352512119AC060035BDDB /* UIButton+ViewTextConfigurable.swift */, + 4CF65D1524DD69250006B001 /* UIButton+ButtonHolder.swift */, ); path = UIButton; sourceTree = ""; @@ -2423,8 +2477,10 @@ 678D26A420692BFF00B05B93 /* TextFieldViewModelEvents.swift in Sources */, 671462801EB3396E00EAB194 /* DataRequest+Extensions.swift in Sources */, 67EB7FF8206175F700BDD9FB /* PaginationWrappable.swift in Sources */, + 52421F9624EBCFBB00948DD1 /* BaseTappableViewModel.swift in Sources */, 67990AD6213EA6A50040D195 /* ContentLoadingViewModel+Extensions.swift in Sources */, 671463541EB3396E00EAB194 /* StaticViewHeightProtocol.swift in Sources */, + 4CF65D1824DD6C080006B001 /* ButtonHolderView.swift in Sources */, 72AECC6B224A979D00D12E7C /* BaseSearchViewController.swift in Sources */, 673CF4112063ABD100C329F6 /* GeneralDataLoadingState+Extensions.swift in Sources */, 72005A1E2266226800ECE090 /* CustomizableButton.swift in Sources */, @@ -2435,7 +2491,6 @@ 671462841EB3396E00EAB194 /* CGContext+Initializers.swift in Sources */, EFBE57DB1EC361620040E00A /* UIView+Layout.swift in Sources */, 6714634C1EB3396E00EAB194 /* ReuseIdentifierProtocol.swift in Sources */, - 671462F01EB3396E00EAB194 /* UIImage+SupportExtensions.swift in Sources */, 6741CEAF20E242A500FEC4D9 /* TableViewHolder+ScrollViewHolder.swift in Sources */, 67CAF8C620652E2A00527085 /* TextFieldViewModel.swift in Sources */, 671462681EB3396E00EAB194 /* NetworkService.swift in Sources */, @@ -2452,13 +2507,13 @@ 671462FC1EB3396E00EAB194 /* UIView+XibNameProtocol.swift in Sources */, 67EB7FC0206140E600BDD9FB /* TotalCountCursor.swift in Sources */, 36DAAF512007CC920090BE0D /* UITableView+Extensions.swift in Sources */, + 4CF65D1624DD69250006B001 /* UIButton+ButtonHolder.swift in Sources */, 671463841EB3396E00EAB194 /* ResizeDrawingOperation.swift in Sources */, 6774528D20625C9E0024EEEF /* GeneralDataLoadingState.swift in Sources */, 72005A1F2266226800ECE090 /* CustomizableButtonViewModel.swift in Sources */, 677B06C4211884F3006C947D /* BaseTextAttributes.swift in Sources */, 5ED2C0B2251A354E00D4E258 /* BaseOrientationNavigationController.swift in Sources */, 675E0AA921072FF400CDC143 /* BaseScrollContentController.swift in Sources */, - 671462D01EB3396E00EAB194 /* UIScrollView+Support.swift in Sources */, 671463901EB3396E00EAB194 /* TemplateDrawingOperation.swift in Sources */, A658E54D1F8CD7790093527A /* TableRow+SeparatorsExtensions.swift in Sources */, 85A5D49522AA975000C7D254 /* Decimal+Rounding.swift in Sources */, @@ -2531,6 +2586,7 @@ A6E0DDF11F8A6C80002CA74E /* SeparatorConfiguration.swift in Sources */, 6727477F206CD3BD00725163 /* ViewText+Extensions.swift in Sources */, 67EB7FEB2061667900BDD9FB /* DefaultTotalCountCursorListingResult.swift in Sources */, + 4CF65D1424DD684A0006B001 /* ButtonHolder.swift in Sources */, 671AD26C206A3E8500EAF887 /* Array+TotalCountCursorListingResult.swift in Sources */, 673CF4382063E7CE00C329F6 /* GeneralDataLoadingController+DefaultImplementation.swift in Sources */, B85B768720B1CF6700F837C4 /* Encodable+Extensions.swift in Sources */, @@ -2569,8 +2625,10 @@ 411073AF23466B41002DD9B9 /* UIViewController+PresentFullScreen.swift in Sources */, 671462941EB3396E00EAB194 /* CGSize+CGContextSize.swift in Sources */, 6741CEA920E2418B00FEC4D9 /* CollectionViewHolder.swift in Sources */, + 52421F9424EBCFAE00948DD1 /* VoidTappableViewModel.swift in Sources */, 67745279206252020024EEEF /* DataLoadingState.swift in Sources */, 671463641EB3396E00EAB194 /* ViewHeightProtocol.swift in Sources */, + 52421F8F24EAB84900948DD1 /* BaseRxTableViewCell.swift in Sources */, 67EB7FDA20615D5B00BDD9FB /* ResettableRxCursorDataSource.swift in Sources */, 671462481EB3396E00EAB194 /* FixedPageCursor.swift in Sources */, 671462C81EB3396E00EAB194 /* String+Localization.swift in Sources */, @@ -2618,6 +2676,7 @@ 678D267920691D8200B05B93 /* DataModelFieldBinding.swift in Sources */, 72AECC71224A97F100D12E7C /* SearchResultsViewController.swift in Sources */, 673CF4342063E29B00C329F6 /* TextWithButtonPlaceholder.swift in Sources */, + 52421F8D24EAB52E00948DD1 /* ContainerTableCell.swift in Sources */, 673CF4222063D90600C329F6 /* DisposeBagHolder.swift in Sources */, 67DB776D210871E8001CB56B /* BaseCollectionContentController.swift in Sources */, 82B4F8DB223903B800F6708C /* Block.swift in Sources */, @@ -2778,7 +2837,6 @@ 671463631EB3396E00EAB194 /* SupportProtocol.swift in Sources */, 671462871EB3396E00EAB194 /* CGContext+Initializers.swift in Sources */, 6714634F1EB3396E00EAB194 /* ReuseIdentifierProtocol.swift in Sources */, - 671462F31EB3396E00EAB194 /* UIImage+SupportExtensions.swift in Sources */, 6714626B1EB3396E00EAB194 /* NetworkService.swift in Sources */, 67E352612119B7570035BDDB /* BasePlaceholerView.swift in Sources */, 673CF43A2063E7CE00C329F6 /* GeneralDataLoadingController+DefaultImplementation.swift in Sources */, From 0d51ccb9084661290da7379d45ed2c8d5ec871c9 Mon Sep 17 00:00:00 2001 From: Boyko Mihail Date: Fri, 2 Oct 2020 15:53:47 +0300 Subject: [PATCH 08/18] Fix PR issue --- ...terfaceOrientation+ VideoOrientation.swift | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/Sources/Extensions/UIInterfaceOrientation/UIInterfaceOrientation+ VideoOrientation.swift b/Sources/Extensions/UIInterfaceOrientation/UIInterfaceOrientation+ VideoOrientation.swift index dcf9bba5..616968bf 100644 --- a/Sources/Extensions/UIInterfaceOrientation/UIInterfaceOrientation+ VideoOrientation.swift +++ b/Sources/Extensions/UIInterfaceOrientation/UIInterfaceOrientation+ VideoOrientation.swift @@ -4,17 +4,21 @@ import AVFoundation public extension UIInterfaceOrientation { var videoOrientation: AVCaptureVideoOrientation { - switch self { - case .portrait: - return .portrait - case .landscapeLeft: - return .landscapeLeft - case .landscapeRight: - return .landscapeRight - case .portraitUpsideDown: - return .portraitUpsideDown - case .unknown: - return .portrait + switch self { + case .portrait, .unknown: + return .portrait + + case .landscapeLeft: + return .landscapeLeft + + case .landscapeRight: + return .landscapeRight + + case .portraitUpsideDown: + return .portraitUpsideDown + + @unknown default: + return .portrait + } } - } } From 5297be522f4e7f21db9804851c41c4538a39ba58 Mon Sep 17 00:00:00 2001 From: Boyko Mihail Date: Fri, 2 Oct 2020 15:55:11 +0300 Subject: [PATCH 09/18] Fix indent --- .../Classes/Controllers/BaseOrientationController.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/Classes/Controllers/BaseOrientationController.swift b/Sources/Classes/Controllers/BaseOrientationController.swift index 13a85aff..3d6981d8 100644 --- a/Sources/Classes/Controllers/BaseOrientationController.swift +++ b/Sources/Classes/Controllers/BaseOrientationController.swift @@ -23,8 +23,8 @@ open class BaseOrientationController: UIViewController { return super.supportedInterfaceOrientations } } - - open override var preferredInterfaceOrientationForPresentation: UIInterfaceOrientation { - return forcedInterfaceOrientation ?? super.preferredInterfaceOrientationForPresentation - } + + open override var preferredInterfaceOrientationForPresentation: UIInterfaceOrientation { + return forcedInterfaceOrientation ?? super.preferredInterfaceOrientationForPresentation + } } From 2bd38efab001cde968894612f139006371862ee9 Mon Sep 17 00:00:00 2001 From: Boyko Mihail Date: Mon, 5 Oct 2020 10:31:48 +0300 Subject: [PATCH 10/18] cherry-pick 4c81de418f29bdc7ddc0382d8d0dc7c5f20c85c4 --- .../BaseOrientationNavigationController.swift | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Sources/Classes/Controllers/BaseOrientationNavigationController.swift b/Sources/Classes/Controllers/BaseOrientationNavigationController.swift index c24c0110..9b9280a0 100644 --- a/Sources/Classes/Controllers/BaseOrientationNavigationController.swift +++ b/Sources/Classes/Controllers/BaseOrientationNavigationController.swift @@ -1,25 +1,26 @@ -import RxSwift import UIKit open class OrientationNavigationController: UINavigationController { // MARK: - Public properties + + var presentedOrTopViewController: UIViewController? { + presentedViewController ?? topViewController + } + open override var shouldAutorotate: Bool { - return presentedViewController?.shouldAutorotate - ?? topViewController?.shouldAutorotate + presentedOrTopViewController?.shouldAutorotate ?? super.shouldAutorotate } open override var supportedInterfaceOrientations: UIInterfaceOrientationMask { - return presentedViewController?.supportedInterfaceOrientations - ?? topViewController?.supportedInterfaceOrientations + presentedOrTopViewController?.supportedInterfaceOrientations ?? super.supportedInterfaceOrientations } open override var preferredInterfaceOrientationForPresentation: UIInterfaceOrientation { - return presentedViewController?.preferredInterfaceOrientationForPresentation - ?? topViewController?.preferredInterfaceOrientationForPresentation + presentedOrTopViewController?.preferredInterfaceOrientationForPresentation ?? super.preferredInterfaceOrientationForPresentation } } From 292d5ce16cc8c61f0e14e9fc95cd54acf562c26e Mon Sep 17 00:00:00 2001 From: Boyko Mihail Date: Mon, 5 Oct 2020 10:45:49 +0300 Subject: [PATCH 11/18] Update version to 0.9.31 --- CHANGELOG.md | 3 +++ LeadKit.podspec | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fcb40511..625c8123 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +### 0.9.31 +- **Fix**: version for Soglasie + ### 0.9.30 - **Add**: character `*` into a valid set of characters in the extension `telpromptURL` of String. diff --git a/LeadKit.podspec b/LeadKit.podspec index af2ee6ed..e136e676 100644 --- a/LeadKit.podspec +++ b/LeadKit.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "LeadKit" - s.version = "0.9.30" + s.version = "0.9.31" s.summary = "iOS framework with a bunch of tools for rapid development" s.homepage = "https://github.com/TouchInstinct/LeadKit" s.license = "Apache License, Version 2.0" From 1091d270347baa9ee1313dcf59cc652f7b26328f Mon Sep 17 00:00:00 2001 From: Boyko Mihail Date: Mon, 5 Oct 2020 10:46:54 +0300 Subject: [PATCH 12/18] Update version to 0.9.30.1 --- CHANGELOG.md | 2 +- LeadKit.podspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 625c8123..3ce0f227 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -### 0.9.31 +### 0.9.30.1 - **Fix**: version for Soglasie ### 0.9.30 diff --git a/LeadKit.podspec b/LeadKit.podspec index e136e676..6d473cb5 100644 --- a/LeadKit.podspec +++ b/LeadKit.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "LeadKit" - s.version = "0.9.31" + s.version = "0.9.30.1" s.summary = "iOS framework with a bunch of tools for rapid development" s.homepage = "https://github.com/TouchInstinct/LeadKit" s.license = "Apache License, Version 2.0" From 1e7e840e2310877e0603e8975b7a9846f74d3bf4 Mon Sep 17 00:00:00 2001 From: Boyko Mihail Date: Mon, 5 Oct 2020 11:02:43 +0300 Subject: [PATCH 13/18] Update pod spec --- LeadKit.podspec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/LeadKit.podspec b/LeadKit.podspec index 6d473cb5..5481d4c2 100644 --- a/LeadKit.podspec +++ b/LeadKit.podspec @@ -39,6 +39,7 @@ Pod::Spec.new do |s| "Sources/Classes/Search/*", "Sources/Enums/Search/*", "Sources/Extensions/CABasicAnimation/*", + "Sources/Extensions/UIInterfaceOrientation/UIInterfaceOrientation+ VideoOrientation.swift", "Sources/Extensions/CGFloat/CGFloat+Pixels.swift", "Sources/Extensions/NetworkService/NetworkService+RxLoadImage.swift", "Sources/Extensions/DataLoading/GeneralDataLoading/GeneralDataLoadingController+DefaultImplementation.swift", @@ -70,6 +71,10 @@ Pod::Spec.new do |s| ] ss.tvos.exclude_files = [ "Sources/Classes/Controllers/BaseTableContentController.swift", + "Sources/Classes/Controllers/BaseOrientationController.swift", + "Sources/Classes/Controllers/BaseOrientationNavigationController.swift", + "Sources/Extensions/UIKit/UIDevice/UIDevice+ScreenOrientation.swift", + "Sources/Extensions/UIInterfaceOrientation/UIInterfaceOrientation+ VideoOrientation.swift", "Sources/Classes/Views/SeparatorRowBox/*", "Sources/Classes/Views/SeparatorCell/*", "Sources/Classes/Views/EmptyCell/*", From 131ed5b493a72a9a29bd11958703170456443bb1 Mon Sep 17 00:00:00 2001 From: Boyko Mihail Date: Mon, 5 Oct 2020 11:14:24 +0300 Subject: [PATCH 14/18] Update podspec --- LeadKit.podspec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/LeadKit.podspec b/LeadKit.podspec index 5481d4c2..47e41e28 100644 --- a/LeadKit.podspec +++ b/LeadKit.podspec @@ -71,6 +71,9 @@ Pod::Spec.new do |s| ] ss.tvos.exclude_files = [ "Sources/Classes/Controllers/BaseTableContentController.swift", + "Sources/Classes/Controllers/BaseCustomViewController.swift", + "Sources/Classes/Controllers/BaseConfigurableController.swift", + "Sources/Classes/Controllers/BaseScrollContentController.swift", "Sources/Classes/Controllers/BaseOrientationController.swift", "Sources/Classes/Controllers/BaseOrientationNavigationController.swift", "Sources/Extensions/UIKit/UIDevice/UIDevice+ScreenOrientation.swift", From 198eaecf96132877889ea3471d06d4619a6e07fc Mon Sep 17 00:00:00 2001 From: Boyko Mihail Date: Mon, 5 Oct 2020 11:23:39 +0300 Subject: [PATCH 15/18] Update podspec --- LeadKit.podspec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/LeadKit.podspec b/LeadKit.podspec index 47e41e28..f1519af7 100644 --- a/LeadKit.podspec +++ b/LeadKit.podspec @@ -71,6 +71,9 @@ Pod::Spec.new do |s| ] ss.tvos.exclude_files = [ "Sources/Classes/Controllers/BaseTableContentController.swift", + "Sources/Classes/Views/TableViewWrapperView/TableViewWrapperView.swift", + "Sources/Classes/Controllers/BaseCollectionContentController.swift", + "Sources/Classes/Views/CollectionViewWrapperView/CollectionViewWrapperView.swift", "Sources/Classes/Controllers/BaseCustomViewController.swift", "Sources/Classes/Controllers/BaseConfigurableController.swift", "Sources/Classes/Controllers/BaseScrollContentController.swift", From 6e8eda4c42311c42e4af1dcf3d9708c84eb40b2e Mon Sep 17 00:00:00 2001 From: Boyko Mihail Date: Mon, 5 Oct 2020 12:41:12 +0300 Subject: [PATCH 16/18] cherry-pick 22ba1fb8f7ac3888919e2f4e2616029126ea4f12 --- .../Controllers/BaseOrientationNavigationController.swift | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Sources/Classes/Controllers/BaseOrientationNavigationController.swift b/Sources/Classes/Controllers/BaseOrientationNavigationController.swift index 9b9280a0..353af80f 100644 --- a/Sources/Classes/Controllers/BaseOrientationNavigationController.swift +++ b/Sources/Classes/Controllers/BaseOrientationNavigationController.swift @@ -3,12 +3,11 @@ import UIKit open class OrientationNavigationController: UINavigationController { // MARK: - Public properties - - var presentedOrTopViewController: UIViewController? { + + open var presentedOrTopViewController: UIViewController? { presentedViewController ?? topViewController } - open override var shouldAutorotate: Bool { presentedOrTopViewController?.shouldAutorotate ?? super.shouldAutorotate From fd1c2cc56b2cb92ff8d4192935cc63b8b674cecb Mon Sep 17 00:00:00 2001 From: Boyko Mihail Date: Mon, 5 Oct 2020 12:48:58 +0300 Subject: [PATCH 17/18] Update version --- CHANGELOG.md | 3 +++ LeadKit.podspec | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ce0f227..afe78261 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +### 0.9.30.2 +- **Fix**: version for Soglasie. open protection level + ### 0.9.30.1 - **Fix**: version for Soglasie diff --git a/LeadKit.podspec b/LeadKit.podspec index f1519af7..8da0de3e 100644 --- a/LeadKit.podspec +++ b/LeadKit.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "LeadKit" - s.version = "0.9.30.1" + s.version = "0.9.30.2" s.summary = "iOS framework with a bunch of tools for rapid development" s.homepage = "https://github.com/TouchInstinct/LeadKit" s.license = "Apache License, Version 2.0" From 0d8e80deab85f58a86d2974be961883fa18b0609 Mon Sep 17 00:00:00 2001 From: Boyko Mihail Date: Mon, 5 Oct 2020 13:43:01 +0300 Subject: [PATCH 18/18] Update tag --- CHANGELOG.md | 3 +++ LeadKit.podspec | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index afe78261..47c5e04f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +### 0.9.44 +- **Fix**: new tag + ### 0.9.30.2 - **Fix**: version for Soglasie. open protection level diff --git a/LeadKit.podspec b/LeadKit.podspec index 8da0de3e..2ce5ad50 100644 --- a/LeadKit.podspec +++ b/LeadKit.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "LeadKit" - s.version = "0.9.30.2" + s.version = "0.9.44" s.summary = "iOS framework with a bunch of tools for rapid development" s.homepage = "https://github.com/TouchInstinct/LeadKit" s.license = "Apache License, Version 2.0"