iOS Beginner: UIAlertView Window with 3 Buttons > Check what button was pressed
问题 I have a working code from a tutorial but don't understand it completely. Situation: After a button was pressed in my iPhone App an AlertView appears with three buttons. Now I like to check what button the user pressed. CODE FROM THE TUTORIAL: - (IBAction)infoButtonPressed:(id)sender { UIAlertView *myAlert1 = [[UIAlertView alloc]initWithTitle:@"My Alert View 1" message:@"Here we go" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Option1", @"Option2", nil]; [alert show]; } -