1

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];
CaptainStiggz
  • 1,787
  • 6
  • 26
  • 50

1 Answers1

1

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.

Adrian P
  • 6,479
  • 4
  • 38
  • 55
  • 1
    This project has done it all with custom code with UIButtons on top and embedded view controllers (is not using a tab bar). But the implementation looks to provide the desired effect. – Bogdan Onu Sep 03 '15 at 10:23