【发布时间】:2017-05-24 16:58:37
【问题描述】:
我正在使用 Safari ViewController 并且地址栏被禁用。如何启用它以便用户可以输入其他网址?
这是我正在使用的代码
class ViewController: UIViewController, SFSafariViewControllerDelegate {
override func viewDidLoad() {
super.viewDidLoad()
}
@IBAction func showSafariVC(_ sender: AnyObject) {
let svc = SFSafariViewController(url: NSURL(string: "http://www.google.com") as! URL)
svc.delegate = self
present(svc, animated: true, completion: nil)
}
}
【问题讨论】:
标签: ios swift xcode button sfsafariviewcontroller