Reputation: 107
How can I make the 'OK' click in an alert direct the user to another view?
Thanks
Upvotes: 0
Views: 67
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