Skip to content

Instantly share code, notes, and snippets.

@marcos1262
Last active October 27, 2018 14:26
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save marcos1262/1ed3791b59aa4ed55a52e66224907eb7 to your computer and use it in GitHub Desktop.
Open URL in Safari Modal
import SafariServices
func openURL(from urlString: String) {
guard let url = URL(string: urlString) else { return }
let svc = SFSafariViewController(url: url)
self.present(svc, animated: true, completion: nil)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment