Transparent iOS navigation bar
You can apply Navigation Bar Image like below for Translucent.
Objective-C:
[self.navigationController.navigationBar setBackgroundImage:[UIImage new]
forBarMetrics:UIBarMetricsDefault]; //UIImageNamed:@"transparent.png"
self.navigationController.navigationBar.shadowImage = [UIImage new];////UIImageNamed:@"transparent.png"
self.navigationController.navigationBar.translucent = YES;
self.navigationController.view.backgroundColor = [UIColor clearColor];
Swift 3:
self.navigationController?.navigationBar.setBackgroundImage(UIImage(), for: .default) //UIImage.init(named: "transparent.png")
self.navigationController?.navigationBar.shadowImage = UIImage()
self.navigationController?.navigationBar.isTranslucent = true
self.navigationController?.view.backgroundColor = .clear
Tab & Navigation Bar changes after upgrading to XCode 13 (& iOS 15)
About Navigation Bar is black, try do it:
let appearance = UINavigationBarAppearance()
appearance.configureWithOpaqueBackground()
appearance.backgroundColor = .red
appearance.titleTextAttributes = [.font:
UIFont.boldSystemFont(ofSize: 20.0),
.foregroundColor: UIColor.white]
// Customizing our navigation bar
navigationController?.navigationBar.tintColor = .white
navigationController?.navigationBar.standardAppearance = appearance
navigationController?.navigationBar.scrollEdgeAppearance = appearance
I wrote a new article talking about it.
https://medium.com/@eduardosanti/uinavigationbar-is-black-on-ios-15-44e7852ea6f7
Related Topics
Swift Compiler Error Int Is Not Convertible to Cgfloat
Create a Navigationlink Without Back Button Swiftui
How to Get Mouse Location with Swiftui
How to Define Static Constant in a Generic Class in Swift
How to Unwrap Arbitrarily Deeply Nested Optionals in Swift
Toolbar Is Deleting My Back Button in the Navigationview
Ambigious Reference to Member Request() Issues with Alamofire After Migration to Swift 3
Xcodebuild -Exportarchive Wont Allow Me to Specify Filename
Swift Array to Array of Tuples
Swift: Reflecting Properties of Subclass of Nsmanagedobject
Why 'Self.Self' Compiles and Run in Swift
Fullscreen for Swift Playgrounds on iPad
Checking User Location Permission Status on iOS 14
Xcode Build Perfect Failure -- Copenssl Not Found
Xcframework Issue, a Library with the Identifier "Ios-Armv7_Arm64" Already Exists
How Would I Create a Constant That Could Be One of Several Strings Depending on Conditions