I am trying to increase the height of the UINavigationBar
via UIAppearance
The height itself does change but part of the bar is obscured by the device status bar. I would like to move the bar down 22 pixels so it is fully visible:
[[UINavigationBar appearance] setFrame:CGRectMake([[UINavigationBar appearance] frame].origin.x, 22, [[UINavigationBar appearance] frame].size.width, 103)];
And I also set the autoresizing mask
[[UINavigationBar appearance] setAutoresizingMask:UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleBottomMargin];
But the bar is not translated. Is there another way or another step here?
Change the Bar Style A user changes the navigation bar's style, or UIBarStyle , by tapping the “Style” button to the left of the main page. This button opens an action sheet where users can change the background's appearance to default, black-opaque, or black- translucent.
Start with Navigation ControllerCreate a single view application in Xcode. Add two view controller into your storyboard. Create two different swift files for those view controllers and set identifiers for them. Take a button in each view controller, set constrain for them and customize as you want.
The tint color to apply to the navigation bar background.
You can move down only title by this:
[[UINavigationBar appearance] setTitleVerticalPositionAdjustment:5 forBarMetrics:UIBarMetricsDefault];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With