mirror of
https://github.com/samsonjs/samhuri.net-ios.git
synced 2026-04-27 15:07:44 +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 {
|
- (IBAction)tappedLinkButton:(id)sender {
|
||||||
NSURL *currentURL = self.modifiedPost.url;
|
NSURL *currentURL = self.modifiedPost.url;
|
||||||
if (currentURL) {
|
if (currentURL) {
|
||||||
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"TODO" message:@"show a web browser" preferredStyle:UIAlertControllerStyleAlert];
|
[[UIApplication sharedApplication] openURL:currentURL];
|
||||||
__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];
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
[self addLinkFromPasteboard];
|
[self addLinkFromPasteboard];
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue