Skip to content

Commit

Permalink
Make FlowCoordinator functions open
Browse files Browse the repository at this point in the history
  • Loading branch information
janmisar authored Aug 31, 2018
1 parent 72efb4a commit fe46642
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ACKategories/FlowCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,32 +36,32 @@ open class FlowCoordinator: NSObject, UINavigationControllerDelegate {

/// Just start and return rootViewController. Object calling this method will connect returned view controller to the flow.
@discardableResult
public func start() -> UIViewController {
open func start() -> UIViewController {
checkRootViewController()

return UIViewController()
}

/// Start in window. Window's root VC is supposed to be set.
public func start(in window: UIWindow) {
open func start(in window: UIWindow) {
checkRootViewController()
}

/// Start within existing navigation controller.
public func start(with navigationController: UINavigationController) {
open func start(with navigationController: UINavigationController) {
self.navigationController = navigationController
navigationController.delegate = self

checkRootViewController()
}

/// Start by presenting from given VC. This method must be overriden by subclass.
public func start(from viewController: UIViewController) {
open func start(from viewController: UIViewController) {
checkRootViewController()
}

/// Clean up. Must be called when FC finished the flow to avoid memory leaks and unexpcted behavior.
public func stop(animated: Bool = false) {
open func stop(animated: Bool = false) {

// stop all children
childCoordinators.forEach { $0.stop(animated: animated) }
Expand Down

0 comments on commit fe46642

Please sign in to comment.