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!)