Skip to content

Commit

Permalink
Merge pull request #4715 from VladiMihaylenko/vm-rel
Browse files Browse the repository at this point in the history
[ios] SafariViewController
  • Loading branch information
igrechuhin authored Nov 11, 2016
2 parents 4472c50 + 20e11d5 commit 3862329
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions iphone/Maps/Categories/UIKitCategories.mm
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ @implementation UIViewController (SafariDelegateImpl)

- (void)safariViewControllerDidFinish:(SFSafariViewController *)controller
{
[self.navigationController popViewControllerAnimated:YES];
[self.navigationController dismissViewControllerAnimated:YES completion:nil];
}

@end
Expand All @@ -299,14 +299,8 @@ @implementation UIViewController (Safari)

- (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;
NSAssert(([scheme isEqualToString:@"http"] || [scheme isEqualToString:@"https"]), @"Incorrect
url's scheme!");
NSAssert(([scheme isEqualToString:@"http"] || [scheme isEqualToString:@"https"]), @"Incorrect url's scheme!");
if (isIOS8)
{
UIApplication * app = [UIApplication sharedApplication];
Expand All @@ -316,8 +310,7 @@ - (void)openUrl:(NSURL *)url
}
SFSafariViewController * svc = [[SFSafariViewController alloc] initWithURL:url];
svc.delegate = self;
[self.navigationController pushViewController:svc animated:YES];
*/
[self.navigationController presentViewController:svc animated:YES completion:nil];
}

@end
Expand Down

0 comments on commit 3862329

Please sign in to comment.