I just removed the navigation bar shadow line with the following code :
self.navigationController?.navigationBar.setBackgroundImage(UIImage(), for: UIBarMetrics.default)
self.navigationController?.navigationBar.shadowImage = UIImage()
When I use this code and I try to open another page which belongs to the same navigation controller, its navigation bar looks different. I'm trying to set the same navigation bar background color and tint color, but it doesn't work. However, when I remove these codes, all the pages that I use work normally. How can I fix this issue?
Screenshots :