0

I try this: Can I preload the web content for Safari View Controller? but done button on SFSafariVC not working

let svc = SFSafariViewController(URL: NSURL(string: self.SiteURL)!)
self.presentViewController(self.svc, animated: true, completion: nil)

Here is swift version of Can I preload the web content for Safari View Controller? (for me not working Done Button)

let svc = SFSafariViewController(URL: NSURL(string: self.SiteURL)!)

    addChildViewController(svc)
    svc.didMoveToParentViewController(self)

    svc.view.frame = view.frame
    containerView.frame = view.frame
    containerView.backgroundColor = UIColor.redColor()
    safariView = svc.view
    view.addSubview(safariView!)
    view.addSubview(containerView)

    view.sendSubviewToBack(safariView!)
Community
  • 1
  • 1
Adrian
  • 1
  • 2

1 Answers1

0

This feature is not supported with the current implementation of SFSafariViewController. Your best option right now is to use WKWebView and begin loading before it's added to the hierarchy.

Edison
  • 11,881
  • 5
  • 42
  • 50