Alerts and Action Sheets

Alerts and action sheets are full-screen system interfaces that you use to convey information and request feedback. Alerts let you display errors or other important information related to the state of your app and its activities. Action sheets let you prompt the user to choose from one of several possible options. Alerts and action sheets are modal interfaces, and you can present them from any of your app’s screens. Alerts and action sheets come in three different styles, and each has a specific use.

Alerts communicate errors or unusual conditions. An alert displays a title, an optional message, and a button to dismiss the sheet. Use the title and message to communicate precisely what happened. Do not display more than one button.

Side-by-side alerts communicate errors or unusual conditions where you need to offer a choice between two options. A side-by-side alert displays a title, an optional message, and exactly two buttons. Use the title and message to describe precisely what happened and the choice that the user must make. The left button should always dismiss the alert without taking any action.

Action sheets ask the user to select from a set of possible options. An action sheet displays a title, an optional message, and one or more buttons from which to select. One button is always designated as a Cancel button and displayed in the upper-left corner of the sheet. You can customize the title of the Cancel button as needed.

Use alerts sparingly. Alerts and side-by-side alerts inform people about errors or unusual conditions in your app. As a result, you should use them rarely, if at all.

Use action sheets to prompt the user to choose an option. An action sheet displays a list of options and conveys how the user’s choice is to be applied. Use action sheets to request information about how to proceed. For example, a messaging app might offer options to respond to an incoming message or ignore it.

For developer guidance, see WKAlertAction.

Text

Provide a succinct title and message. The title should clearly and succinctly explain what happened or what action is required from the user. In alerts, use the message to provide additional context about what happened. Button titles should be similarly clear and succinct.

Keep titles short enough to display on a single line, if possible. A long title is difficult to read quickly and might be truncated or require scrolling. Short titles are easier to read and leave more room for a message and action buttons.

Omit the message section if it doesn't add any benefit. In alerts, you can use the message to convey important details about what happened and the significance of that event. If the title alone is enough to convey that information, omit the message string altogether. Action sheets should rarely include a message string.

Use capitalization and punctuation appropriately. Specifically:

Scenario Style
Sentence fragment or single sentence that's not a question Title-style capitalization and no ending punctuation
Single sentence that's a question Sentence-style capitalization and an ending question mark
Two or more sentences Sentence-style capitalization and appropriate ending punctuation for each sentence

Buttons

Each button in an alert or action sheet has an associated style that conveys information about the button’s purpose. Most buttons use the default style, which indicates that the button has no special meaning. The destructive style indicates that the button destroys user data or performs a destructive action on the app. The cancel style indicates that the button dismisses the sheet without taking any action. Button styles affect the appearance and placement of buttons in each sheet.

Always include a Cancel button. Always provide a way to dismiss the sheet without taking further action. The button you include may have a title other than “Cancel”, but it should always use the cancel button style.

Choose the correct alert style based on the number of buttons you need. An alert should have only one button that dismisses the alert. A side-by-side alert must have exactly two buttons. Use the side-by-side alert only when you need two options. For example, use a side-by-side alert when you want to present an OK and a Cancel button.

Avoid action sheets with more than four buttons. Fewer buttons makes it easier for people to see all options onscreen at once. One of the buttons must use the cancel button style.