Skip to content

Instantly share code, notes, and snippets.

@jlcampana
Created January 17, 2013 08:50
Show Gist options
  • Save jlcampana/4554634 to your computer and use it in GitHub Desktop.
Save jlcampana/4554634 to your computer and use it in GitHub Desktop.
Eliminar celdas vacías al final de una tableview
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
// Return the number of sections.
return 1;
}
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
//This is just for avoiding separation lines in empty rows (needs "numberOfSectionsInTableView")
if ([self numberOfSectionsInTableView:tableView] == (section+1)){
return [UIView new];
}
return nil;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment