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

The left button does the main action and the right button dismisses the alert.

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: