skip to Main Content

So I just updated to iOS 15 and Xcode 13, and when I present a view controller, the top nav bar is invisible, however, the top nav title and buttons are still there. How do I fix this?

enter image description here

Im storyboard for the segue:

enter image description here

2

Answers


  1. This is a change Apple implemented and occurs on iOS 15 for an app compiled with Xcode 13. They have changed the default nav bar appearance to transparent rather then translucent. You can change it back to translucent with UINavigationBarAppearance and its .configureWithDefaultBackground() method.

    There’s a good blog post on this at: iOS 15 Nav bar changes

    Login or Signup to reply.
  2. If you are using Xcode 13 this will help:

    private func setupAppearance() {
        let navBarAppearance = UINavigationBarAppearance()
        navBarAppearance.configureWithOpaqueBackground()
        UINavigationBar.appearance().standardAppearance = navBarAppearance
        UINavigationBar.appearance().scrollEdgeAppearance = navBarAppearance
    
        if #available(iOS 15.0, *) {
            let tabBarAppearance = UITabBarAppearance()
            tabBarAppearance.configureWithOpaqueBackground()
            UITabBar.appearance().standardAppearance = tabBarAppearance
            UITabBar.appearance().scrollEdgeAppearance = tabBarAppearance
        }
    }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search