UIViewController
Undocumented
-
Convenience method for handling nested
UIViewControllers in aUISplitViewControlleror other situation where a navigation controller may be passed, not the specificUIViewControllersubclass that contains the ‘content’.Declaration
Swift
public func navigationRootViewController() -> UIViewController?Return Value
The root
UIViewControllerifselfis aUINavigationControllerorselfif not. -
Convenience method for handling nested
UIViewControllers in aUISplitViewControlleror other situation where a navigation controller may be passed, not the specificUIViewControllersubclass that contains the ‘content’.Declaration
Swift
public func navigationTopViewController() -> UIViewController?Return Value
The top most
UIViewControllerin the stack ifselfis aUINavigationControllerorselfif not. -
Convenience method for presenting a
UIViewControllerconfiguring thepopoverPresentationControllerto use a givenUIVieworUIBarButtonItem. This is useful for action sheets andUIActivityViewControllers.- paramter inViewController: The
UIViewControllerthat will present theUIAlertController. Ifnil,selfis used to present theUIAlertController. The default value isnil.
-seealso:
openInSafari(_:)Declaration
Swift
public func presentViewController(vc:UIViewController, fromSourceItem item: UIPopoverSourceType, inViewController:UIViewController? = nil, animated:Bool = true, completion: (() -> ())? = nil)Parameters
vcThe
UIViewControllerto present.itemEither the
UIVieworUIBarButtonItemthat theActionSheetstyleUIAlertControllerwill be presented from on Regular-Regular size class devices.animatedPassed to
presentViewController(_:animated:completion:)completionPassed to
presentViewController(_:animated:completion:) - paramter inViewController: The
View on GitHub
UIViewController Extension Reference