There is usually no reason not to wrap your view controller in a UINavigationController - even if you don't intend to do any actual navigation - just to get the navigation bar, with all its automatic management.) (But you should also be asking yourself why you are adding a navigation bar manually. topAttached, which will cause it to stretch up to the top of the screen correctly. the top of the Safe Area) and give it a delegate so that you can use the UIBarPositioningDelegate mechanism to set its position to. ![]() ![]() You should pin the top of the navigation bar to the bottom of the status bar (e.g. ![]() You should not be setting the height of a manually added navigation bar yourself or placing it at the top of the view.
0 Comments
Leave a Reply. |