How to make a UINavigationBar “thin”?
-
19-09-2019 - |
Question
In certain places such as Mail.app, the top navigation bar is thinner in landscape mode than in portrait mode. Does anyone know how I could get something like this in my own app?
Solution
This is the default behavior. What makes you think you're not getting this in your own app? You just need to override
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
in your view controller and return YES in all cases. The navigation bar (assuming you're using a UINavigationController) at the top will be thinner in landscape than in portrait by default.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow