title: iOS 13 Status bar style invalid (childForStatusBarStyle never called)
body: <p>I've been searching a lot, but didn't find the same problem as my on <strong>StackOverflow</strong> or anywhere else.</p>
  <hr />
  <h2>Setup</h2>
  <ul>
  <li><code>Info.plist</code>
  <ul>
  <li><code>ViewControllerBasedStatusBar</code> set to <code>YES</code></li>
  <li><code>StatusBarStyle</code> set to <code>.lightContent</code></li>
  <li><code>UserInterfaceStyle</code> set to <code>.light</code> (app doesn't support <code>.dark</code> mode)</li>
  </ul>
  </li>
  <li>Each <code>UIViewController</code> has its own implementation of <code>preferredStatusBarStyle</code>:
  <pre><code>override var preferredStatusBarStyle: UIStatusBarStyle {
      return .lightContent
  }
  </code></pre>
  </li>
  <li><code>UITabBarController</code> has <code>extension</code>:
  <pre><code>open override var childForStatusBarStyle: UIViewController? {
      return selectedViewController
  }
  </code></pre>
  </li>
  <li><code>UINavigationController</code> has <code>extension</code>:
  <pre><code>override open var childForStatusBarStyle: UIViewController? {
      return topViewController
  }
  </code></pre>
  </li>
  </ul>
  <hr />
  <h2>Problem</h2>
  <p><strike>Since iOS 13 released my status bar logic was broken and I can't understand why. On iOS &lt;= 12.4 everything works properly. <code>childForStatusBarStyle</code> is never called and each viewController has some random style</strike>.</p>
  <p><strong>UPDATE</strong>: Since iOS 13 released status has style based on <code>UserInterfaceStyle</code> set global, not based on <code>preferredStatusBarStyle</code>(with proper setup) in case of <code>UITabBarController</code> -&gt; <code>UINavigationController</code> -&gt; <code>UIViewController</code> hierarchy.</p>
  <hr />
  <h2>Question</h2>
  <p>The question is how to solve this problem? Did something silently changed in this logic? (Checked many articles and changelogs)</p>
  <hr />
  <h2>Reproduction</h2>
  <p>I've been able to reproduce the bug in the sample project with everything set up as mentioned above.</p>
  <p><a href="https://github.com/Erumaru/ios-status-bar-bug" rel="nofollow noreferrer">Here</a> I have github project which contains view hierarchy as follows:</p>
  <pre><code>CustomTabBarController
   - UINavigationController
     - CustomViewController
   - CustomViewController
  </code></pre>
  <p>Now, when you select the first tab app has dark style status bar, when the second selected light style one. CustomViewController has <code>preferredStatusBarStyle</code> set to <code>.lightContent</code>.</p>
  <p><strong>More</strong>:</p>
  <ul>
  <li><strong>Xcode</strong>: Version 11.5 (11E608c)</li>
  <li><strong>Device</strong>: iPhone 8 Simulator</li>
  <li><strong>iOS</strong>: Version 13.5</li>
  </ul>
  <hr />
  <p><strong>P.S:</strong> I'm ready and will provide more details on the topic, don't hesitate to ask me to do so. Project is running more than 2 years and thing like this is really to debug :)</p>