Hide empty cells in UITableView
Set the tableFooterView
to some dummy view ([[UIView new] autorelease]
will work fine). This prompts the UITableView
to show the footer (which will have zero size) in place of the empty 'cells'.
- (void) viewDidLoad
{
[super viewDidLoad];
*// self.tableView.tableFooterView = [[[UIView alloc] init] autorelease];*
*//Since memory management is controlled by ARC now, so ignore autorelease*
self.tableView.tableFooterView = [[UIView alloc] init] ;
}