Search code examples
iosobjective-cxcodeuinavigationcontrollerxib

UINavigationController pushViewController with xib file


I have my app, which I haven't used any .xib files to create the UI, until now. I created a ViewController with a xib file, when I push this ViewController. I get 2 navigationbars.

So basically this means... I have been creating my UINavigationController programmatically, and when I put an navigation bar at the top, I get 2 navigation bars.

Somebody can help me out? Thanks.


Solution

  • UINavigationController adds a navigation bar automatically. If your xib contains another UINavigationBar, there will be two.

    Nothing complicated about this :)