Skip to content

Instantly share code, notes, and snippets.

@328
Created April 5, 2018 06:06
Show Gist options
  • Save 328/f61368d2f31743a3d40c48031f7938ef to your computer and use it in GitHub Desktop.
Save 328/f61368d2f31743a3d40c48031f7938ef to your computer and use it in GitHub Desktop.
SFSafariViewControllerのテスト
import UIKit
import SafariServices
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
}
override func viewDidAppear(_ animated: Bool) {
let webPage = "http://localhost:8080/refrects"
let safariVC = SFSafariViewController(url: NSURL(string: webPage)! as URL)
present(safariVC, animated: true, completion: nil)
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment