UIViewController
Undocumented
-
Convenience method for handling nested
UIViewController
s in aUISplitViewController
or other situation where a navigation controller may be passed, not the specificUIViewController
subclass that contains the ‘content’.Declaration
Swift
public func navigationRootViewController() -> UIViewController?
Return Value
The root
UIViewController
ifself
is aUINavigationController
orself
if not. -
Convenience method for handling nested
UIViewController
s in aUISplitViewController
or other situation where a navigation controller may be passed, not the specificUIViewController
subclass that contains the ‘content’.Declaration
Swift
public func navigationTopViewController() -> UIViewController?
Return Value
The top most
UIViewController
in the stack ifself
is aUINavigationController
orself
if not. -
Convenience method for presenting a
UIViewController
configuring thepopoverPresentationController
to use a givenUIView
orUIBarButtonItem
. This is useful for action sheets andUIActivityViewController
s.- paramter inViewController: The
UIViewController
that will present theUIAlertController
. Ifnil
,self
is 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
vc
The
UIViewController
to present.item
Either the
UIView
orUIBarButtonItem
that theActionSheet
styleUIAlertController
will be presented from on Regular-Regular size class devices.animated
Passed to
presentViewController(_:animated:completion:)
completion
Passed to
presentViewController(_:animated:completion:)
- paramter inViewController: The