[Solved] Open a link when alert ok button is pressed [closed]

You don’t actually need pathAlert.delegate = self. You’ve already set the delegate in the initWithTitle:message:delegate:cancelButtonTitle:otherButtonTitles: method call. In your .h file, you need to do this: @interface YourViewControllerName : UIViewController <UIAlertViewDelegate> And in the .m file add this method: – alertView:(id)alert didDismissWithButton:(int)index { [[UIpplication sharedApplication] openURL:[NSURL URLWithString:@”foo”]; } Alternatively, and possibly better might be to … Read more