Transparent row of pixels between section header and first cell in a grouped UITableView

I finally figured this one out, after almost 2 days of testing (and hair loss).

As I said in my comment above, simply returning a smaller height in the heightForHeader method doesn't work. To make it work you need to take your desired header view, insert it in a dummy/container view with the exact same size and then give this container to the tableView as the header.

Then, when you return a smaller size for the header, it magically (and it really is magic for me) manages to overlap that annoying row of pixels.

By the way, I concluded that the row of pixels is due to the cell separator line.

If someone is interested, I can upload the working test project again.