FlineDev / Imperio

Keep the screen flow and data handling logic out of your view controllers – let them handle view-stuff only.
MIT License
58 stars 12 forks source link

Rename start(from viewController: UIViewController) #5

Closed fredpi closed 6 years ago

fredpi commented 6 years ago

Issue

When using start(from viewController: UIViewController), in order to present a view controller, one has to e. g. write code like viewController.present(viewControllerToPresent, animated: true) or viewController.navigationController?.push(viewControllerToPresent, animated: true).

While this works seamlessly, the naming of the presenting view controller is a bit misleading. In larger function bodies, it's not instantly clear what ViewController viewController is.

Suggestion

By renaming start(from viewController: UIViewController), to e. g.start(from presentingViewController: UIViewController), one could easily solve this issue. Describing the semantics more precisely should fit the point of the whole method.

Jeehut commented 6 years ago

Makes sense. Would you be up for a PR?