Zaid M. Said
Zaid M. Said

Reputation: 314

How to show navigation bar in Interface Builder preview storyboard (assistant editor)

I am doing autolayout works in Storyboard and previewing the result in Assistant Editor > Preview

How can I show navigation bar in the preview?

Upvotes: 1

Views: 330

Answers (2)

Ivan Titkov
Ivan Titkov

Reputation: 389

I suggest another way - just use top constraint, while you container view will have y = 0, you can set top constraint to 44px, in this case you will see warning, but all stuff at your screen will be at the same positions, but preview will display your screen like you have navigation bar. When everything is ok, just set top constraint to 0. I guess this solution is really convenient.

Upvotes: 1

MRizwan33
MRizwan33

Reputation: 2741

Take a dummy view and give its height equals to the navigation bar height. (navigation bar height remain same in each device). when u done ur pixel perfection than uncheck installed from attribute inspector of that view or just remove the view.

Upvotes: 1

Related Questions