I want to add an action to the Retry button, but when the user clicks the Retry button, nothing happens.
var createAccountErrorAlert: UIAlertView = UIAlertView() createAccountErrorAlert.delegate = self createAccountErrorAlert.title = "Oops" createAccountErrorAlert.message = "Could not create account!" createAccountErrorAlert.addButtonWithTitle("Dismiss") createAccountErrorAlert.addButtonWithTitle("Retry") createAccountErrorAlert.show()
Function for determining the index of the pressed button?
func alertView(View: UIAlertView!, clickedButtonAtIndex buttonIndex: Int){ switch buttonIndex{ case 1: createAccount() default:
ios swift
Stephen fox
source share