Reputation: 1907
I subclassed UITabBarController to allow for a custom UITabBar with a pink background and positioned at the top of the screen. The issue is that when I set the frame for the UITabBar to the top, it moves and works properly, but there seems to be an invisible overlay that remains at the bottom of the screen, preventing any user interaction with elements at the bottom. Also, I think Apple recommends that the UITabBar NOT be manipulated directly from within a UITabBarController. What's the best solution? Below is the code used to move the tab bar to the top, in the viewDidLoad method for my CustomTabBarController subclass:
CGRect frame = CGRectMake(0.0, 0.0, self.view.bounds.size.width, self.tabBar.bounds.size.height + 15);
[self.tabBar setFrame:frame];
Upvotes: 1
Views: 4133
Reputation: 6529
it is very possible to place the tab bar on top of the screen. here is a link to a github project that does place the tab bar on top of the screen. https://github.com/hollance/MHTabBarController
take a look at the project and let me know if you need any more help.
Upvotes: 1