I want to implement a translucent NavigationBar so underlying objects are visible.
It should look like here:
This view is a custom view which uses alpha value to achieve the translucency behavior.
I tried this to implement my custom NavigationBar like this:
UINavigationBar.appearance().barTintColor = .white
UINavigationBar.appearance().tintColor = UIColor(netHex: CxtColor.black.rawValue)
UINavigationBar.appearance().shadowImage = UIImage()
UINavigationBar.appearance().isTranslucent = true
UINavigationBar.appearance().setBackgroundImage(UIImage(), for: .default)
UINavigationBar.appearance().inputView?.alpha = 0.4
UINavigationBar.appearance().alpha = 0.4
But its not translucent and also the changing of the alpha value has no really effect on the NavigationBar. Its just a white navigationbar.
I don't want to create a full transparent navigationbar.
]you can access navigationBackgroundView
self.navigationController?.navigationBar.isTranslucent = true
let navigationBackgroundView = self.navigationController?.navigationBar.subviews.first
navigationBackgroundView?.alpha = 0.3