Reputation:
Im trying to create a UINavigationBar
using storyboard but the UINavigationBar
is not occupying the entire screen.
Following is the screen shot of my storyboard.
In storyboard, it appears to occupy full screen width but in my device, the width is not full. How can I sort this out?
Upvotes: 0
Views: 298
Reputation: 82766
select your viewController and go to XCode Menu
- > Editor
-> select Navigation Controller
,
for example
you get the output of
it works fine for any layout patterns
Upvotes: 1
Reputation:
firstly you have to disable size classes and auto layout in the file inspecter for your view after then set your navigation bar property like as shown in screenshot. It will be applicable for all the devices.
Upvotes: 1
Reputation: 624
1- Select your element.
2- Click triangle button at bottom right.
3- Click Add Missing Constraints
Upvotes: 0