Why is the UINavigationBar turning black?
Solution 1:
I had a very similar problem recently. Try setting self.navigationController?.navigationBar.translucent = true
in both view controllers and self.edgesForExtendedLayout = UIRectEdgeNone
.
Storyboard version: Extended Edges - Under Top Bars
Solution 2:
I ran into this again recently, and discovered a way to fix it in the storyboard. If you're using opaque navigation bars, ensure the "Extend Edges" setting for "Under Opaque Bars" is set. In fact, I just set all three of them as shown below:-