Windows and Screens

Provide a container for your view hierarchies and other content.

Overview

Window objects act as containers for your app’s onscreen content, and screens report the characteristics of the underlying display to your app. Use these objects to manage the content that you present onscreen. Every device has at least one UIScreen object representing the device’s main screen, and additional screen objects represent connected displays.

A view is installed in a window, which fills the entire screen.

A UIWindow object provides no visible content of its own. All of the window's visible content is provided by its root view controller, which you configure in your app's storyboards. The window's role is to receive events from UIKit and to forward any relevant events to the root view controller and associated views. UIKit provides an initial window for you to use, and you can create additional windows as needed. For example, you create new windows for additional screens connected to the device.

Topics

Windows

class UIWindow

The backdrop for your app’s user interface and the object that dispatches events to your views.

protocol UICoordinateSpace

A set of methods for converting between different frames of reference on a screen.

Popovers

Displaying Transient Content in a Popover

Show a temporary interface on top of your app’s content on iPad.

class UIPopoverPresentationController

An object that manages the display of content in a popover.

class UIPopoverBackgroundView

The background appearance for a popover.

protocol UIPopoverBackgroundViewMethods

A set of methods that UIPopoverBackgroundView subclasses must implement.

Alerts

Getting the User's Attention with Alerts and Action Sheets

Present important information to the user or prompt the user about an important choice.

class UIAlertController

An object that displays an alert message to the user.

class UIAlertAction

An action that can be taken when the user taps a button in an alert.

Screens

Displaying Content on a Connected Screen

Fill connected displays with additional content from your app.

class UIScreen

An object that defines the properties associated with a hardware-based display.

class UIScreenMode

A possible set of attributes that can be applied to a screen object.

See Also

User Interface

Views and Controls

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

View Management

Manage your interface using view controllers and facilitate navigation around different screens of 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.