Protocol: UIAlertViewDelegate
Overview
The UIAlertViewDelegate protocol defines the methods a delegate of a UIAlertView object should implement. The delegate implements the button actions and any other custom behavior. Some of the methods defined in this protocol are optional.Sent to the delegate when the user clicks a button on an alert view.Sent to the delegate after an alert view is dismissed from the screen.Sent to the delegate before an alert view is dismissed.Sent to the delegate before an alert view is canceled.Sent to the delegate to determine whether the first non-cancel button ion the alert should be enabled.Sent to the delegate after an alert view is presented to the user. Sent to the delegate before a model view is presented to the user.
Instance Method Summary (collapse)
-
- alertView:clickedButtonAtIndex:
Sent to the delegate when the user clicks a button on an alert view.
-
- alertView:didDismissWithButtonIndex:
Sent to the delegate after an alert view is dismissed from the screen.
-
- alertView:willDismissWithButtonIndex:
Sent to the delegate before an alert view is dismissed.
-
- alertViewCancel:
Sent to the delegate before an alert view is canceled.
-
- alertViewShouldEnableFirstOtherButton:
Sent to the delegate to determine whether the first non-cancel button ion the alert should be enabled.
-
- didPresentAlertView:
Sent to the delegate after an alert view is presented to the user.
-
- willPresentAlertView:
Sent to the delegate before a model view is presented to the user.
Instance Method Details
- (Object) alertView(alertView, clickedButtonAtIndex:buttonIndex)
Sent to the delegate when the user clicks a button on an alert view. The receiver is automatically dismissed after this method is invoked.
- (Object) alertView(alertView, didDismissWithButtonIndex:buttonIndex)
Sent to the delegate after an alert view is dismissed from the screen. This method is invoked after the animation ends and the view is hidden.
- (Object) alertView(alertView, willDismissWithButtonIndex:buttonIndex)
Sent to the delegate before an alert view is dismissed. This method is invoked before the animation begins and the view is hidden.
- (Object) alertViewCancel(alertView)
Sent to the delegate before an alert view is canceled. If the alert view’s delegate does not implement this method, clicking the cancel button is simulated and the alert view is dismissed. Implement this method if you need to perform some actions before an alert view is canceled. An alert view can be canceled at any time by the system—for example, when the user taps the Home button. The alertView:willDismissWithButtonIndex: and alertView:didDismissWithButtonIndex: methods are invoked after this method.
- (Boolean) alertViewShouldEnableFirstOtherButton(alertView)
Sent to the delegate to determine whether the first non-cancel button ion the alert should be enabled.
- (Object) didPresentAlertView(alertView)
Sent to the delegate after an alert view is presented to the user.
- (Object) willPresentAlertView(alertView)
Sent to the delegate before a model view is presented to the user.