I googled for similar issues, but none of them actually solves this. I tried to push from a view controller with normal navigation bar, to a new view controller with transparent navigation bar. This is the code in 2nd view controller that I used to set navigation bar transparent
self.navigationController?.navigationBar.setBackgroundImage(UIImage(), for: .default)
self.navigationController?.navigationBar.shadowImage = UIImage()
navigationController?.navigationBar.barTintColor = .clear
self.navigationController?.navigationBar.isTranslucent = true
How can I get a smooth transition without having a piece of light gray on navigation bar during transition?