I'm looking for a good way to make a transparent navigation bar.
With this :
func prepareNavigationBar(){
UINavigationBar.appearance().tintColor = UIColor.mainColor()
UINavigationBar.appearance().setBackgroundImage(UIImage(), forBarMetrics: .Default)
UINavigationBar.appearance().shadowImage = UIImage()
UINavigationBar.appearance().translucent = true
}
It work for every view, except after push. The view after push loose the transparency effect...
Have you any idea ?
Thank your
func prepareNavigationBar(){
UINavigationBar.appearance().setBackgroundImage(UIImage(), forBarMetrics: .Default)
UINavigationBar.appearance().translucent = true
UINavigationBar.appearance().backgroundColor = UIColor.clearColor()
}
Try this.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.