[英]Navigation bar is overlapping the UIView [Swift]
In the picture below, the navigation bar is overlapping the cardview. 在下图中,导航栏与卡片视图重叠。 The whole screen is basically a view from a tab bar.
整个屏幕基本上都是来自选项卡栏的视图。 On top is a
navigationItem(the green one)
, then the navigationBar(the red one)
and then the CardView
.The translucent propery
is set to false
for the navigationBar
but the CardView
is still overlapped. 在顶部是一个
navigationItem(the green one)
,那么navigationBar(the red one)
,然后CardView
.The translucent propery
设置为false
的navigationBar
,但CardView
仍然重叠。 I have unchecked the extendedLayout property
to but that doesn't have any effect either. 我没有将
extendedLayout property
选中,但是也没有任何效果。
Is there something else I can do to place the CardView
below the navigationBar with padding? 我还有其他方法可以将
CardView
放在padding的CardView
下方吗?
您必须将卡片视图顶部的约束设置为顶部布局指南的底部。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.