简体   繁体   English

导航栏与UIView重叠[Swift]

[英]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设置为falsenavigationBar ,但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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM