iphoneobjective-cipadios5ios4

Spacing between TableView Section increases in iOS 5


I have an iPad app which is for both iOS 4 and iOS 5.

The problem is that the space between sections of grouped tableview is more in iOS 5 as compared to iOS 4.

The same table looks different because of more spaces between sections of tableView in iOS 5.

I tried setting Footer and Header height to 1.0 but still it looks quite different.

Has this changed in iOS 5?

What could be wrong?

This is how it looks in iOS 5:

enter image description here

I am doing nothing programmatically through code. Everything is set from IB.


Solution

  • This issue happens because prior to iOS 5, table views would automatically re size the heights of headers to 0 for sections where tableView:viewForHeaderInSection: returned a nil view. In iOS5 and later we must return the actual height for each section headers.

    I hope this will solev your issue :)