\n","author":{"@type":"Person","name":"Ethan Brimhall"},"upvoteCount":1,"answerCount":1,"acceptedAnswer":null}}
Reputation: 376
I am using a navigation controller and my navigation bar will not extend to the top of the screen. I never had an issue with this until I updated Xcode to version 13.0. I am using storyboard and can't figure out why this issue is happening. (See photo)
Upvotes: 1
Views: 1382
Reputation: 25
If you are looking for how to make it with storyboards, simply turn on "Scroll Edge" in the attributes inspector, while you tap on the Navigation bar...image here
If you are not using storyboards, try setting a delegate object for the navigation bar.
navigationBar.delegate = self
Conform UIBarPositioningDelegate in your delegate object and attach bar to the top
ViewController: UIViewController, UIBarPositioningDelegate {
func position(for bar: UIBarPositioning) -> UIBarPosition {
return .topAttached
}
Upvotes: 1