UIViewController

  • Presents a UIViewController (B) modally from self, even if self is already presenting another ViewController (A). In that case, A will be asked to present B.

    Created to overcome the limitations of the UIKit: UIViewController.present(:animated:completion).

    Declaration

    Swift

    func recursivePresent(_ viewController: UIViewController, animated: Bool = false, completion: (() -> Void)?)
  • Dismiss self but keeps all the presented ViewControllers in the hierarchy.

    Created to overcome the limitations of the UIKit method: UIViewController.dismiss(animated:completion).

    Declaration

    Swift

    func softDismiss(animated: Bool = false, completion: (() -> Void)?)
  • Used in the implementation of the UIKit method: UIViewController.softDismiss(animated:completion:).

    Declaration

    Swift

    var toBeDismissed: Bool