I have a problem when dragging a navigation bar or toolbar (storyboard) to my view controller.
UINavigationBar:
Do these steps
Drag the NavigationBar to your ViewController in Xib, set the ViewController as its delegate. Note that the NavigationBar should be at (0, 20)
In ViewController, conform to the UINavigationBarDelegate
@interface ETPViewController ()
Implement this method
- (UIBarPosition)positionForBar:(id )bar
{
return UIBarPositionTopAttached;
}
positionForBar tells the NavigationBar if it should extend its background upward the Status Bar