Modality
Modality is a design technique that presents content in a temporary mode that requires an explicit action to exit. Presenting content modally can:
- Help people focus on a self-contained task or set of closely related options
- Ensure that people receive critical information and, if necessary, act on it

Alert

Modal view
To enable various system-defined modal experiences, iOS provides alerts, activity views, share sheets, and action sheets. To present custom modal content in your app, you can use one of the following presentation styles.
- Automatic. Uses the default presentation style, typically a sheet.
- Fullscreen. Covers the previous view, and requires a button for dismissal.
- Popover. Presents a popover in a horizontally regular environment and a sheet in compact environments.
- Page sheet and form sheet. Partially covers the previous view; for guidance, see Sheets.
- Current context. Covers a particular previous view.
- Custom. Uses custom animation to present content in a custom container.
For developer guidance, see UIModalPresentationStyle.
NOTE If you use the current context modal view style to display modal content within a split view pane, popover, or other view that isn’t fullscreen, switch to using a sheet when presenting modal content in a compact environment.
Use modality when it makes sense. Create a modal experience only when it’s critical to focus people’s attention on making a choice or performing a task that’s different from their current task. A modal experience takes people out of their current context and requires an action to dismiss, so it’s essential to use it only when it provides a clear benefit.
Reserve alerts for delivering essential — and ideally actionable — information. Typically, an alert appears because something has gone wrong. Because an alert interrupts the current experience and requires a tap to dismiss, it’s important for people to feel that the intrusion is warranted. For guidance, see Alerts.
In general, keep modal tasks simple, short, and narrowly focused. If a modal task is too complicated, people can lose sight of the task they suspended when they entered the modal context. Take care to avoid creating a modal experience that feels like an app within your app. In particular, be wary of presenting a hierarchy of views within a modal task, because people can forget how to retrace their steps to their original task. If a modal task must contain subviews, provide a single path through the hierarchy and a clear path to completion. Avoid using a Done button for anything other than completing the task.
Consider using a fullscreen modal style for immersive content or a complex task. A fullscreen modal experience minimizes distractions, so it can work well for presenting videos, photos, or camera views, or to enable a multistep task like marking up a document or editing a photo.
Always include a button that dismisses the modal view. For example, you might use Done or Cancel. Including a button ensures that the modal view is accessible to assistive technologies and provides an alternative to dismissal gestures.
When necessary, help people avoid data loss by getting confirmation before closing a modal view. Regardless of whether people use a dismiss gesture or a button to close the view, if the action could result in the loss of user-generated content, present an action sheet that explains the situation and gives people ways to resolve it.
Make it easy to identify a modal view’s task. When people enter a modal view, they switch away from their previous context and might not return to it right away. When you provide a title that names the modal view’s task — or additional text that describes the task or provides guidance — you can help people keep their place in your app.
Coordinate the modal view’s appearance with your app. For example, when a modal view includes a navigation bar, it should use the same appearance as the navigation bar in your app.
Choose a modal transition style that makes sense in your app. Use a transition style that coordinates with your app and enhances the awareness of the temporary context shift. The default transition vertically slides the modal view up from the bottom of the screen and back down when it’s dismissed. Use consistent modal transition styles throughout your app.
For developer guidance, see UIViewController and UIPresentationController.