在NavigationController的NavigationBar(以编程方式或通过StoryBoard)设置translucent = false
属性时,根内容视图的顶部似乎有额外的填充。
我已经尝试调整滚动视图插图,但无济于事。 translucent = true
不会导致此问题。
为什么会发生这种情况以及最简单的解决方法是什么?
答案 0 :(得分:4)
adjusts scroll view insets
和extend edges under opaque bars
都设置为true
。
以下是StoryBoard设置: