I\'m developing an application based on the Tab Bar application preset. In one of the tabs I have a table view showing a lot of data, but half the last cell in the table vie
Look at the size of the tab bar, and adjust the size of your table view accordingly. Read the docs on the frame property, IB lets you set the size of things if you're using IB for this purpose, etc.
SWIFT
I had been having this problem where when I embed a UITableViewController into a UITabBarController, the last cell (or the bottom or a large cell) would remain under the TabBar when fully scrolled down. After a day of trying various codes and work arounds which didn't work, I simply re-embeded my UITableViewController into a Navigation Controller which was them embedded into a TabBar Controller. The spacing is fixed and the table view clears the tabBar now.
Select the view where you have your tableview
, open attribute inspector, in Simulated Metrics
section, select Tab Bar
for Bottom Bar item.
Then XCode
would update your view, reserving space for TabBar
. So your tableview
would not be covered.
Adding a footer space worked for me:
//this prevent the tabbar to cover the tableview space
UIView *footer = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 1, 90)];
footer.backgroundColor = [UIColor clearColor];
myTableView.tableFooterView = footer;
I had this problem, and ended up here ... So even if this is old, here is how I solved this issue:
I had a UITabBar controller with one tab being a UIViewController, and it had a single added line:
[self.view addSubview:navController.view];
This is wrong .. Even if the code worked, the concept is wrong (at least in my case), the navController should be directly linked in the UITabBar as one of the tabs...
So, what's the real answer?
You must have implemented the navigation controller incorrectly. As proof is that I had this issue, as I explained, and also This Guy...
I've found the only solution to this is to add a padded footer for the tableview:
http://www.iphonedevsdk.com/forum/iphone-sdk-development/18180-resizing-uitableview-programatically.html