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 } }