我正在使用 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)
}
}
最佳答案
无法按照描述编辑 SFSafariViewController 的 URL here .
在苹果中developer site他们也提到了这一点:
A read-only address field with a security indicator and a Reader button
希望对您有所帮助!
关于ios - 启用地址栏的 Safari ViewController,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41564845/