Skip to content

Instantly share code, notes, and snippets.

@2ndmouse
Created December 30, 2014 23:33
Show Gist options
  • Save 2ndmouse/27be93bff81c58e44aef to your computer and use it in GitHub Desktop.
Save 2ndmouse/27be93bff81c58e44aef to your computer and use it in GitHub Desktop.
Fixed the problem of "UITableview and tabbar overlapping"
- (void)loadView{
// cannot set the height here because the data has not been loaded into the tableview yet
// so I just set it to zero
UITableView *tableView = [[UITableView alloc] initWithFrame:CGRectZero
style:UITableViewStylePlain];
}
// set the custom height here
- (void)viewWillLayoutSubviews{
self.tableView.frame = CGRectMake(0, 0, [self widthForView], [self heightForView]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment