【问题标题】:Safari ViewController with enabled address bar启用地址栏的 Safari ViewController
【发布时间】: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


    【解决方案1】:

    无法按照here 的描述编辑 SFSafariViewController 的 URL。

    在 Apple developer site 他们也提到了这一点:

    带有安全指示器和 Reader 的只读地址字段 按钮

    希望对您有所帮助!

    【讨论】:

    猜你喜欢
    • 2021-09-06
    • 1970-01-01
    • 2011-08-11
    • 1970-01-01
    • 2021-11-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多