diff --git a/NavigationHelperUIKit/ViewController.swift b/NavigationHelperUIKit/ViewController.swift index b4d5a30..093dc9f 100644 --- a/NavigationHelperUIKit/ViewController.swift +++ b/NavigationHelperUIKit/ViewController.swift @@ -14,24 +14,6 @@ extension Presentable { } } -extension ModalPresenter { - public var asViewController: UIViewController? { - return self as? UIViewController - } -} - -extension AnyPresenter { - public var asViewController: UIViewController? { - return modalPresenter.asViewController - } -} - -extension SerialHandler where Message.Context: ModalPresenter { - public var rootViewController: UIViewController? { - return context.asViewController - } -} - extension UIViewController: ModalPresenter { public func show(animated: Bool) -> Reader> { return Reader>.unfold { presentable in diff --git a/Sources/NavigationHelper/Protocols.swift b/Sources/NavigationHelper/Protocols.swift index 0a680b3..77a8fde 100644 --- a/Sources/NavigationHelper/Protocols.swift +++ b/Sources/NavigationHelper/Protocols.swift @@ -40,8 +40,8 @@ public protocol StructuredPresenter { public typealias Presenter = ModalPresenter & StructuredPresenter public final class AnyPresenter: Presenter { - public let modalPresenter: ModalPresenter - public let structuredPresenter: StructuredPresenter + private let modalPresenter: ModalPresenter + private let structuredPresenter: StructuredPresenter public init(modalPresenter: ModalPresenter, structuredPresenter: StructuredPresenter) { self.modalPresenter = modalPresenter