This is not in code but in IB. It happens when the second view controller presentation is set to "Over Full Screen".
I managed to fix it by setting the Navigation Bar appearance
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: