Windows and Screens

Provide a container for your view hierarchies and other content.


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.



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.


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.


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.


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 Controllers

Manage your interface using view controllers and facilitate navigation around your app's content.

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.

Appearance Customization

Add Dark Mode support to your app, customize the appearance of bars, and use appearance proxies to modify your UI.

Animation and Haptics

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