ios 11 custom navbar goes under status bar

前端 未结 5 1706
刺人心
刺人心 2020-11-28 13:31

just downloaded xcode 9 and i\'m having this weird issue, on ios 11 my custom navbar appears to be half in size and is under the status bar, on ios 10 works fine.

so

5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-28 14:29

    First of all, make sure that your navigation controller's "shows navigation bar" is unchecked in storyboard.

    Then, drag and drop navigation bar from the "object library". Give Top constraint equal to 20.

    It'll also work perfect in "iPhone X simulator".

    Happy Coding!

提交回复
热议问题