Subham Padhi
Subham Padhi

Reputation: 95

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 screenshot

Upvotes: 0

Views: 2384

Answers (2)

axunic
axunic

Reputation: 2316

i think thats because your tabBar is set to translucent. set it to non-translucent from storyboard or programatically.

self.tabBarController.tabBar.translucent = false

Upvotes: 2

Martin
Martin

Reputation: 694

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.

Upvotes: 0

Related Questions