1
votes

I've been trying to create a custom tab bar whereby the bar itself is translucent and the content displayed in each of the views can be seen behind the bar. I've tried subclassing the UITabBarController class and then create a custom tab bar and tabs which allows me to include a translucent background image so I can do that part but the problem I'm now having is that the content views basically get wrapped inside the tab bar controller so they get cut off at the bottom and I need the content to be the full height of the screen.

I came across this question How to create translucent (with content behind it) UITabBar and the accepted answer suggests not to use a UITabBarController but I'm not sure how I'd go about this. How would I implement a tab bar without using a UITabBarController?

1

1 Answers

2
votes

A tab bar controller is just a container view controller. In it's UI it has a subview which is the tab bar view and a subview that is the container for the view of whatever the 'current' view controller is. You can add childViewControllers yourself and switch the views as and when the user selects the UITabBarItems (<UITabBarDelegate>).