iOS 15 Navigation Bar issue
Change alpha from 0 to 1 on your backgroundColor property
func customNavigationBar() {
let coloredAppearance = UINavigationBarAppearance()
coloredAppearance.configureWithTransparentBackground()
coloredAppearance.backgroundColor = UIColor(
red: 41/255,
green: 59/255,
blue: 77/255,
alpha: 1) //alpha: 0 is Transparent and alpha: 1 is colored
coloredAppearance.shadowColor = .clear
coloredAppearance.titleTextAttributes = [.foregroundColor: UIColor.white]
coloredAppearance.largeTitleTextAttributes = [.foregroundColor: UIColor.white]
UINavigationBar.appearance().standardAppearance = coloredAppearance
UINavigationBar.appearance().compactAppearance = coloredAppearance
UINavigationBar.appearance().scrollEdgeAppearance = coloredAppearance
UINavigationBar.appearance().tintColor = .white
}
Making status bar opaque on iOS = 15
its impossible to make status bar opaque (and colorized) while navigation controller is hidden (not visible) on iOS >= 15?
This has nothing to do with iOS 15. There is nothing new in iOS 15 affecting the status bar. The status bar has been transparent for something like 6 or 7 years now. (I don't have time to figure out when this change happened; the point is, it's ancient history.) There is no such thing as an opaque and/or colorized status bar, and there hasn't been for all that time. The navigation bar transparency / opacity does not affect the status bar transparency in any way. If the status bar shows the navigation bar behind it, fine; you seem to like that. If you don't like the color of what's behind the status bar when the navigation bar is hidden or transparent, change whatever's visible behind the status bar.
Change current colour of NavigationBar in iOS15
the NavBar current-colour change based on user input while the app is running(after application(didFinisLaunching) has been called) is not working
You cannot change a navigation bar color while that navigation bar is showing by using the appearance
proxy. The appearance
proxy affects only future interface elements. You need to apply your UINavigationBarAppearance to the existing navigation bar directly:
self.navigationController?.navigationBar.standardAppearance = appearance
self.navigationController?.navigationBar.scrollEdgeAppearance = appearance
Related Topics
Swift Dictionary Default Value
How to Change Back Button Title on Navigation Controller in Swift3
Swift - Could Not Cast Value of Type '_Nscfstring' to 'Nsdictionary'
How to Animate a Model's Rotation in Realitykit
Avaudioengine Downsample Issue
Trouble Using Callbacks with Cgpattern in Swift3
Uitableviewautomaticdimension Not Working for Resizing Cell Height
How to Access a Shadowed Top Level Function in Swift
Read-Only Properties of Protocols in Swift
Iboutlet of Another View Controller Is Nil
Returning a Value from a Function with Alamofire and Swiftyjson
Using Combine's Future to Replicate Async Await in Swift
Firebase: How to Update Multiple Nodes Transactionally? Swift 3
Change Color Searchbar Result Icon Swift
How to Make an Array of the Current Week Dates Swift