forked from organicmaps/organicmaps
[ios] Open urls in system safari.
This commit is contained in:
parent
3a4658ca45
commit
8ad7fd9cda
1 changed files with 8 additions and 1 deletions
|
@ -344,8 +344,14 @@
|
|||
|
||||
- (void)openUrl:(NSURL *)url
|
||||
{
|
||||
UIApplication * app = [UIApplication sharedApplication];
|
||||
if ([app canOpenURL:url])
|
||||
[app openURL:url];
|
||||
// TODO(Vlad): Correct implementation of navigation controller's buttons.
|
||||
/*
|
||||
NSString * scheme = url.scheme;
|
||||
if ((isIOS7 || isIOS8) && (![scheme isEqualToString:@"http"] || ![scheme isEqualToString:@"https"]))
|
||||
NSAssert(([scheme isEqualToString:@"http"] || [scheme isEqualToString:@"https"]), @"Incorrect url's scheme!");
|
||||
if ((isIOS7 || isIOS8))
|
||||
{
|
||||
UIApplication * app = [UIApplication sharedApplication];
|
||||
if ([app canOpenURL:url])
|
||||
|
@ -355,6 +361,7 @@
|
|||
SFSafariViewController * svc = [[SFSafariViewController alloc] initWithURL:url];
|
||||
svc.delegate = self;
|
||||
[self.navigationController pushViewController:svc animated:YES];
|
||||
*/
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Loading…
Add table
Reference in a new issue