title: How to change the navigationBar color in UIDocumentInteractionController in iOS 15?
body: <p>Here's what I have tried so far:</p>
  <pre><code>func documentInteractionControllerViewControllerForPreview(_ controller: UIDocumentInteractionController) -&gt; UIViewController
  {
      navigationController?.navigationBar.barTintColor = UIColor.black
      navigationController?.navigationBar.backgroundColor = UIColor.black
      navigationController?.navigationBar.tintColor = UIColor.white
      navigationController?.navigationBar.isTranslucent = false
  
      return self.navigationController ?? self
  }
  </code></pre>
  <p>I have tried it using <code>UINavigationBar.appearance().barTintColor = UIColor.black</code>, still it didn't work.</p>
  <p>At best the navBar changes to translucent color of the previous ViewController.</p>
  <p>Blockquote</p>