Is there a way to change the height of a UINavigationBar in Storyboard without using a UINavigationController?

You can set the property barPosition to UIBarPositionTopAttached another way!

  1. Add a delegate to your UINavigationBar.
  2. Implement -positionForBar: in the delegate class:

    - (UIBarPosition)positionForBar:(id<UIBarPositioning>)bar
    {
        return UIBarPositionTopAttached;
    }
    

Your navigation bar’s top must also be anchored to the Top Layout Guide.

Leave a Comment