This "top bar - navigation bar" in InterfaceBuilder is known as "Simulated Metric". This will help you build your presentation at the right interval when other visual elements - a status bar, navigation bar or tab bar - can consume part of the deviceโs on-screen real estate. This actually does nothing but reduce the vertical dimensions of the view defined by the NIB. The goal is to help you post your opinion, and not create a component that will appear in your application.
If you want a navigation bar, you have two options. The first choice is to use the navigation controller (from which your original view should be the root) and call
[self.navigationController pushViewController:newVC animated:YES]
The process of setting up a navigation controller, etc. is non-trivial, and you should do some searches to find the best way to do this for your application. For a simple application, especially if you are just learning iOS, you can use the Navigation Application template when creating a new project. With navcon, you get all the bizarre behavior that is usually associated with this top bar - an automatic return button, fantastic left / right scrolling when moving to a detailed view, etc.
The second option is to place the โfakeโ navigation bar in a detailed view using the Navigation Bar object. You can find this object, as well as some other related objects, in the lower half of the Utilities window (rightmost) in Xcode. Just drag the object into your XIB and blammo, you have a gray bar 44 pixels high. This navigation bar is similar to what you get when you use the navigation controller, except that you don't get stack functionality; you can add buttons left and right, change the title, tint it to a specific color, etc.
source share