Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Write the following lines in your ios app if you want to open a website in safari view controller. Once you trigger this code from inside your app, it will open Safari view controller with the given website.
- NSURL *url = [NSURL URLWithString:@"https://developer.amazon.com"];
- NSLog(@"Opening following URL: %@ with SafariViewController.", url.absoluteString);
- SFSafariViewController *safariVC = [[SFSafariViewController alloc] initWithURL:url];
- [self presentViewController:self.safariVC animated:YES completion:nil];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement