Reputation: 6077
This could be a stupid question but i couldn't figure it out.
When i create a Push Segue it automatically should give me this if has a nav controller
while when i create a Modal Segue i need to set a navigationBar from the palette and looks like this
How can i make a custom navBar dragged from the palette to look like the first one? I need this because i set the Status Bar text to white in order to be in contrast with the navigation bar color, but in this was the status bar is invisible, being white on the white background
Upvotes: 1
Views: 613
Reputation: 1156
The problem is that you are creating your own title bar.. what you should do.. instead of presenting modally the destination view controller... present modally a navigationcontroller.. that has the destination view controller set as root view controller.
hope you can understand what tried to say =P!
GL HF
Upvotes: 1
Reputation: 2915
You could add a property to the offset and height constraints. Then in the viewWillAppear method, set the constraints value to be -20 and 64 respectively
-(void)viewWillAppear:(BOOL)animated{
[super viewWillAppear];
[self.myNavBarTopConstraint setConstant:-20];
[self.myNavBarHeightConstraint setConstant:64];
}
Upvotes: 1