Skip to content

iOS 15 Nav Appearance Updates Remove Transparent Navigation Bar in photo viewer #348

@justColbs

Description

@justColbs

The navigation bar in the overlayView is using the global values I set in my AppDelegate, but only in iOS 15. My AppDelegate:

if #available(iOS 13.0, *) {
            let ap = UINavigationBarAppearance()
            ap.backgroundColor = UIColor.HBlue()
            ap.titleTextAttributes = convertToOptionalNSAttributedStringKeyDictionary([NSAttributedString.Key.foregroundColor.rawValue: UIColor.white, NSAttributedString.Key.font.rawValue: Constants.Fonts.NavigationItemTitleFont!])!
            UINavigationBar.appearance().scrollEdgeAppearance = ap
            UINavigationBar.appearance().standardAppearance = ap
}
        UINavigationBar.appearance().isTranslucent = false

I've seen this issue, but it's recommended solution didn't work for me. iOS 15 introduces some different changes to UINavigationBar's appearance and I believe that's causing this issue.

Any workaround for this so that the navigation bar on the photo viewer remains transparent?

The issue:
Simulator Screen Shot - iPhone 12 - 2022-02-02 at 15 21 52

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions