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?
Im storyboard for the segue:
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?
Im storyboard for the segue:
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
}
}
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