iOS Navbar starts as a small instead of large iOS 11 style

孤人 提交于 2019-12-13 03:25:40

问题


When I launch my app, my Navbar automatically starts as a small one, but I have specified in my code to use large navigation bars: navigationController?.navigationBar.prefersLargeTitles = true, I'm using a collectionView in the same ViewController.

Every time I launch my app I have to scroll down to get the iOS 11 style Navbar to appear. What could cause this problem?

Result when I launch my app:

Result when I slide down and what it should look like when the app initially launches

Storyboard


回答1:


In your Storyboard, select the navbar, and in the attributes selector choose the following option:



来源:https://stackoverflow.com/questions/55482186/ios-navbar-starts-as-a-small-instead-of-large-ios-11-style

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!