user1007522 user1007522 - 1 year ago 106
Objective-C Question

Tableview last row is cut off under tabbarcontroller

I'm having a Tabbarcontroller and in the first tabview I'm having a tableviewcontroller. Now the last row is half visible the rest is underneath the tabbarcontroller.

I've unchecked extend edges in the interface builder of my tabbar controller but nothing changes.

I also tried this in my tableview controller:

self.edgesForExtendedLayout = UIRectEdgeNone;

But still the last row is half underneath the tabbar.

Someone an idea how I can solve this?

Answer Source

Try this inside viewDidLoad method

- (void)viewDidLoad
    [super viewDidLoad];

    self.edgesForExtendedLayout = UIRectEdgeAll;
    self.tableView.contentInset = UIEdgeInsetsMake(0.0f, 0.0f, CGRectGetHeight(self.tabBarController.tabBar.frame), 0.0f); 
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download