1

I'd like to implement a grouped and indexed UITableView without section headers.

I'm using sectionIndexTitlesForTableView:(UITableView *)tableView to return my titles.

I also implemented tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section and returned nil as well as tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section and returned 0.0f.

Both doesn't remove the section headers. There is still a space between the different sections.

dlinsin
  • 19,249
  • 13
  • 42
  • 53
  • So you want the table to look as if you had only one section? – phi Nov 23 '11 at 09:45
  • Basically that's what I want, yes. – dlinsin Nov 23 '11 at 12:03
  • See my answer here. It should solve your problem. http://stackoverflow.com/questions/2817308/reducing-the-space-between-sections-of-the-uitableview/2817696#2817696 Set the values to 1. – Tomen Nov 23 '11 at 12:38

1 Answers1

0

I had the same problem and could not find a solution. In the end, I had to subclass UIViewController (not UITableViewController) and use a UITableView with transparent background and the style set to UITableViewStylePlain. Then, I created custom cells for the first and the last row (with rounded corners) and some transparent margin left and right. I can give you more details if you want, but as it does not answer your question straight, I'll just share this link for now.

phi
  • 10,634
  • 6
  • 53
  • 88