ModalPresenter
public final class ModalPresenter<ViewController> : ModalPresenterProtocol where ViewController : UIViewController
A wrapper class to encapsulate a implementation of UIViewController#present(_: UIViewController, animated: Bool).
You can replace the class with the stub or spy for testing.
See also
ModalPresenterUsages.
-
Returns newly initialized ModalPresenter with the UIViewController. Some UIViewControllers will be present on the specified UIViewController of the function.
Declaration
Swift
public init(wherePresentOn groundViewController: WeakOrUnowned<ViewController>) -
Presents a view controller modally. This method behave like
UIViewController#present(UIViewController, animated: Bool)Declaration
Swift
public func present(viewController: UIViewController, animated: Bool) -
Presents a view controller modally. This method behave like
UIViewController#present(UIViewController, animated: Bool, completion: (() -> Void)?)Declaration
Swift
public func present(viewController: UIViewController, animated: Bool, completion: (() -> Void)?)
View on GitHub
ModalPresenter Class Reference