title: Changing UIActivityViewController share modal navigation bar to opaque on iOS15
body: <p>I'm getting a transparent navigation bar in share modal controllers on iOS 15. But navbar appearance were properly set already and is not changed at any part of the app. This issue only happens from uiactivity share modals and not all .</p>
  <p><strong>Appearance setup</strong></p>
  <pre><code> // AppDelegate.swift
  
  if #available(iOS 13.0, *) {
          let appearance = UINavigationBarAppearance()
          appearance.configureWithOpaqueBackground()
          appearance.backgroundColor = .white
          appearance.shadowImage = nil
          appearance.shadowColor = .clear
          appearance.titleTextAttributes = [
              NSAttributedString.Key.font: UIFont.BananaGrotesk(weight: .semibold, size: 16.0),
              NSAttributedString.Key.foregroundColor: UIColor.Function.black
          ]
          navBarAppearance.barTintColor = .white
          navBarAppearance.standardAppearance = appearance
          navBarAppearance.scrollEdgeAppearance = appearance
          navBarAppearance.compactAppearance = appearance
      } else {
          navBarAppearance.isTranslucent = false
          navBarAppearance.backgroundColor = .white
          
          //  Remove bottom line aka shadow
          navBarAppearance.shadowImage = UIImage()
          navBarAppearance.setBackgroundImage(UIImage(), for: .default)
          navBarAppearance.tintColor = .clear
          navBarAppearance.layer.shadowOpacity = 0
          //  Update bar title font
          navBarAppearance.titleTextAttributes = [
              NSAttributedString.Key.font: UIFont.BananaGrotesk(weight: .semibold, size: 16.0),
              NSAttributedString.Key.foregroundColor: UIColor.Function.black
          ]
      }
   }
  </code></pre>
  <hr />
  <p><strong>What I've tried and it does nothing.</strong></p>
  <pre><code>func presentShareActivity(items: [Any]) {
      //let activityVC = UIActivityViewController(activityItems: items, applicationActivities: nil)
      let activityVC = UIActivityViewController(activityItems: [&quot;test share copy&quot;], applicationActivities: nil)
      
      if #available(iOS 13.0, *) {
          let appearance = UINavigationBarAppearance()
          appearance.configureWithOpaqueBackground()
          appearance.backgroundColor = .white
          appearance.shadowImage = nil
          appearance.shadowColor = .clear
          appearance.titleTextAttributes = [
              NSAttributedString.Key.font: UIFont.BananaGrotesk(weight: .semibold, size: 16.0),
              NSAttributedString.Key.foregroundColor: UIColor.Function.black
          ]
          activityVC.navigationItem.scrollEdgeAppearance = appearance
          activityVC.navigationItem.standardAppearance = appearance
          activityVC.navigationItem.compactAppearance = appearance
          activityVC.navigationController?.navigationBar.isTranslucent = false
          activityVC.navigationController?.navigationBar.scrollEdgeAppearance = appearance
          activityVC.navigationController?.navigationBar.standardAppearance = appearance
          activityVC.navigationController?.navigationBar.compactAppearance = appearance
      }
      present(activityVC, animated: true)
  }
  </code></pre>
  <p><strong>Screenshots</strong></p>
  <p>Navigation bar is transparent but turns opaque on scroll. I want this to be opaque</p>
  <p><a href="https://i.stack.imgur.com/sz3wa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sz3wa.png" alt="enter image description here" /></a></p>
  <p>Interestingly the photo below uses the same code but has an opaque navbar</p>
  <p><a href="https://i.stack.imgur.com/jtEh0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jtEh0.png" alt="enter image description here" /></a></p>