Earlier, I was using iOS 6.1 for my project. Recently I have switched to iOS 7. For, a lot of changes I knew, I updated my code.. But I have observed a strange behavior. My
For me the best way for transparent Navigation Bar is to change the shadowImage and backgroundImage of the bar.
navigationController?.navigationBar.isTranslucent = true
navigationController?.navigationBar.backgroundColor = nil
navigationController?.navigationBar.setBackgroundImage(UIImage(named: "navBarBackground")?.resizableImage(withCapInsets: .zero, resizingMode: .stretch), for: .default)
navigationController?.navigationBar.shadowImage = UIImage()