mirror of
https://github.com/samsonjs/samhuri.net-ios.git
synced 2026-03-25 09:25:47 +00:00
open links in Safari
This commit is contained in:
parent
dc25824cd3
commit
fad44fb00b
1 changed files with 1 additions and 7 deletions
|
|
@ -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];
|
||||
|
|
|
|||
Loading…
Reference in a new issue