I THINK it is called the status bar? The one with the power meter, clock etc. Took me ages to work out to "hide" it but all it did was hide the icons, it is still taking real-estate. And so, when the wkwebview scrolls up, its scrolls under the status bar and looks awful.
I either want to completely hide the status bar or have it there but block colour so nothing can be seen under it. I have looked at 100 SO questions that talk about app settings in xcode, info.plist, appdelegate settings, viewcontroller settings, navigationcontroller settings (mine is hidden), but nothing gets round this.
Things Tried:
This code in ViewController
override func prefersStatusBarHidden() -> Bool { return true }
in AppDelegate
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { application.statusBarHidden = true return true }
HELP PLEASE!
Screenshot:
Turns out I was previously compensating for the status bar being there with:
webView.scrollView.contentInset = UIEdgeInsets(top: 20, left: 0, bottom: 0, right: 0)
changed the top value to 0
and along with the 5 steps in the question and that has worked.