简体   繁体   中英

UIAlertView action and cancel buttons

I've been researching and analyzing and I realize that the buttons from the UIAlertView don't have a similarity between buttons and actions.


防爆。 01
The left button does the main action and the right button dismisses the alert.

防爆。 02
The left button dismisses the alert and the right button does the main action.


In the documentation, the "cancelButtonTitle" (right button) is the title of the cancel button , but it doesn't clarify if this button is really the one that dismisses the alert or the one that does the main action.

Well, my question is: there's pattern about buttons or anyone can do any action?

From Apple HIG:

A button that initiates an action is furthest to the right. This rightmost button, called the action button, confirms the main point of the dialog. The Cancel button is to the left of the action button.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM