user2308343
user2308343

Reputation: 107

Loading a new View After UIAlert gets closed

How can I make the 'OK' click in an alert direct the user to another view?

Thanks

Upvotes: 0

Views: 67

Answers (1)

Dipen Panchasara
Dipen Panchasara

Reputation: 13600

Set UIAlertViewDelegate delegate in you viewController.h file

Dont forget to set delegate while initialising UIAlertView Object

then implement following method in your .m file, and write your redirect code in it

- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex  // after animation
{
    // Your redirect code goes here
}

Upvotes: 2

Related Questions