Blasco73
Blasco73

Reputation: 2990

Delete spaces between section into grouped UITableView

It's possible to delete this little space between two sections of a grouped UITableView?

I reduced it by setting these two values:

enter image description here

And with this code inside:

- (UIView*) tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
    return nil;
}

- (CGFloat) tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
    return 0.0;
}

But I still see the gray space.

This is my best result:

enter image description here

I want to delete the little grey line when I erase the grey space.

Upvotes: 2

Views: 577

Answers (1)

0yeoj
0yeoj

Reputation: 4550

I had this problem a while ago.. solved returning 0.1 or probably 0.01 depending from what you prefer..

- (CGFloat) tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
    return 0.1/*0.01*/;
}

return 0 or nil seems to reset the height.. this also work for the header..

This solved my problem, hope this solves yours..

Upvotes: 3

Related Questions