I am attempting to implement a custom tab bar in my iPhone app, and while it’s going well, I have one major problem right now: When I add the custom tab bar to a UITableViewController’s UITableView, it scrolls along with the table. This makes logical sense..
So I thought, hey, why not add the view to the window, right? Well, the problem is that the 3rd party custom tab bar framework I’m using is implementing the tab bar with a TopView parameter. That is, whatever it is told is the top view is, is what it will place the tab bar OVER. I’m confused as to what I could possibly do to add the tab bar to the window using the syntax of TopView. I’ve tried doing hacky things like:
tabBar = [[CustomTabBar alloc] initWithViewController:self topView:self.view.window.superview delegate:self selectedIndex:0];
but that fails, and for good reason. Trying to place a view over a superview is never going to work.
If someone could give an idea as to how to add to the non-scrollable window using this rather awkward syntax, I’d be very appreciative.
Thanks.
UITableViewController creates a view if you don’t create one for it, but you can also create it yourself.
I believe you should be able to create a full screen parent view, then add a scroll view for the UITableController along with your tab bar to that parent container.