Removing Empty cells from a UITableView

Some solutions point to do something like this:

- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {

UIView *view = [[UIView alloc] init];

view.backgroundColor = [UIColor redColor];

return view;

}

But for me this is the best solution (the above didn’t work):

self.tableView.tableFooterView = [[UIView alloc] init];

or in a non-Arc environment:

self.tableView.tableFooterView = [[[UIView alloc] init] autorelease];

Advertisements
Tagged , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: