View Management

Manage your interface using view controllers and facilitate navigation around different screens of content.

Topics

First Steps

class UIViewController

Provides the infrastructure for managing the views of your UIKit app.

class UIPresentationController

An object that provides advanced view and transition management for presented view controllers.

protocol UIContentContainer

A collection of methods that help you adapt the contents of your view controllers to size and trait changes.

Split View Interface

class UISplitViewController

A container view controller that presents a master-detail interface.

Navigation Interface

class UINavigationController

A specialized view controller that manages the navigation of hierarchical content.

class UINavigationItem

An object that manages the buttons and views to be displayed in a navigation bar object.

class UINavigationBar

A control that supports navigation of hierarchical content, most often used in navigation controllers.

Page View Interface

class UIPageViewController

A view controller that lets the user navigate between pages of content, where each page is managed by its own view controller object.

Tab View Interface

class UITabBarController

A specialized view controller that manages a radio-style selection interface.

class UITabBar

A control that displays one or more buttons in a tab bar for selecting between different subtasks, views, or modes in an app.

class UITabBarItem

An item in a tab bar.

Search Interface

class UISearchContainerViewController

A wrapper for search results that you want to embed in a container view controller.

class UISearchBar

A text field–like control that supports text-based searches.

protocol UISearchBarDelegate

A collection of optional methods that you implement to make a search bar control functional.

class UISearchController

An object that manages the display of search results based on interactions with a search bar.

protocol UISearchResultsUpdating

A set of methods that let you update search results based on information the user enters into the search bar.

View Layout

Use stack views to lay out the views of your interface automatically. Use Auto Layout when you require precise placement of your views.

class NSStackView

A view that arranges an array of views horizontally or vertically and that automatically updates their placement and sizing when the window size changes.

Auto Layout

Use Auto Layout when you need more precise control over your layouts than stack views provide.

Focus Interactions

Adding User-Focusable Elements to a tvOS App

Create intuitive and easily manipulated user-interactive controls for your tvOS app.

class UIFocusGuide

An object that exposes nonview areas as focusable.

protocol UIFocusItem

A protocol—not intended for conformance by third-party classes—that lets an item declare its ability to participate in the focus system.

class UIFocusSystem

The current state of the user interface's focus system.

protocol UIFocusEnvironment

A set of methods that define the focus behavior for a branch of the view hierarchy.

class UIFocusUpdateContext

An object that provides information relevant to a specific focus update from one view to another.

class UIFocusAnimationCoordinator

A coordinator of focus-related animations during a focus update.

class UIFocusDebugger

A runtime object for debugging focus-related interactions.

Interface Restoration

Preserving Your App's UI Across Launches

Return your app to its previous state after it is terminated by the system.

protocol UIViewControllerRestoration

A set of methods used by classes that act as "restoration classes” for view controllers during the state restoration process.

protocol UIObjectRestoration

A set of methods used by classes that act as "restoration classes” for objects during the state restoration process.

protocol UIStateRestoring

A set of methods that let you include any object in your state restoration archives.

Interface Orientation

func UIInterfaceOrientationIsPortrait(UIInterfaceOrientation)

Returns a Boolean value indicating whether the user interface is currently presented in a portrait orientation.

func UIInterfaceOrientationIsLandscape(UIInterfaceOrientation)

Returns a Boolean value indicating whether the user interface is currently presented in a landscape orientation.

See Also

User Interface

Views and Controls

Present your content onscreen and define the interactions allowed with that content.

System View Controllers

Use the built-in UIKit view controllers to pick images, edit videos, share content, print files, and much more.

Accessibility

Make your app more accessible to users with disabilities.

Animation and Haptics

Provide feedback to users using view-based animations and haptics.

Windows and Screens

Provide a container for your view hierarchies and other content.