From fad44fb00ba6850fdffb9331e6daf0e67bbf7b79 Mon Sep 17 00:00:00 2001 From: Sami Samhuri Date: Sun, 3 May 2015 21:41:24 -0700 Subject: [PATCH] open links in Safari --- Blog/EditorViewController.m | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Blog/EditorViewController.m b/Blog/EditorViewController.m index 39e902c..583c8fe 100644 --- a/Blog/EditorViewController.m +++ b/Blog/EditorViewController.m @@ -424,13 +424,7 @@ static NSString *const StateRestorationModifiedPostKey = @"modifiedPost"; - (IBAction)tappedLinkButton:(id)sender { NSURL *currentURL = self.modifiedPost.url; if (currentURL) { - UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"TODO" message:@"show a web browser" preferredStyle:UIAlertControllerStyleAlert]; - __weak __typeof__(self) welf = self; - [alertController addAction:[UIAlertAction actionWithTitle:@"Dismiss" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) { - __typeof__(self) self = welf; - [self dismissViewControllerAnimated:YES completion:nil]; - }]]; - [self presentViewController:alertController animated:YES completion:nil]; + [[UIApplication sharedApplication] openURL:currentURL]; } else { [self addLinkFromPasteboard];