user1007522 user1007522 - 3 months ago 7x
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?


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);