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.
Issue
When using
start(from viewController: UIViewController)
, in order to present a view controller, one has to e. g. write code likeviewController.present(viewControllerToPresent, animated: true)
orviewController.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.