This commit is contained in:
Scott Pfeil 2023-07-21 09:21:00 -04:00
parent 2466d06698
commit 5becbbb7f1

View File

@ -7,6 +7,7 @@
// //
import Foundation import Foundation
import Combine
@objc open class MVMCoreNavigationHandler2: NSObject, UINavigationControllerDelegate { @objc open class MVMCoreNavigationHandler2: NSObject, UINavigationControllerDelegate {
public enum NavigationType { public enum NavigationType {
@ -33,6 +34,16 @@ import Foundation
let delegates: NSHashTable<MVMCorePresentationDelegateProtocol> = NSHashTable.weakObjects() let delegates: NSHashTable<MVMCorePresentationDelegateProtocol> = NSHashTable.weakObjects()
// MARK: - Publishers
/// Publishes when the navigation will begin
public let onNavigationWillBegin = PassthroughSubject<(NavigationType, [UIViewController]), Never>()
/// Publishes when a viewcontroller did show.
public let onNavigationDidFinish = PassthroughSubject<(NavigationType), Never>()
// MARK: -
// MARK: - Delegate Handling // MARK: - Delegate Handling
open func add(delegate: MVMCorePresentationDelegateProtocol) { open func add(delegate: MVMCorePresentationDelegateProtocol) {