Alex Rivera | Logout

UIAlertView: Where the cancel button should be?

Asked 2011-07-05T12:39:28.163
27

The alert views in iOS system:

  • Install App OTA: the cancel button is on the LEFT.
  • Delete an App: the cancel button is on the RIGHT.

Where the cancel button should be?

Edit
Report

1 Answer

3

If you set the text for the cancel button in the initializer, iOS will take care of this for you.

As the Human Interface Guidelines say:

In a two-button alert that proposes a potentially risky action, the button that cancels the action should be on the right (and light-colored).

Although, in practice, you may be labeling your buttons with something other than the generic label. (I have Yes/No) alerts in many circumstances. As your example from Apple shows, this part of the HIG won't be a deal breaker for your app.

answered 2011-07-05T12:55:54.320

Your Answer