
关于Action Sheets & Alerts
10/19/2016 · 5 min read
Recently, when organizing the interactive documents of colleagues, I found that the interactive controls for the second confirmation of the application and the choice to use are not particularly in place. Below, I have translated the guidelines for the use of these two controls in iOS:
-
- Alerts * *
Warnings are very important reminders, usually related to a state or mode of the app or device that you need to confirm.
A warning popup consists of a warning title, optional information, one or more button options, and option text for collecting input.This is a configurable control, such as the control below the figure, whose visual effects are fixed and cannot be customized.
- Minimize alerts * * The warning interrupts the user's experience, so it should only be a particularly important situation, such as “confirming a purchase”, “doing something devastating” (like deleting), or alerting the user to an issue.The rare use of warning pop-ups allows users to take them seriously, ensuring that each warning pop-up provides important and decisive information and helpful options.
- Test the appearance of two warnings * * A warning may appear in landscape or portrait mode.Optimize text to read in one direction, do not make the content of the warning without scrolling.
- Alert Titles and Messages * *
- As much as possibleShort, Narrative, Multi-Word Warning Prompt.* * Fewer text people read better on one screen and try to avoid additional informational messages, as individual text titles rarely provide useful information and questions or short sentences can be considered.Whenever possible, make sure the title is single-line, using full sentence-style capitalization and corresponding punctuation.Do not use sentence fragments punctuated at the end of sentences.
- If you must provide a message, try to write short and complete sentences.* * Try to keep messages short and preferably 1 or 2 lines without scrolling, with appropriate case and punctuation.
- Don't let the user feel harsh or blamed.* * People know that warning pop-ups alert them when problems and dangerous situations arise, and as long as you use a friendly tone, this can be more positive and guiding than outright denial.Avoid using pronouns like “you, your, me, mine” as if blaming the user.
- No need to explain warning buttons.* * If your warning text and button titles are clear, then they do not need to be explained, there are few buttons that you need to guide, button text needs to pay attention to case, and do not wrap the text in quotes.
- Warning button * *
- General warning pop-ups use two buttons.* * Two buttons are provided in the warning for a more concise selection.A single-button warning pop-up does not give the user a sense of control over the situation.Warning contains threeOr three or more buttons, or even need to scroll, which is a very bad experience, * * If you find that your needs contain two or more choices, consider using an action sheet. * *
- Provide concise and logical button copy.* * The best button copy consists of one or two words describing the result of the action.As with all button copy, please use uppercase capitalization and do not end with a punctuation mark.To the extent practicable, use verbs or verb phrases that relate to the warning title and information.For example, looking at all, responding, or ignoring, using “good” is the easiest way to accept, avoiding “yes” and “no.”
- The position of the button is what the user expects.* * In general, the button that the user prefers to click should be on the right side, and the "Cancel" button will always be on the left side.
- Use the cancel button appropriately, * * There should always be a button to cancel the warning, and the general text is "Cancel".
- Identify destructive buttons, * * If a button in a warning has destructive operational consequences, like deleting content, style such destructive buttons appropriately.For implementation details, you can refer to UIAlertActionStyleDestructive in UIAlertAction.Alternatively, a “Cancel” button is provided so the user can safely exit the disruptiveAction, make sure the "Cancel" button is bold by default.
- Use the home button to close the warning popup.* * When you click the home button, when the warning prompt will exit, it should have the same effect as clicking the cancel button. The warning prompt will exit with no other action. If your warning does not have a "Cancel" button, consider implementing a cancel operation in your code to implement the home button to cancel.
Source: __ keep_2 __
-
- Action Sheets * *
__ keep_0 __ A sheet is a style of popup that appears in the actual scene of two or more selections.Use a sheet to get the user to start the task, or request confirmation before using destructive actions.In the small screen, sheet pops up from the bottom.In the big screen sheet appears like a popover.
- Provide a cancel button for greater clarity.* * A cancel button should provide confidence when a user abandons a task.The cancel button should always be placed at the bottom of the sheet.
- Make destructive operations more prominent.* * Set the button text for destructive or dangerous actions to red and place the action at the top of the sheet.
- Avoid using scrolling in sheets, * * If a sheet has too many options, the user will definitely try to scroll through all the options, scrolling takes extra time to make a choice, and it's easy to accidentally click on a button.For implementation details, you can refer to UIAlertControllerStyleActionSheet in UIAlertController.
Source: __ keep_3 __