UIKit.UIViewController: Method Members

The methods of UIKit.UIViewController are listed below. For a list of all members, see the UIViewController Members list.

See Also: Inherited members from UIKit.UIResponder

Public Methods

Add(UIView)
This is an alias for UIView.AddSubview, but uses the Add pattern as it allows C# 3.0 constructs to add subviews after creating the object.
AddChildViewController(UIViewController)
Adds a UIKit.UIViewController as a child.
ApplicationFinishedRestoringState()
Called when object decoding is complete during state restoration.
static
AttemptRotationToDeviceOrientation()
Programmatically triggers rotation of views.
BeginAppearanceTransition(bool, bool)
With UIViewController.EndAppearanceTransition, tells child UIKit.UIViewControllers that their UIKit.UIViews are about to either appear or disappear.
CanPerformUnwind(ObjCRuntime.Selector, UIViewController, Foundation.NSObject) : bool
Specifies whether this UIKit.UIViewController supports the specific unwind segue
ChildViewControllerForStatusBarHidden() : UIViewController
When overridden, returns the UIViewController that determines whether the status bar is hidden or unhidden.
ChildViewControllerForStatusBarStyle() : UIViewController
When overridden, returns the UIViewController that determines the style of the status bar.
DecodeRestorableState(Foundation.NSCoder)
With UIViewController.EncodeRestorableState, allows custom state restoration.
DidAnimateFirstHalfOfRotation(UIInterfaceOrientation)
Deprecated function called at end of first-part of two-step rotation animations.
DidMoveToParentViewController(UIViewController)
Called after this is added or removed from a parent UIKit.UIViewController.
DidReceiveMemoryWarning()
Called when the system is running low on memory.
DidRotate(UIInterfaceOrientation)
Called after the UI has rotated.
DismissModalViewController(bool)
Dismisses the modal view controller that was submitted by the receiver.
DismissMoviePlayerViewController()
Dismisses the MediaPlayer.MPMoviePlayerViewController.
DismissViewController(bool, Action)
Dismisses the presented view controller.
DismissViewControllerAsync(bool) : System.Threading.Tasks.Task
Dismisses the presented .
EncodeRestorableState(Foundation.NSCoder)
With UIViewController.DecodeRestorableState, allows custom state restoration.
EncodeTo(Foundation.NSCoder)
Encodes the state of the object on the provided encoder
EndAppearanceTransition()
With UIViewController.BeginAppearanceTransition, tells child UIKit.UIViewControllers that their child views have just appeared or disappeared.
GetEnumerator() : IEnumerator
Returns an enumerator that lists all of the child UIKit.UIViews
GetOverrideTraitCollectionForChildViewController(UIViewController) : UITraitCollection
Gets the UIKit.UITraitCollection for the specified child view controller of this controller.
GetSegueForUnwinding(UIViewController, UIViewController, string) : UIStoryboardSegue
Defines the segue to be used between two UIKit.UIViewControllers.
GetSizeForChildContentContainer(IUIContentContainer, CoreGraphics.CGSize) : CoreGraphics.CGSize
Gets the size of the content of the specified child UIKit.IUIContentContainer by using the size of the parent container.
GetSupportedInterfaceOrientations() : UIInterfaceOrientationMask
The orientations supported by this UIKit.UIViewController.
GetTargetViewControllerForAction(ObjCRuntime.Selector, Foundation.NSObject) : UIViewController
Gets the view controller for the specified action and sender.
GetViewControllerForUnwind(ObjCRuntime.Selector, UIViewController, Foundation.NSObject) : UIViewController
Used for searching child UIKit.UIViewControllers for a specific unwind segue.
LoadView()
Initializes the UIViewController.View property.
PerformSegue(string, Foundation.NSObject)
Performs the specified UIKit.UIStoryboardSegue.
PreferredContentSizeDidChangeForChildContentContainer(IUIContentContainer)
Notifies this controller that the preferred size for content for a specified child container has changed.
PreferredInterfaceOrientationForPresentation() : UIInterfaceOrientation
The orientation that best displays the content of this UIKit.UIViewController.
PreferredStatusBarStyle() : UIStatusBarStyle
The preferred UIStatusBarStyle for this UIViewController.
PrefersStatusBarHidden() : bool
Whether this UIViewController prefers the status bar to be hidden.
static
PrepareForInterstitialAds()
Prepares the view controller to display interstitial ads.
PrepareForSegue(UIStoryboardSegue, Foundation.NSObject)
Informs the application that a UIKit.UIStoryboardSegue is about to be executed.
PresentModalViewController(UIViewController, bool)
Application developers should use UIViewController.PresentViewController instead of this deprecated method.
PresentMoviePlayerViewController(MediaPlayer.MPMoviePlayerViewController)
Displays a movie controller using the standard transition.
PresentViewController(UIViewController, bool, Action)
Modally presents a view controller.
PresentViewControllerAsync(UIViewController, bool) : System.Threading.Tasks.Task
Presents a . On iPhone and iTouch, presentation is always full screen, on iPad, the style is specified with .
RemoveFromParentViewController()
Removes this UIKit.UIViewController from its UIViewController.ParentViewControllerUIKit.UIViewController.
SetEditing(bool, bool)
Turns editing mode on or off.
SetNeedsStatusBarAppearanceUpdate()
Notifies the system that the attributes of the status bar have been changed.
SetOverrideTraitCollection(UITraitCollection, UIViewController)
Sets the UIKit.UITraitCollection object for the specified child view controller of this controller.
SetToolbarItems(UIBarButtonItem[], bool)
Adds UIKit.UIBarButtonItems to the UIKit.UIToolbar
ShouldAutorotate() : bool
Turns auto-rotation on or off.
ShouldAutorotateToInterfaceOrientation(UIInterfaceOrientation) : bool
true if the UIKit.UIViewController supports rotation to the specified UIKit.UIInterfaceOrientation.
ShouldPerformSegue(string, Foundation.NSObject) : bool
Whether the segue should be performed.
ShowDetailViewController(UIViewController, Foundation.NSObject)
Shows this view controller in a detail context.
ShowViewController(UIViewController, Foundation.NSObject)
Shows this view controller.
SystemLayoutFittingSizeDidChangeForChildContentContainer(IUIContentContainer)
Notifies this container that auto layout resized a specified child container.
TraitCollectionDidChange(UITraitCollection)
Method invoked when the trait collection for the view controller changed.
Transition(UIViewController, UIViewController, double, UIViewAnimationOptions, Action, UICompletionHandler)
Used for transitioning between two view controller'€™s child view controllers.
TransitionAsync(UIViewController, UIViewController, double, UIViewAnimationOptions, Action) : System.Threading.Tasks.Task<bool>
Documentation for this section has not yet been entered.
UpdateViewConstraints()
Called when the UIKit.UIViewController needs to recalculate its layout constraints.
ViewDidAppear(bool)
Called after the UIViewController.View is added to the view hierarchy.
ViewDidDisappear(bool)

This method is called after the UIKit.UIViewthat is this UIKit.UIViewController’s UIViewController.View property is removed from the display UIKit.UIView hierarchy.

Application developers who override this method must call base.ViewDidDisappear() in their overridden method.

ViewDidLayoutSubviews()
Called after the UIViewController.View has laid out its subviews.
ViewDidLoad()
Called after the controller’s UIViewController.View is loaded into memory.
ViewDidUnload()
In iOS 6 and later, this method is never called. In prior versions it was called when the controller’s view was released from memory.
ViewWillAppear(bool)
Called prior to the UIViewController.View being added to the view hierarchy.
ViewWillDisappear(bool)

This method is called prior to the removal of the UIKit.UIViewthat is this UIKit.UIViewController’s UIViewController.View from the display UIKit.UIView hierarchy.

Application developers may override this method to configure animations, resign first responder status (see UIResponder.ResignFirstResponder), or perform other tasks.

Application developers who override this method must call base.ViewWillDisappear() in their overridden method.

ViewWillLayoutSubviews()
Called before the UIViewController.View lays out its subviews.
ViewWillTransitionToSize(IUIViewControllerTransitionCoordinator, CoreGraphics.CGSize)
Notifies this that the size of it's view will change to the specified value, as coordinated by coordinator.
ViewWillUnload()
In iOS 6 and later, this method is never called. In prior versions it was called prior to the controller’s view was released from memory.
WillAnimateFirstHalfOfRotation(UIInterfaceOrientation, double)
Deprecated method sent during the first half of a rotation. Application developers should instead use UIViewController.WillAnimateRotation.
WillAnimateRotation(UIInterfaceOrientation, double)
Called prior to a one-step interface rotation.
WillAnimateSecondHalfOfRotation(UIInterfaceOrientation, double)
Deprecated method sent during the second half of a rotation. Application developers should instead use UIViewController.WillAnimateRotation.
WillMoveToParentViewController(UIViewController)
Called prior to adding or removing this from a container UIKit.UIViewController.
WillRotate(UIInterfaceOrientation, double)
Called prior to a user interface rotation.
WillTransitionToTraitCollection(UITraitCollection, IUIViewControllerTransitionCoordinator)
Notifies this that its trait collection will change to traitCollection, as coordinated by coordinator.

Protected Methods

override
Dispose(bool)
Releases the resources used by the UIViewController object.