简体   繁体   English

UIView与标签栏元素iOS重叠

[英]UIView overlapping with tab bar elements iOS

I made a view for a switch view. 我做了一个切换视图。 Now I already had tabbed menu buttons in it. 现在我已经有了选项卡式菜单按钮。 The problem is the subview for the switch view seems to be overlapping with the tab bar icons at the bottom. 问题是切换视图的子视图似乎与底部的标签栏图标重叠。 Please help. 请帮忙。

iPhone X屏幕快照

i think thats because your tabBar is set to translucent. 我认为那是因为您的tabBar设置为半透明。 set it to non-translucent from storyboard or programatically. 从情节提要或以编程方式将其设置为非半透明。

self.tabBarController.tabBar.translucent = false

You should have a constraint that sets the vertical space between your subview and your tabbar. 您应该有一个约束来设置子视图和选项卡之间的垂直空间。

Also, check that your layout respects the iPhone X Safe Area ( https://developer.apple.com/ios/human-interface-guidelines/overview/iphone-x/ ), from your image it seems that your elements overlap the safe area at the bottom. 另外,请检查图片是否符合iPhone X安全区域( https://developer.apple.com/ios/human-interface-guidelines/overview/iphone-x/ ),从图像上看,您的元素与安全区域重叠了底部区域。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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