status bar disappeared after full screen video in WKWebView only in iOS 12 : <p>As you can see this only happened in iOS 12.</p>

<p>iOS 12 &emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp; &emsp;&emsp;iOS 11     </p>

<p><a href="https://i.stack.imgur.com/XLq2T.gif" rel="noreferrer"><img src="https://i.stack.imgur.com/XLq2T.gif" alt="enter image description here"></a>&emsp;<a href="https://i.stack.imgur.com/C9zt9.gif" rel="noreferrer"><img src="https://i.stack.imgur.com/C9zt9.gif" alt="enter image description here"></a></p>

<p>here is my code: </p>

<pre><code>import UIKit
import WebKit

class ViewController: UIViewController {

    override var preferredStatusBarStyle: UIStatusBarStyle {
        return .lightContent
    }

    override var prefersStatusBarHidden: Bool {
        return false
    }

    var webView: WKWebView!

    override func viewDidLoad() {
        super.viewDidLoad()
        webView = WKWebView(frame: UIScreen.main.bounds)
        view.addSubview(webView)
        webView.topAnchor.constraint(equalTo: view.topAnchor).isActive = true
        webView.leadingAnchor.constraint(equalTo: view.leadingAnchor).isActive = true
        webView.widthAnchor.constraint(equalTo: view.widthAnchor).isActive = true
        webView.loadHTMLString("&lt;p&gt;&lt;iframe src=\"https://www.youtube.com/embed/HCjNJDNzw8Y\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen=\"\"&gt;&lt;/iframe&gt;&lt;/p&gt;", baseURL: URL(string: "https://www.youtube.com/"))
        setNeedsStatusBarAppearanceUpdate()
    }
}
</code></pre>

<p>my info.plist is right below:
<a href="https://i.stack.imgur.com/LY1L6.png%60" rel="noreferrer"><img src="https://i.stack.imgur.com/LY1L6.png%60" alt="enter image description here"></a></p>

<p>Does anyone know how to solve it? </p>

<p>I know that if I set the key <code>View controller-based status bar appearance</code> to <code>YES</code> will help, but In that case it will look like this:</p>

<p><a href="https://i.stack.imgur.com/wk7OR.gif" rel="noreferrer"><img src="https://i.stack.imgur.com/wk7OR.gif" alt="enter image description here"></a></p>

<p>There are unknown reason for changing status bar from white and black, and as for my real project is in a large scale, so it will be nice to solve in the original setting, rather than make every ViewController inherit from one class which is subclass from UIViewController or add <code>dynamic</code> for overriding <code>prefersStatusBarHidden</code> and <code>preferredStatusBarStyle</code> in extension (here just try to force it show update status bar when <code>View controller-based status bar appearance</code> set to <code>YES</code>)</p>

<p>Hope there is a solution for <code>View controller-based status bar appearance</code> set to <code>NO</code>, that will be very helpful thx.</p>

<p><strong><a href="https://github.com/andrew54068/WebViewStatusBar" rel="noreferrer" title="demo project">here</a></strong> is the demo project, it was created by Xcode9.4, feel free to try it with.</p>
