1

I'm using Safari ViewController and address bar is disabled. How can I make it enabled so user can enter other url?

enter image description here

Here is the code that I'm using

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)
    }
}
Dipu Raj
  • 1,784
  • 4
  • 29
  • 37

1 Answers1

3

It is unable to edit SFSafariViewController 's URL as described here.

And in Apple developer site they mentioned that too:

A read-only address field with a security indicator and a Reader button

Hope this help!

Nhat Dinh
  • 3,378
  • 4
  • 35
  • 51