UIViewController UIViewController Class

Definition

Base class for classes that manage the interaction between Model classes and View classes

[Foundation.Register("UIViewController", true)]
public class UIViewController : UIKit.UIResponder, Foundation.INSCoding, Foundation.INSExtensionRequestHandling, IDisposable, System.Collections.IEnumerable, UIKit.IUIAppearanceContainer, UIKit.IUIContentContainer, UIKit.IUIFocusEnvironment, UIKit.IUITraitEnvironment
type UIViewController = class
    inherit UIResponder
    interface IEnumerable
    interface INSCoding
    interface INativeObject
    interface IDisposable
    interface INSExtensionRequestHandling
    interface IUIAppearanceContainer
    interface IUIContentContainer
    interface IUIFocusEnvironment
    interface IUITraitEnvironment
Inheritance
UIViewControllerUIViewController
Derived
Attributes
Implements

Remarks

The UIViewController class is the base class of the View Controller hierarchy. View Controllers manage UIViews and other UIViewControllers. An iOS application has a single window, but many screens, each of which may contain several UIViews. Managing those screens is complex and requires responding to both user input and changes in the model (problem domain). This management and coordination is the job of the UIViewController.

A UIViewController has 3 major responsibilities:

  • Layout out its component UIViews. This includes sizing, responding to orientation changes, etc.
  • Restructure the display in response to input events or the state of Model classes
  • Translate user input into platform-neutral Model service requests

iOS provides a number of standard view controllers such as UINavigationController, UITabBarController, and UIPageViewController. In general, the application developer should prefer to use standard view controllers to create the overall display structure. Using standard view controllers provides consistent, standard behavior and makes it easier for the app to conform to the iOS Human Interface Guidelines.

Additionally, the application developer generally needs to implement one or more “Content View Controllers”. These are often derived directly from UIViewController or UITableViewController. Content View Controllers are where the application developer writes the custom code to satisfy the UIViewControllers responsibilities described previously. In applications that take advantage of Xamarin Studio’s Code Behind facilities for Apple’s Interface Builder, much of this custom code will be automatically generated by Xamarin Studio. Applications written using MonoTouch.Dialog do not generally need a custom-written Content View Controller, but may use one for architectural consistency.

A single View Controller may have many views and subcontrollers, but typically a single View Controller will have a single root view and be primarily concerned with controlling that one view or it will be primarily concerned with maintaining a collection of subcontrollers. In the following example, taken from the “Hello World iPhone” sample, a Content View Controller of type HelloWorld_iPhoneViewController is instantiated and set to be the RootViewController for the application’s window:


public override bool FinishedLaunching (UIApplication app, NSDictionary options)
{
       // create a new window instance based on the screen size
       window = new UIWindow (UIScreen.MainScreen.Bounds);

       viewController = new HelloWorld_iPhoneViewController ("HelloWorld_iPhoneViewController", null);
       window.RootViewController = viewController;
       window.MakeKeyAndVisible ();

       return true;
}

By contrast, the following code taken from the "iOS Standard Controls" sample demonstrates how a UITableViewController uses an application-defined NavItemGroup to manage a series of other UIViewControllers. In this code, the second parameter to the NavItem constructor is the specific UIViewController subtype desired when that item is selected in the table:


navGroup = new NavItemGroup ("Toolbars");
navItems.Add (navGroup);
navGroup.Items.Add (new NavItem ("Toolbar 1", "", typeof(Toolbar.Toolbar1_iPhone)));
navGroup.Items.Add (new NavItem ("Programmatic Toolbar", "", typeof(Toolbar.ProgrammaticToolbar_Controller)));
navGroup.Items.Add (new NavItem ("Toolbar Items", "", typeof(Toolbar.ToolbarItems)));

// create a table source from our nav items
tableSource = new NavItemTableSource (this.NavigationController, navItems);

// set the source on the table to our data source
base.TableView.Source = tableSource;

UIViewController and the MVC Architecture

The following illustration shows the classic relationship between Model, View, and Controller classes. The arrows indicate dependencies: the View depends on the Model class to provide data, the Controller depends on the Model class for information about what to display and depends on the View class to do the drawing. This diagram is idealized: there would be several classes in the Model, several Views, UIView can actually use NextResponder to determine their UIViewController, etc.

  • The Model class has no knowledge of the associated View and Controller classes. This allows the Model to evolve independently and greatly improves maintainability and portability
  • Event handlers are used between the areas of concern. This allows for strongly-typed T:System.EventArgs that only contain the data relating to that event. This improves maintainability by limiting the client object’s access to the event-provider’s scope.
  • The Controller reacts to events both from the View and from the Model. A UIViewController might, for instance, handle a TouchUpInside input event by requesting the Model to convert between Celsius and Fahrenheit temperature units. Conversely it might respond to a Model “too hot” event by changing the display (making visible a warning icon or somesuch). The View updates its display in reaction to new data provided by Model events. View classes should be as passive as possible. One of the most common mistakes in non-maintainable software is a View class that acts as a Controller or that "reaches into" the Model for data rather than accepting values passed in as event arguments.

UIViewController, Interface Builder, Storyboards, and Nib files

XCode, Apple’s IDE, contains Interface Builder (“IB”), a tool that allows user interfaces to be created interactively and saved as “Nib” files (these are saved in XML format with the “.xib” extension). Xamarin Studio generates Code Behind classes for nib files and generally these will be subclasses of UIViewController. Starting with iOS 5, application developers can use “Storyboards” to visually specify navigation amongst individual UIViewControllers. For more on Storyboards, see Introduction to Storyboards.

Universal applications

Xamarin Studio fully supports universal applications that use a single UIViewController to control multiple UIViews customized for the iPad or the iPhone. As long as the UIViews used by the two devices share the same elements, they can share the same Outlets and Actions, as described in the "iPad + Universal (iPhone + iPad) Apps" guide.

It is not necessary for the iPhone and iPad versions to use the same UI elements, however. The application developer may wish to take advantage of the increased screen real-estate and larger set of controls available on the iPad. In such cases, the application developer should create separate UIViewControllers and load them appropriatel using code similar to the following, again taken from the “iPad + Universal (iPhone + iPad) Apps“ guide. The choice of the UIViewController to be loaded is determined at runtime based on a call to P:UIKit.UIDevice.CurrentDevice.UserInterfaceIdiom.


if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Phone) {
    homeScreen = new Screens.HomeScreen_iPhone();
} else {
    homeScreen = new Screens.HomeScreen_iPad();
}
window.RootViewController = homeScreen;

State Restoration

If you want to provide state restoration in your class, you need to manually add a method with the following signature to your class:


[Adopts ("UIViewControllerRestoration")]
class MyUIViewController : UIViewController {

 [Export ("viewControllerWithRestorationIdentifierPath:")]
 static UIViewController FromIdentifierPath (string [] identifierComponents, NSCoder coder)
 {
    var sb = (UIStoryboard) coder.DecodeObject (UIStateRestoration.ViewControllerStoryboardKey);
    if (sb != null){
       var vc = (MyUIViewController) sb.InstantiateViewController ("MyViewController");
       vc.RestorationIdentifier = identifierComponents [identifierComponents.Length-1];
       vc.RestorationClass = Class.GetHandle (typeof (MyViewController));
    }
 }
}

UIViewController Subclasses

ClassUse-caseExample Image
UIActivityViewController Choose from a set of possible activities
UIPageViewController Presents content view controllers as a series of pages
UINavigationController Presents content view controllers one at a time, with a header and optional toolbar
UIImagePickerController A standard UINavigationController for selecting and taking photographs.
UIVideoEditorController A standard UINavigationController for reviewing and editing video and audio files.
UITabBarController Top-level controller that presents view controllers one at a time, selected by a toolbar along the bottom of the screen.
UIReferenceLibraryViewController A standard view controller that presents a term and it's dictionary definition.
UISplitViewController An iPad-only view controller that presents side-by-side view controllers.
UICollectionViewController Efficiently displays a large number of cells, arranged in a flexible manner.
UITableViewController Efficiently displays a large number of cells, arranged vertically.

Adaptive Layout and Rotation

Starting with iOS 8 a series of idioms were introduced into iOS 8 to assist developers in creating applications and UIViewControllers that would work with different form factors, like both iPhone and iPad.

This replaces the pre-iOS8 design that focused on supporting two different form factors (iPhone or iPad) in a particular orientation as well as supporting the transitions from one interface orientation to the other.

New applications should take a number of variables into consideration when laying out the elements on their UI. These include the available size in the canvas, UserInterfaceIdiom (iPad or iPhone), the display scale, and both the vertical and horizontal size classes. The first one is the size of your main view, while the rest are stored in the TraitCollection.

Rotation is now considered a class size change. For example an iPhone held in portrait mode has a regular height and a compact width. When you switch it to landscape, it becomes a compact height and a regular width.

Applications can override TraitCollectionDidChange(UITraitCollection) to react to changes to any of the user interface traits. This method will be invoked during rotations or changes to the user interface that affect the size class of the application.

The ViewWillTransitionToSize(CGSize, IUIViewControllerTransitionCoordinator) method is invoked when rotation takes place.

MVC, MVP, and MVVM

.NET developers will be familiar with Microsoft-promoted architectures that serve the same goal as MVC. Both Model-View-Presenter (MVP) and Model-View-ViewModel (MVVM) strive to maintain the separation between Model classes and display classes. Developers familiar with MVP will be used to Model data flowing through a coordinating Presenter object towards the View rather than MVC’s model in which Views directly subscribe to Model events. It is possible to do an MVP architecture in iOS by increasing the responsibilities of a UIViewController. The defining characteristic of MVVM is the use of databinding to ensure that View objects are reactive. iOS controls do not support databinding so MVVM is not possible. MVVM developers will be used to more of a "firewall" between View and Model objects than is available in MVC. MVVM developers should remind themselves to ensure their View objects are as reactive as possible and are not reaching in to the Model for data or taking over Controller responsibilities.

UIViewController and MonoTouch.Dialog

MonoTouch.Dialog (“MT.D”) allows complex UIs to be rapidly built using declarative statements. As opposed to applications built using Apple’s Interface Builder, most MT.D applications use the predefined DialogViewController and do not create their own subclass of UIViewController. For more information, refer to the N:MonoTouch.Dialog namespace documentation and the article Introduction to MonoTouch.Dialog.

Constructors

UIViewController() UIViewController()

Default constructor that initializes a new instance of this class with no parameters.

UIViewController(IntPtr) UIViewController(IntPtr)

A constructor used when creating managed representations of unmanaged objects; Called by the runtime.

UIViewController(NSCoder) UIViewController(NSCoder)

A constructor that initializes the object from the data stored in the unarchiver object.

UIViewController(NSObjectFlag) UIViewController(NSObjectFlag)

Constructor to call on derived classes to skip initialization and merely allocate the object.

UIViewController(String, NSBundle) UIViewController(String, NSBundle)

A constructor used when creating a view controller using the information that is stored in the nib file.

Properties

AccessibilityAssistiveTechnologyFocusedIdentifiers AccessibilityAssistiveTechnologyFocusedIdentifiers Inherited from UIResponder
AccessibilityCustomActions AccessibilityCustomActions

Allows methods to be added to AccessibilityCustomActions as accessibility-supporting supplementary actions.

(Inherited from UIResponder)
AccessibilityDragSourceDescriptors AccessibilityDragSourceDescriptors Inherited from UIResponder
AccessibilityDropPointDescriptors AccessibilityDropPointDescriptors Inherited from UIResponder
AdditionalSafeAreaInsets AdditionalSafeAreaInsets

Gets or sets additional safe area insets to account for app-specific tool bars and other app-specific UI.

AutomaticallyAdjustsScrollViewInsets AutomaticallyAdjustsScrollViewInsets

Developers should not use this deprecated property. Developers should use 'UIScrollView.ContentInsetAdjustmentBehavior' instead.

AutomaticallyForwardAppearanceAndRotationMethodsToChildViewControllers AutomaticallyForwardAppearanceAndRotationMethodsToChildViewControllers

Determines whether the containment events are automatically propagaged to nested view controllers.

BottomLayoutGuide BottomLayoutGuide

Developers should not use this deprecated property. Instead, they should use SafeAreaLayoutGuide.

CanBecomeFirstResponder CanBecomeFirstResponder

Determines whether this UIREsponder is willing to become the first responder.

(Inherited from UIResponder)
CanResignFirstResponder CanResignFirstResponder

Determines whether this UIResponder is willing to give up its first responder status.

(Inherited from UIResponder)
ChildViewControllerForHomeIndicatorAutoHidden ChildViewControllerForHomeIndicatorAutoHidden

Gets a child view controller for determining whether to display an indicator for returning to the Home screen.

ChildViewControllerForScreenEdgesDeferringSystemGestures ChildViewControllerForScreenEdgesDeferringSystemGestures

Gets the child view controller that has precedence when processing screen edge gestures, if present.

ChildViewControllers ChildViewControllers

An array of UIViewControllers that are managed by this UIViewController.

Class Class Inherited from NSObject
ClassHandle ClassHandle

The handle for this class.

ContentSizeForViewInPopover ContentSizeForViewInPopover

Default content size for popovers.

DebugDescription DebugDescription

A developer-meaningful description of this object.

(Inherited from NSObject)
DefinesPresentationContext DefinesPresentationContext

Specifies whether this UIViewController’s View is shown when presenting another UIViewController.

Description Description

Description of the object, the Objective-C version of ToString.

(Inherited from NSObject)
DisablesAutomaticKeyboardDismissal DisablesAutomaticKeyboardDismissal

If true, input view will remain on-screen even when non-input control is tapped.

EdgesForExtendedLayout EdgesForExtendedLayout

Specifies how the ParentViewController should extend the layout of this UIViewController.

EditButtonItem EditButtonItem

A UIBarButtonItem that toggles between statees "Edit" and "Done."

Editing Editing

true if the UIViewController allows the application user to edit the UIView contents.

ExtendedLayoutIncludesOpaqueBars ExtendedLayoutIncludesOpaqueBars

Whether the extended layout includes opaque bars.

ExtensionContext ExtensionContext

Gets the NSExtensionContext for this view controller.

FocusItemContainer FocusItemContainer

Gets the container for the focus envirnoment's children.

Handle Handle

Handle (pointer) to the unmanaged object representation.

(Inherited from NSObject)
HidesBottomBarWhenPushed HidesBottomBarWhenPushed

Specifies whether the toolbar should be visible when this UIViewController is pushed onto a UINavigationController.

HierarchyInconsistencyException HierarchyInconsistencyException

Constant used to identify broken UIViewController hierarchies.

InputAccessoryView InputAccessoryView

Custom view that can be attached when the object becomes the first responder.

(Inherited from UIResponder)
InputAccessoryViewController InputAccessoryViewController

Gets the custom accessory UIInputViewController to display when this UIResponder becomes the first responder.

(Inherited from UIResponder)
InputAssistantItem InputAssistantItem

Gets the assistant that will be used to configure the shortcut bar.

(Inherited from UIResponder)
InputView InputView

Custom view to display when the object becomes the first responder. Read-only.

(Inherited from UIResponder)
InputViewController InputViewController

Gets the custom UIInputViewController to display when this UIResponder becomes the first responder.

(Inherited from UIResponder)
InterfaceOrientation InterfaceOrientation

The current orientation of the interface.

IsBeingDismissed IsBeingDismissed

true if the current UIViewController is in the process of being dismissed.

IsBeingPresented IsBeingPresented

true if the current UIViewController is in the process of being presented.

IsDirectBinding IsDirectBinding Inherited from NSObject
IsFirstResponder IsFirstResponder

Returns whether this UIResponder is the First Responder.

(Inherited from UIResponder)
IsMovingFromParentViewController IsMovingFromParentViewController

true if the current UIViewController is in the process of being removed from its parent UIViewController.

IsMovingToParentViewController IsMovingToParentViewController

true if the current UIViewController is in the process of being added to a parent UIViewController.

IsProxy IsProxy Inherited from NSObject
IsViewLoaded IsViewLoaded

A Boolean indicating whether the View is loaded into memory.

KeyCommands KeyCommands

The key commands that should trigger action on this UIResponder. Read-only.

(Inherited from UIResponder)
ModalInPopover ModalInPopover

true if this UIViewController should be presented modally by a UIPopoverController.

ModalPresentationCapturesStatusBarAppearance ModalPresentationCapturesStatusBarAppearance

Whether the UIViewController, when presented modally but non-fullscreen, takes over control of the status bar.

ModalPresentationStyle ModalPresentationStyle

The UIModalPresentationStyle to be used when presenting UIViewControllers.

ModalTransitionStyle ModalTransitionStyle

The UIModalTransitionStyle to be used by PresentViewController(UIViewController, Boolean, Action).

ModalViewController ModalViewController

Controller for the active presented view.

NavigationController NavigationController

The nearest ancestor UINavigationController

NavigationItem NavigationItem

A UINavigationItem that represents this UIViewController in its parent’s UINavigationController’s NavigationBar.

NextResponder NextResponder

The next responder on the response chain

(Inherited from UIResponder)
NibBundle NibBundle

The NSBundle from which this UIViewController was instantiated.

NibName NibName

The name of the nib file from which this UIViewController was instantiated, or null.

ParentFocusEnvironment ParentFocusEnvironment

Gets the focus environment that contains the current focus environment.

ParentViewController ParentViewController

The UIViewController that contains this UIViewController.

PasteConfiguration PasteConfiguration

The UIPasteConfiguration supported by this object.

(Inherited from UIResponder)
PopoverPresentationController PopoverPresentationController

Gets the nearest ancestor in the view hierarchy that is a UIPopoverPresentationController or null if there is none.

PreferredContentSize PreferredContentSize

Gets the preferred size for the content of the container.

PreferredFocusedView PreferredFocusedView

If not null, indicates the child UIView that should receive focus by default.

PreferredFocusEnvironments PreferredFocusEnvironments

An array of IUIFocusEnvironments that are recursively searched by the system to find the default focused view.

PreferredScreenEdgesDeferringSystemGestures PreferredScreenEdgesDeferringSystemGestures

Gets the screen edges whose gestures take precedence over system gestures.

PreferredStatusBarUpdateAnimation PreferredStatusBarUpdateAnimation

The preferred animation style for hiding and showing the status bar.

PrefersHomeIndicatorAutoHidden PrefersHomeIndicatorAutoHidden

Gets a Boolean value that tells if it is preferred that the Home indicator be hidden.

PresentationController PresentationController

Gets the nearest ancestor in the view hierarchy that is a UIPresentationController or null if there is none.

PresentedViewController PresentedViewController

The UIViewController that is being presented by this UIViewController or one of this’s ancestor UIViewControllers.

PresentingViewController PresentingViewController

The UIViewController that is presenting this UIViewController.

PreviewActionItems PreviewActionItems

Gets the array of IUIPreviewActionItem that are displayed when the user swipes upwards in 3D Touch Preview.

ProvidesPresentationContextTransitionStyle ProvidesPresentationContextTransitionStyle

true if this UIViewController overrides the transition style of the UIViewController that it presents.

RestorationClass RestorationClass

The class responsible for restoring application state.

RestorationIdentifier RestorationIdentifier

Specifies the instance of the UIViewController for restoration.

RestoresFocusAfterTransition RestoresFocusAfterTransition

Gets or sets whether this UIViewController restores focus after being transitioned to.

RetainCount RetainCount

Returns the current Objective-C retain count for the object.

(Inherited from NSObject)
RotatingFooterView RotatingFooterView

The footer view that needs to be transitioned during an interface rotation

RotatingHeaderView RotatingHeaderView

The header view that needs to be transitioned during an interface rotation.

SearchDisplayController SearchDisplayController

The UISearchDisplayController, if any, associated with this UIViewController.

Self Self Inherited from NSObject
ShouldAutomaticallyForwardAppearanceMethods ShouldAutomaticallyForwardAppearanceMethods

Whether appearance methods should be forwarded to child UIViewControllers.

ShouldAutomaticallyForwardRotationMethods ShouldAutomaticallyForwardRotationMethods

Whether rotation methods should be forwarded to child UIViewControllers.

ShowDetailTargetDidChangeNotification ShowDetailTargetDidChangeNotification

Notification constant for ShowDetailTargetDidChange

SplitViewController SplitViewController

The nearest ancestor UISplitViewController or null.

Storyboard Storyboard

The UIStoryboard from which this UIViewController was created, or null.

Superclass Superclass Inherited from NSObject
SuperHandle SuperHandle

Handle used to represent the methods in the base class for this NSObject.

(Inherited from NSObject)
SystemMinimumLayoutMargins SystemMinimumLayoutMargins

Gets the root view's minimum layout margins.

TabBarController TabBarController

The nearest ancestore UITabBarController or null.

TabBarItem TabBarItem

A UITabBarItem that represents this UIViewController in its parent’s UITabBarController’s TabBar.

TextInputContextIdentifier TextInputContextIdentifier

An identifier indicating that this UIResponder should preserve its text input mode information. Read-only.

(Inherited from UIResponder)
TextInputMode TextInputMode

The text input mode for this UIResponder. Read-only.

(Inherited from UIResponder)
Title Title

A human-meaningful identifier of this UIViewController.

ToolbarItems ToolbarItems

The array of UIBarButtonItems on a UINavigationController’s Toolbar

TopLayoutGuide TopLayoutGuide

Developers should not use this deprecated property. Instead, they should use SafeAreaLayoutGuide.

TraitCollection TraitCollection

Characteristics of the display, such as it's idiom, scale, and size class.

TransitioningDelegate TransitioningDelegate

A delegate object that is responsible for producing IUIViewControllerAnimatedTransitionings for custom presentation.

UndoManager UndoManager

The nearest shared NSUndoManager in the responder chain. Read-only.

(Inherited from UIResponder)
UserActivity UserActivity

Action that encapsulates a user activity that is supported by this responder.

(Inherited from UIResponder)
View View

The view managed by this view controller.

ViewIfLoaded ViewIfLoaded

Returns the View if it has been instantiated; otherwise, returns null.

ViewRespectsSystemMinimumLayoutMargins ViewRespectsSystemMinimumLayoutMargins

Gets or sets a Boolean value that controls whether the view for the view controller respects the minimum layout margins.

WantsFullScreenLayout WantsFullScreenLayout

true if the view should overlap the status bar.

WeakTransitioningDelegate WeakTransitioningDelegate

The delegate object used to provide controllers for transition animations and interactions.

Zone Zone Inherited from NSObject

Methods

AccessibilityDecrement() AccessibilityDecrement()

Tells the accessibility element to decrement the value of its content.

(Inherited from UIResponder)
AccessibilityElementDidBecomeFocused() AccessibilityElementDidBecomeFocused()

Indicates that an assistive technology has set its focus to this UIResponder.

(Inherited from UIResponder)
AccessibilityElementDidLoseFocus() AccessibilityElementDidLoseFocus()

Indicates that an assistive technology has changed its focus from this UIResponder.

(Inherited from UIResponder)
AccessibilityElementIsFocused() AccessibilityElementIsFocused()

Indicates whether an assistive technology is focused on this UIResponder.

(Inherited from UIResponder)
AccessibilityIncrement() AccessibilityIncrement()

Tells the accessibility element to increment the value of its content.

(Inherited from UIResponder)
AccessibilityPerformEscape() AccessibilityPerformEscape()

Tells the accessibility system to dismiss a modal popover or hierarchically-displayed element.

(Inherited from UIResponder)
AccessibilityPerformMagicTap() AccessibilityPerformMagicTap()

Toggles the application-defined "most important state" of the app.

(Inherited from UIResponder)
AccessibilityScroll(UIAccessibilityScrollDirection) AccessibilityScroll(UIAccessibilityScrollDirection)

When overridden, allows the accessibility system to perform scrolling.

(Inherited from UIResponder)
Add(UIView) Add(UIView)

This is an alias for AddSubview(UIView), but uses the Add pattern as it allows C# 3.0 constructs to add subviews after creating the object.

AddChildViewController(UIViewController) AddChildViewController(UIViewController)

Adds a UIViewController as a child.

AddKeyCommand(UIKeyCommand) AddKeyCommand(UIKeyCommand)

Adds command as a shortcut available to attached hardware keyboards.

AddObserver(NSObject, NSString, NSKeyValueObservingOptions, IntPtr) AddObserver(NSObject, NSString, NSKeyValueObservingOptions, IntPtr)

Registers an object for being observed externally (using NSString keyPath). Observed changes are dispatched to the observer’s object ObserveValue(NSString, NSObject, NSDictionary, IntPtr) method.

(Inherited from NSObject)
AddObserver(NSObject, String, NSKeyValueObservingOptions, IntPtr) AddObserver(NSObject, String, NSKeyValueObservingOptions, IntPtr)

Registers an object for being observed externally (using string keyPath). Observed changes are dispatched to the observer’s object ObserveValue(NSString, NSObject, NSDictionary, IntPtr) method.

(Inherited from NSObject)
AddObserver(NSString, NSKeyValueObservingOptions, Action<NSObservedChange>) AddObserver(NSString, NSKeyValueObservingOptions, Action<NSObservedChange>)

Registers an object for being observed externally using an arbitrary method.

(Inherited from NSObject)
AddObserver(String, NSKeyValueObservingOptions, Action<NSObservedChange>) AddObserver(String, NSKeyValueObservingOptions, Action<NSObservedChange>)

Registers an object for being observed externally using an arbitrary method.

(Inherited from NSObject)
ApplicationFinishedRestoringState() ApplicationFinishedRestoringState()

Called when object decoding is complete during state restoration.

AttemptRotationToDeviceOrientation() AttemptRotationToDeviceOrientation()

Programmatically triggers rotation of views.

AwakeFromNib() AwakeFromNib()

Called after the object has been loaded from the nib file. Overriders must call base.AwakeFromNib().

(Inherited from NSObject)
BecomeFirstResponder() BecomeFirstResponder()

Request the object to become the first responder.

(Inherited from UIResponder)
BeginAppearanceTransition(Boolean, Boolean) BeginAppearanceTransition(Boolean, Boolean)

With EndAppearanceTransition(), tells child UIViewControllers that their UIViews are about to either appear or disappear.

BeginInvokeOnMainThread(Action) BeginInvokeOnMainThread(Action) Inherited from NSObject
BeginInvokeOnMainThread(Selector, NSObject) BeginInvokeOnMainThread(Selector, NSObject)

Invokes asynchrously the specified code on the main UI thread.

(Inherited from NSObject)
BeginRequestWithExtensionContext(NSExtensionContext) BeginRequestWithExtensionContext(NSExtensionContext)

Method that is called when the host app is about to make a request.

CanPaste(NSItemProvider[]) CanPaste(NSItemProvider[])

Gets whether this can accept a paste operation by the .

(Inherited from UIResponder)
CanPerform(Selector, NSObject) CanPerform(Selector, NSObject)

Determines if this UIResponder can perform the specified action. Typically used to probe for editing commands.

(Inherited from UIResponder)
CanPerformUnwind(Selector, UIViewController, NSObject) CanPerformUnwind(Selector, UIViewController, NSObject)

Specifies whether this UIViewController supports the specific unwind segue

ChildViewControllerForStatusBarHidden() ChildViewControllerForStatusBarHidden()

When overridden, returns the UIViewController that determines whether the status bar is hidden or unhidden.

ChildViewControllerForStatusBarStyle() ChildViewControllerForStatusBarStyle()

When overridden, returns the UIViewController that determines the style of the status bar.

ConformsToProtocol(IntPtr) ConformsToProtocol(IntPtr)

Invoked to determine if this object implements the specified protocol.

(Inherited from NSObject)
Copy() Copy()

Performs a copy of the underlying Objective-C object.

(Inherited from NSObject)
Copy(NSObject) Copy(NSObject)

Indicates a "Copy" editing operation.

(Inherited from UIResponder)
Cut(NSObject) Cut(NSObject)

Indicates a "Cut" editing operation.

(Inherited from UIResponder)
DangerousAutorelease() DangerousAutorelease() Inherited from NSObject
DangerousRelease() DangerousRelease() Inherited from NSObject
DangerousRetain() DangerousRetain() Inherited from NSObject
DecodeRestorableState(NSCoder) DecodeRestorableState(NSCoder)

With EncodeRestorableState(NSCoder), allows custom state restoration.

Delete(NSObject) Delete(NSObject)

Indicates a "Delete" editing operation.

(Inherited from UIResponder)
DidAnimateFirstHalfOfRotation(UIInterfaceOrientation) DidAnimateFirstHalfOfRotation(UIInterfaceOrientation)

Deprecated function called at end of first-part of two-step rotation animations.

DidChange(NSKeyValueChange, NSIndexSet, NSString) DidChange(NSKeyValueChange, NSIndexSet, NSString)

Indicates a change occurred to the indexes for a to-many relationship.

(Inherited from NSObject)
DidChange(NSString, NSKeyValueSetMutationKind, NSSet) DidChange(NSString, NSKeyValueSetMutationKind, NSSet) Inherited from NSObject
DidChangeValue(String) DidChangeValue(String)

Indicates that a change occurred on the specified key.

(Inherited from NSObject)
DidMoveToParentViewController(UIViewController) DidMoveToParentViewController(UIViewController)

Called after this is added or removed from a parent UIViewController.

DidReceiveMemoryWarning() DidReceiveMemoryWarning()

Called when the system is running low on memory.

DidRotate(UIInterfaceOrientation) DidRotate(UIInterfaceOrientation)

Called after the UI has rotated.

DidUpdateFocus(UIFocusUpdateContext, UIFocusAnimationCoordinator) DidUpdateFocus(UIFocusUpdateContext, UIFocusAnimationCoordinator)

Indicates that the focus changed as detailed in the context.

DismissModalViewController(Boolean) DismissModalViewController(Boolean)

Dismisses the modal view controller that was submitted by the receiver.

DismissMoviePlayerViewController() DismissMoviePlayerViewController()

Dismisses the MPMoviePlayerViewController.

DismissViewController(Boolean, Action) DismissViewController(Boolean, Action)

Dismisses the presented view controller.

DismissViewControllerAsync(Boolean) DismissViewControllerAsync(Boolean)

Dismisses the presented view controller.

Dispose() Dispose()

Releases the resources used by the NSObject object.

(Inherited from NSObject)
Dispose(Boolean) Dispose(Boolean)

Releases the resources used by the UIViewController object.

DoesNotRecognizeSelector(Selector) DoesNotRecognizeSelector(Selector)

Indicates that this object does not recognize the specified selector.

(Inherited from NSObject)
EncodeRestorableState(NSCoder) EncodeRestorableState(NSCoder)

With DecodeRestorableState(NSCoder), allows custom state restoration.

EncodeTo(NSCoder) EncodeTo(NSCoder)

Encodes the state of the object on the provided encoder

EndAppearanceTransition() EndAppearanceTransition()

With BeginAppearanceTransition(Boolean, Boolean), tells child UIViewControllers that their child views have just appeared or disappeared.

Equals(NSObject) Equals(NSObject) Inherited from NSObject
Equals(Object) Equals(Object) Inherited from NSObject
GetAllowedChildViewControllersForUnwinding(UIStoryboardUnwindSegueSource) GetAllowedChildViewControllersForUnwinding(UIStoryboardUnwindSegueSource)

The array of child UIViewController objects that should be searched to determine if they are the unwind segue destination.

GetChildViewControllerContainingSegueSource(UIStoryboardUnwindSegueSource) GetChildViewControllerContainingSegueSource(UIStoryboardUnwindSegueSource)

The child UIViewController that is the source of the unwind segue.

GetDictionaryOfValuesFromKeys(NSString[]) GetDictionaryOfValuesFromKeys(NSString[])

Retrieves the values of the specified keys.

(Inherited from NSObject)
GetEnumerator() GetEnumerator()

Returns an enumerator that lists all of the child UIViews

GetHashCode() GetHashCode()

Generates a hash code for the current instance.

(Inherited from NSObject)
GetMethodForSelector(Selector) GetMethodForSelector(Selector) Inherited from NSObject
GetNativeField(String) GetNativeField(String) Inherited from NSObject
GetNativeHash() GetNativeHash() Inherited from NSObject
GetOverrideTraitCollectionForChildViewController(UIViewController) GetOverrideTraitCollectionForChildViewController(UIViewController)

Gets the UITraitCollection for the specified child view controller of this controller.

GetSegueForUnwinding(UIViewController, UIViewController, String) GetSegueForUnwinding(UIViewController, UIViewController, String)

Defines the segue to be used between two UIViewControllers.

GetSizeForChildContentContainer(IUIContentContainer, CGSize) GetSizeForChildContentContainer(IUIContentContainer, CGSize)

Gets the size of the content of the specified child IUIContentContainer by using the size of the parent container.

GetSupportedInterfaceOrientations() GetSupportedInterfaceOrientations()

The orientations supported by this UIViewController.

GetTargetForAction(Selector, NSObject) GetTargetForAction(Selector, NSObject)

Returns the object that responds to an action.

(Inherited from UIResponder)
GetTargetViewControllerForAction(Selector, NSObject) GetTargetViewControllerForAction(Selector, NSObject)

Gets the view controller for the specified action and sender.

GetViewControllerForUnwind(Selector, UIViewController, NSObject) GetViewControllerForUnwind(Selector, UIViewController, NSObject)

Used for searching child UIViewControllers for a specific unwind segue.

Init() Init() Inherited from NSObject
InitializeHandle(IntPtr) InitializeHandle(IntPtr) Inherited from NSObject
InitializeHandle(IntPtr, String) InitializeHandle(IntPtr, String) Inherited from NSObject
Invoke(Action, Double) Invoke(Action, Double) Inherited from NSObject
Invoke(Action, TimeSpan) Invoke(Action, TimeSpan) Inherited from NSObject
InvokeOnMainThread(Action) InvokeOnMainThread(Action) Inherited from NSObject
InvokeOnMainThread(Selector, NSObject) InvokeOnMainThread(Selector, NSObject)

Invokes synchrously the specified code on the main UI thread.

(Inherited from NSObject)
IsEqual(NSObject) IsEqual(NSObject) Inherited from NSObject
IsKindOfClass(Class) IsKindOfClass(Class) Inherited from NSObject
IsMemberOfClass(Class) IsMemberOfClass(Class) Inherited from NSObject
LoadView() LoadView()

Initializes the View property.

LoadViewIfNeeded() LoadViewIfNeeded()

If necessary, synchronously loads the View from a Storyboard or NIB.

MakeTextWritingDirectionLeftToRight(NSObject) MakeTextWritingDirectionLeftToRight(NSObject)

Sets the direction in which text is written to be left-to-right.

(Inherited from UIResponder)
MakeTextWritingDirectionRightToLeft(NSObject) MakeTextWritingDirectionRightToLeft(NSObject)

Sets the direction in which text is written to be right-to-left.

(Inherited from UIResponder)
MarkDirty() MarkDirty()

Promotes a regular peer object (IsDirectBinding is true) into a toggleref object.

(Inherited from NSObject)
MotionBegan(UIEventSubtype, UIEvent) MotionBegan(UIEventSubtype, UIEvent)

Method invoked when a motion (a shake) has started.

(Inherited from UIResponder)
MotionCancelled(UIEventSubtype, UIEvent) MotionCancelled(UIEventSubtype, UIEvent)

Method invoked if the operating system cancels a motion (shake) event.

(Inherited from UIResponder)
MotionEnded(UIEventSubtype, UIEvent) MotionEnded(UIEventSubtype, UIEvent)

Method invoked when a motion (shake) has finished.

(Inherited from UIResponder)
MutableCopy() MutableCopy()

Creates a mutable copy of the specified NSObject.

(Inherited from NSObject)
ObserveValue(NSString, NSObject, NSDictionary, IntPtr) ObserveValue(NSString, NSObject, NSDictionary, IntPtr)

Indicates that the value at the specified keyPath relative to this object has changed.

(Inherited from NSObject)
Paste(NSItemProvider[]) Paste(NSItemProvider[])

Called to perform a paste operation from .

(Inherited from UIResponder)
Paste(NSObject) Paste(NSObject)

Indicates a "Paste" editing operation.

(Inherited from UIResponder)
PerformSegue(String, NSObject) PerformSegue(String, NSObject)

Performs the specified UIStoryboardSegue.

PerformSelector(Selector) PerformSelector(Selector) Inherited from NSObject
PerformSelector(Selector, NSObject) PerformSelector(Selector, NSObject) Inherited from NSObject
PerformSelector(Selector, NSObject, Double) PerformSelector(Selector, NSObject, Double)

Invokes the selector on the current instance and if the obj is not null, it passes this as its single parameter.

(Inherited from NSObject)
PerformSelector(Selector, NSObject, Double, NSString[]) PerformSelector(Selector, NSObject, Double, NSString[]) Inherited from NSObject
PerformSelector(Selector, NSObject, NSObject) PerformSelector(Selector, NSObject, NSObject) Inherited from NSObject
PerformSelector(Selector, NSThread, NSObject, Boolean) PerformSelector(Selector, NSThread, NSObject, Boolean) Inherited from NSObject
PerformSelector(Selector, NSThread, NSObject, Boolean, NSString[]) PerformSelector(Selector, NSThread, NSObject, Boolean, NSString[]) Inherited from NSObject
PreferredContentSizeDidChangeForChildContentContainer(IUIContentContainer) PreferredContentSizeDidChangeForChildContentContainer(IUIContentContainer)

Notifies this controller that the preferred size for content for a specified child container has changed.

PreferredInterfaceOrientationForPresentation() PreferredInterfaceOrientationForPresentation()

The orientation that best displays the content of this UIViewController.

PreferredStatusBarStyle() PreferredStatusBarStyle()

The preferred UIStatusBarStyle for this UIViewController.

PrefersStatusBarHidden() PrefersStatusBarHidden()

Whether this UIViewController prefers the status bar to be hidden.

PrepareForInterfaceBuilder() PrepareForInterfaceBuilder() Inherited from NSObject
PrepareForInterstitialAds() PrepareForInterstitialAds()

Prepares the view controller to display interstitial ads.

PrepareForSegue(UIStoryboardSegue, NSObject) PrepareForSegue(UIStoryboardSegue, NSObject)

Informs the application that a UIStoryboardSegue is about to be executed.

PresentModalViewController(UIViewController, Boolean) PresentModalViewController(UIViewController, Boolean)

Application developers should use PresentViewController(UIViewController, Boolean, Action) instead of this deprecated method.

PresentMoviePlayerViewController(MPMoviePlayerViewController) PresentMoviePlayerViewController(MPMoviePlayerViewController)

Displays a movie controller using the standard transition.

PresentViewController(UIViewController, Boolean, Action) PresentViewController(UIViewController, Boolean, Action)

Modally presents a view controller.

PresentViewControllerAsync(UIViewController, Boolean) PresentViewControllerAsync(UIViewController, Boolean)

Modally presents a view controller.

PressesBegan(NSSet<UIPress>, UIPressesEvent) PressesBegan(NSSet<UIPress>, UIPressesEvent)

Indicates that a physical button has been pressed on a remote or game controller.

(Inherited from UIResponder)
PressesCancelled(NSSet<UIPress>, UIPressesEvent) PressesCancelled(NSSet<UIPress>, UIPressesEvent)

Indicates a physical button-press event has been cancelled due to a system event.

(Inherited from UIResponder)
PressesChanged(NSSet<UIPress>, UIPressesEvent) PressesChanged(NSSet<UIPress>, UIPressesEvent)

Indicates that the Force value of the evt has changed.

(Inherited from UIResponder)
PressesEnded(NSSet<UIPress>, UIPressesEvent) PressesEnded(NSSet<UIPress>, UIPressesEvent)

Indicates the ending of a press of a physical button on a remote or game controller.

(Inherited from UIResponder)
RegisterForPreviewingWithDelegate(IUIViewControllerPreviewingDelegate, UIView) RegisterForPreviewingWithDelegate(IUIViewControllerPreviewingDelegate, UIView)

Registers this view controller for 3D Touch peek and pop operations.

ReloadInputViews() ReloadInputViews()

Updates custom input and accessory views when this object is the first responder.

(Inherited from UIResponder)
RemoteControlReceived(UIEvent) RemoteControlReceived(UIEvent)

Indicates that a remote-control event was received.

(Inherited from UIResponder)
RemoveFromParentViewController() RemoveFromParentViewController()

Removes this UIViewController from its ParentViewControllerUIViewController.

RemoveKeyCommand(UIKeyCommand) RemoveKeyCommand(UIKeyCommand)

Removes a previously-added hardware-keyboard accelerator.

RemoveObserver(NSObject, NSString) RemoveObserver(NSObject, NSString)

Stops the specified observer from receiving further notifications of changed values for the specified keyPath.

(Inherited from NSObject)
RemoveObserver(NSObject, NSString, IntPtr) RemoveObserver(NSObject, NSString, IntPtr)

Stops the specified observer from receiving further notifications of changed values for the specified keyPath and context.

(Inherited from NSObject)
RemoveObserver(NSObject, String) RemoveObserver(NSObject, String)

Stops the specified observer from receiving further notifications of changed values for the specified keyPath.

(Inherited from NSObject)
RemoveObserver(NSObject, String, IntPtr) RemoveObserver(NSObject, String, IntPtr)

Stops the specified observer from receiving further notifications of changed values for the specified keyPath and context.

(Inherited from NSObject)
ResignFirstResponder() ResignFirstResponder()

Called when this UIResponder has been asked to resign its first responder status.

(Inherited from UIResponder)
RespondsToSelector(Selector) RespondsToSelector(Selector)

Whether this object recognizes the specified selector.

(Inherited from NSObject)
RestoreUserActivityState(NSUserActivity) RestoreUserActivityState(NSUserActivity)

Restores the state that is necessary for continuance of the specified user activity.

(Inherited from UIResponder)
Select(NSObject) Select(NSObject)

Indicates a "Select" editing operation.|b

(Inherited from UIResponder)
SelectAll(NSObject) SelectAll(NSObject)

Indicates a "Select All" editing operation.

(Inherited from UIResponder)
SetEditing(Boolean, Boolean) SetEditing(Boolean, Boolean)

Turns editing mode on or off.

SetNativeField(String, NSObject) SetNativeField(String, NSObject) Inherited from NSObject
SetNeedsFocusUpdate() SetNeedsFocusUpdate()

When this is the active focus environment, requests a focus update, which can potentially change the PreferredFocusedView. (See also UpdateFocusIfNeeded().)

SetNeedsStatusBarAppearanceUpdate() SetNeedsStatusBarAppearanceUpdate()

Notifies the system that the attributes of the status bar have been changed.

SetNeedsUpdateOfHomeIndicatorAutoHidden() SetNeedsUpdateOfHomeIndicatorAutoHidden()

Controls whether the developer's view controller should display the indicator for returning to the Home screen..

SetNeedsUpdateOfScreenEdgesDeferringSystemGestures() SetNeedsUpdateOfScreenEdgesDeferringSystemGestures()

Changes the screen edges whose gestures take precedence over system gestures.

SetNilValueForKey(NSString) SetNilValueForKey(NSString)

Sets the value of the specified key to null.

(Inherited from NSObject)
SetOverrideTraitCollection(UITraitCollection, UIViewController) SetOverrideTraitCollection(UITraitCollection, UIViewController)

Sets the UITraitCollection object for the specified child view controller of this controller.

SetToolbarItems(UIBarButtonItem[], Boolean) SetToolbarItems(UIBarButtonItem[], Boolean)

Adds UIBarButtonItems to the UIToolbar

SetValueForKey(NSObject, NSString) SetValueForKey(NSObject, NSString)

Sets the value of the property specified by the key to the specified value.

(Inherited from NSObject)
SetValueForKeyPath(IntPtr, NSString) SetValueForKeyPath(IntPtr, NSString)

A constructor used when creating managed representations of unmanaged objects; Called by the runtime.

(Inherited from NSObject)
SetValueForKeyPath(NSObject, NSString) SetValueForKeyPath(NSObject, NSString)

Sets the value of a property that can be reached using a keypath.

(Inherited from NSObject)
SetValueForUndefinedKey(NSObject, NSString) SetValueForUndefinedKey(NSObject, NSString)

Indicates an attempt to write a value to an undefined key. If not overridden, raises an NSUndefinedKeyException.

(Inherited from NSObject)
SetValuesForKeysWithDictionary(NSDictionary) SetValuesForKeysWithDictionary(NSDictionary)

Sets the values of this NSObject to those in the specified dictionary.

(Inherited from NSObject)
ShouldAutorotate() ShouldAutorotate()

Turns auto-rotation on or off.

ShouldAutorotateToInterfaceOrientation(UIInterfaceOrientation) ShouldAutorotateToInterfaceOrientation(UIInterfaceOrientation)

true if the UIViewController supports rotation to the specified UIInterfaceOrientation.

ShouldPerformSegue(String, NSObject) ShouldPerformSegue(String, NSObject)

Whether the segue should be performed.

ShouldUpdateFocus(UIFocusUpdateContext) ShouldUpdateFocus(UIFocusUpdateContext)

Called prior to the this either losing or receiving focus. If either focus environment returns false, the focus update is canceled.

ShowDetailViewController(UIViewController, NSObject) ShowDetailViewController(UIViewController, NSObject)

Shows this view controller in a detail context.

ShowViewController(UIViewController, NSObject) ShowViewController(UIViewController, NSObject)

Shows this view controller.

SystemLayoutFittingSizeDidChangeForChildContentContainer(IUIContentContainer) SystemLayoutFittingSizeDidChangeForChildContentContainer(IUIContentContainer)

Notifies this container that auto layout resized a specified child container.

ToggleBoldface(NSObject) ToggleBoldface(NSObject)

Toggles the use of a bold font.

(Inherited from UIResponder)
ToggleItalics(NSObject) ToggleItalics(NSObject)

Toggles the use of an italic font.

(Inherited from UIResponder)
ToggleUnderline(NSObject) ToggleUnderline(NSObject)

Toggles the use of underlining.

(Inherited from UIResponder)
ToString() ToString()

Returns a string representation of the value of the current instance.

(Inherited from NSObject)
TouchesBegan(NSSet, UIEvent) TouchesBegan(NSSet, UIEvent)

Sent when one or more fingers touches the screen.

(Inherited from UIResponder)
TouchesCancelled(NSSet, UIEvent) TouchesCancelled(NSSet, UIEvent)

Sent when the touch processing has been cancelled.

(Inherited from UIResponder)
TouchesEnded(NSSet, UIEvent) TouchesEnded(NSSet, UIEvent)

Sent when one or more fingers are lifted from the screen.

(Inherited from UIResponder)
TouchesEstimatedPropertiesUpdated(NSSet) TouchesEstimatedPropertiesUpdated(NSSet)

Called when the estimated properties of touches have been updated.

(Inherited from UIResponder)
TouchesMoved(NSSet, UIEvent) TouchesMoved(NSSet, UIEvent)

Sent when one or more fingers move on the screen.

(Inherited from UIResponder)
TraitCollectionDidChange(UITraitCollection) TraitCollectionDidChange(UITraitCollection)

Method invoked when the trait collection for the view controller changed.

Transition(UIViewController, UIViewController, Double, UIViewAnimationOptions, Action, UICompletionHandler) Transition(UIViewController, UIViewController, Double, UIViewAnimationOptions, Action, UICompletionHandler)

Used for transitioning between two view controller'€™s child view controllers.

TransitionAsync(UIViewController, UIViewController, Double, UIViewAnimationOptions, Action) TransitionAsync(UIViewController, UIViewController, Double, UIViewAnimationOptions, Action)

Used for transitioning between two view controller'€™s child view controllers.

UnregisterForPreviewingWithContext(IUIViewControllerPreviewing) UnregisterForPreviewingWithContext(IUIViewControllerPreviewing)

Stops previewing from handling 3D Touch peek and pop input.

Unwind(UIStoryboardSegue, UIViewController) Unwind(UIStoryboardSegue, UIViewController)

Called during an unwind segue on any UIViewController objects in the unwind path.

UpdateFocusIfNeeded() UpdateFocusIfNeeded()

If any focus environment has a pending update, this method forces an immediate focus update. Unlike SetNeedsFocusUpdate(), this method may be called by any UIViewController, whether it currently contains focus or not.

UpdateUserActivityState(NSUserActivity) UpdateUserActivityState(NSUserActivity)

Updates a given user activity state.

(Inherited from UIResponder)
UpdateViewConstraints() UpdateViewConstraints()

Called when the UIViewController needs to recalculate its layout constraints.

ValueForKey(NSString) ValueForKey(NSString)

Returns the value of the property associated with the specified key.

(Inherited from NSObject)
ValueForKeyPath(NSString) ValueForKeyPath(NSString)

Returns the value of a property that can be reached using a keypath.

(Inherited from NSObject)
ValueForUndefinedKey(NSString) ValueForUndefinedKey(NSString)

Indicates an attempt to read a value of an undefined key. If not overridden, raises an NSUndefinedKeyException.

(Inherited from NSObject)
ViewDidAppear(Boolean) ViewDidAppear(Boolean)

Called after the View is added to the view hierarchy.

ViewDidDisappear(Boolean) ViewDidDisappear(Boolean)

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

ViewDidLayoutSubviews() ViewDidLayoutSubviews()

Called after the View has laid out its subviews.

ViewDidLoad() ViewDidLoad()

Called after the controller’s View is loaded into memory.

ViewDidUnload() 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.

ViewLayoutMarginsDidChange() ViewLayoutMarginsDidChange()

Method that is called when the layout margins for the view are changed.

ViewSafeAreaInsetsDidChange() ViewSafeAreaInsetsDidChange()

Method that is called when the safe area insets are changed by size changes to system bars or by changes to the AdditionalSafeAreaInsets property.

ViewWillAppear(Boolean) ViewWillAppear(Boolean)

Called prior to the View being added to the view hierarchy.

ViewWillDisappear(Boolean) ViewWillDisappear(Boolean)

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

ViewWillLayoutSubviews() ViewWillLayoutSubviews()

Called before the View lays out its subviews.

ViewWillTransitionToSize(CGSize, IUIViewControllerTransitionCoordinator) ViewWillTransitionToSize(CGSize, IUIViewControllerTransitionCoordinator)

For UIViewController objects that are part of an app extension, called prior to the View being resized.

ViewWillUnload() 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) WillAnimateFirstHalfOfRotation(UIInterfaceOrientation, Double)

Deprecated method sent during the first half of a rotation. Application developers should instead use WillAnimateRotation(UIInterfaceOrientation, Double).

WillAnimateRotation(UIInterfaceOrientation, Double) WillAnimateRotation(UIInterfaceOrientation, Double)

Called prior to a one-step interface rotation.

WillAnimateSecondHalfOfRotation(UIInterfaceOrientation, Double) WillAnimateSecondHalfOfRotation(UIInterfaceOrientation, Double)

Deprecated method sent during the second half of a rotation. Application developers should instead use WillAnimateRotation(UIInterfaceOrientation, Double).

WillChange(NSKeyValueChange, NSIndexSet, NSString) WillChange(NSKeyValueChange, NSIndexSet, NSString)

Indicates that the values of the specified indices in the specified key are about to change.

(Inherited from NSObject)
WillChange(NSString, NSKeyValueSetMutationKind, NSSet) WillChange(NSString, NSKeyValueSetMutationKind, NSSet) Inherited from NSObject
WillChangeValue(String) WillChangeValue(String)

Indicates that the value of the specified key is about to change.

(Inherited from NSObject)
WillMoveToParentViewController(UIViewController) WillMoveToParentViewController(UIViewController)

Called prior to adding or removing this from a container UIViewController.

WillRotate(UIInterfaceOrientation, Double) WillRotate(UIInterfaceOrientation, Double)

Called prior to a user interface rotation.

WillTransitionToTraitCollection(UITraitCollection, IUIViewControllerTransitionCoordinator) WillTransitionToTraitCollection(UITraitCollection, IUIViewControllerTransitionCoordinator)

Notifies this that its trait collection will change to traitCollection, as coordinated by coordinator.

Extension Methods

GetDebugDescription(INSObjectProtocol) GetDebugDescription(INSObjectProtocol)
DisplayingBannerAd(UIViewController) DisplayingBannerAd(UIViewController)
GetCanDisplayBannerAds(UIViewController) GetCanDisplayBannerAds(UIViewController)
GetInterstitialPresentationPolicy(UIViewController) GetInterstitialPresentationPolicy(UIViewController)
GetOriginalContentView(UIViewController) GetOriginalContentView(UIViewController)
PresentingFullScreenAd(UIViewController) PresentingFullScreenAd(UIViewController)
RequestInterstitialAdPresentation(UIViewController) RequestInterstitialAdPresentation(UIViewController)
SetCanDisplayBannerAds(UIViewController, Boolean) SetCanDisplayBannerAds(UIViewController, Boolean)
SetInterstitialPresentationPolicy(UIViewController, ADInterstitialPresentationPolicy) SetInterstitialPresentationPolicy(UIViewController, ADInterstitialPresentationPolicy)
ShouldPresentInterstitialAd(UIViewController) ShouldPresentInterstitialAd(UIViewController)
GetAccessibilityCustomRotors(NSObject) GetAccessibilityCustomRotors(NSObject)

Gets the array of UIAccessibilityCustomRotor objects appropriate for this object.

SetAccessibilityCustomRotors(NSObject, UIAccessibilityCustomRotor[]) SetAccessibilityCustomRotors(NSObject, UIAccessibilityCustomRotor[])

Sets the array of UIAccessibilityCustomRotor objects appropriate for this object.

GetTransitionCoordinator(UIViewController) GetTransitionCoordinator(UIViewController)

The IUIViewControllerTransitionCoordinator coordinating the transition of the specified UIViewController.

GetFocusItemContainer(IUIFocusEnvironment) GetFocusItemContainer(IUIFocusEnvironment)

Gets the focus container for the environment.

GetParentFocusEnvironment(IUIFocusEnvironment) GetParentFocusEnvironment(IUIFocusEnvironment)

Gets the parent focus environment.

GetPreferredFocusEnvironments(IUIFocusEnvironment) GetPreferredFocusEnvironments(IUIFocusEnvironment)

Gets the list of focus environments, ordered by priority, that the environment prefers when updating the focus.

CanPaste(IUIPasteConfigurationSupporting, NSItemProvider[]) CanPaste(IUIPasteConfigurationSupporting, NSItemProvider[])

Returns true if the responder can paste from the specified item providers.

Paste(IUIPasteConfigurationSupporting, NSItemProvider[]) Paste(IUIPasteConfigurationSupporting, NSItemProvider[])

Performs the paste.

DecreaseSize(UIResponder, NSObject) DecreaseSize(UIResponder, NSObject)

A hardware keyboard request (Command-minus) to decrease the size of the UIResponder.

IncreaseSize(UIResponder, NSObject) IncreaseSize(UIResponder, NSObject)

A hardware keyboard request (Command-plus) to increase the size of the UIResponder.

CollapseSecondaryViewController(UIViewController, UIViewController, UISplitViewController) CollapseSecondaryViewController(UIViewController, UIViewController, UISplitViewController)

Collapses the secondary view controller on splitViewController

GetSplitViewController(UIViewController) GetSplitViewController(UIViewController)

Returns te split view controller for the nested view controller.

SeparateSecondaryViewControllerForSplitViewController(UIViewController, UISplitViewController) SeparateSecondaryViewControllerForSplitViewController(UIViewController, UISplitViewController)

Returns the separate secondary view controller for splitViewController.

Applies to

See also