3
votes

I am using a UINavigationController to handle the pushing and poping of viewControllers in my app. Theres a section where i have a tab bar (not using UITabbarController) which is manageed by the same UINavigationController, i simply add the UITabBar to the navigation controllers view (by using addSubview).

The Problem: I have some UIViewControllers with table views being pushed into the navigation stack, since my Tab Bar is part of the view and not the navigation stack the TableViews are cut off at the buttom because the Navigation Controller does not know of the tab bar because its in its view and n ot the navigation stack. Without a navigation controller i would just resize the ViewControllers view and it would work fine, but when i try to do that it seems like the NavigationCOntroller just ignores my frame and sets its own and therefore the table views are cut off. I found one solution which was to add some extra cells and hide them and that works sort of OK but its kind of hackerish, anyone have any suggestion of how to go about this in a different non -hackerish way?

Thanks

2
i know, im kind of annoyed that the navigation controller wont let me resize its viewControllers views....Daniel
Can you show some screenshots of your problem?Jonah
i found my answer, thanks Jonah...the screen would have looked like a tableview and a tabbar and the tabbar covering the last few cells of the table view (it wouldnt scroll passed that)Daniel

2 Answers

1
votes

Alright, so i solved the problem. I had tried resizing the UITableView instead of the viewController before, but this did not work. I just realized though, that this did not work because i was using a UITableViewController which manages its own tableView and was not letting me change the frame of it (maybe i was changing it in the wrong place, tried in viewDidLoad, i bet if i did it after the call to [super viewDidload] it would have worked..o well). So I changed the class to a UIViewController and managed the table view in there, now it works good, thanks for the replies.

0
votes

Try making the root view a UIView with a UITableView for a subview. Then add the UITabBar to the UIView instance. Now the UITableView won't know about the UINavigationController.