diff --git a/Sources/XCoordinator/AnyCoordinator.swift b/Sources/XCoordinator/AnyCoordinator.swift index 905ac917..53707cee 100755 --- a/Sources/XCoordinator/AnyCoordinator.swift +++ b/Sources/XCoordinator/AnyCoordinator.swift @@ -34,6 +34,7 @@ public class AnyCoordinator TransitionType private let _viewController: () -> UIViewController? private let _rootViewController: () -> TransitionType.RootViewController + private let _children: () -> [Presentable] private let _presented: (Presentable?) -> Void private let _setRoot: (UIWindow) -> Void private let _addChild: (Presentable) -> Void @@ -55,6 +56,7 @@ public class AnyCoordinator private var removeParentChildren: () -> Void = {} private var gestureRecognizerTargets = [GestureRecognizerTarget]() - /// - /// The child coordinators that are currently in the view hierarchy. - /// When performing a transition, children are automatically added and removed from this array - /// depending on whether they are in the view hierarchy. - /// public private(set) var children = [Presentable]() // MARK: Computed properties diff --git a/Sources/XCoordinator/Coordinator.swift b/Sources/XCoordinator/Coordinator.swift index 59acc646..1ce76425 100755 --- a/Sources/XCoordinator/Coordinator.swift +++ b/Sources/XCoordinator/Coordinator.swift @@ -22,6 +22,13 @@ public typealias ContextPresentationHandler = (TransitionContext) -> Void /// public protocol Coordinator: Router, TransitionPerformer { + /// + /// The child coordinators that are currently in the view hierarchy. + /// When performing a transition, children are automatically added and removed from this array + /// depending on whether they are in the view hierarchy. + /// + var children: [Presentable] { get } + /// /// This method prepares transitions for routes. /// It especially decides, which transitions are performed for the triggered routes.