this is my grouped tableview:
Is it possible to avoid the spacing between sections and display the grouped table as if there is no sections?
Thanks in advance, yassa
this is my grouped tableview:
Is it possible to avoid the spacing between sections and display the grouped table as if there is no sections?
Thanks in advance, yassa
In iOS 7 I customized space between sections in grouped table view by implementing next method:
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
{
return 10; // there might be your height
}
To make this method work prior to iOS 5, you should also return non-nil view in tableView:viewForFooterInSection:
.
Prior to iOS 5.0, table views would automatically resize the heights of footers to 0 for sections where tableView:viewForFooterInSection: returned a nil view. In iOS 5.0 and later, you must return the actual height for each section footer in this method.
Probably not what you want to hear, but no. No nice way to do this. I Think you are able to minimize the Space between the Groups but this will look very bad.
Another way would be to use one Section, but then you wont have this nice little Letters at the right side.
But if you want no Space between the Cells why dont you use UITableViewPlainStyle?
It appears that you don't have any content for header or footer in your table view, so I think you could achieve that by implementing table view's delegate methods :
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section;
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section;
Those two methods might work correctly if you also implement :
-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section;
-(UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section;
returning nil
for each.