Put this code in viewDidAppear:
let safariViewController = SFSafariViewController(URL: url) presentViewController(safariViewController, animated: true) { var frame = safariViewController.view.frame let OffsetY: CGFloat = 64 frame.origin = CGPoint(x: frame.origin.x, y: frame.origin.y - OffsetY) frame.size = CGSize(width: frame.width, height: frame.height + OffsetY) safariViewController.view.frame = frame }
To hide the View controller-based status bar appearance , set the View controller-based status bar appearance to YES in your info.plist file and paste it into your view controller.
override func prefersStatusBarHidden() -> Bool { return true }
Warning I suggest you use the SFSafariViewController to view in full screen mode, since a reboot is not possible (since the reload button is in the UINavigationBar). If the request fails, the application will be useless. Instead, go to full-screen WKWebView with a customizable toolbar.
Update : To avoid hiding the reset button, simply add a view / imageView above the "done" button in your SFSafariViewController and a render button that is invisible or at least not recyclable.
presentViewController(svc, animated: true) { let width: CGFloat = 66 let x: CGFloat = self.view.frame.width - width
The problem with this approach is only that the overlay remains on the screen, but if you can find a nice image for it, you'll be fine.
source share