views:

148

answers:

2

I have a grouped UITableView with black background color. Thus the gray section headers with the white drop shadows are unreadable. Next thing to know, the section height varies depending on language and section.

How to solve this the most easy way ?

If I implement viewForHeaderInSection I also need to implement heightForHeaderInSection, but the height varies (several sections with different title and different language => different text length/view height)

A: 

Hi,

Try this one.

Use this Link

Link

I have faced that problem and solved using the above links.

Thanks.

Pugal Devan
Problem is... depending on the language and on the section the heightForHeaderInSection differs, in german one section header has only one row and in english the same section has a section header with two rows of text. So this solution of you (using heightForHeaderInSection and viewForHeaderInSection) is rather complicated, cause that way I would need to calculate the heights depending on the textlength or so ?! don't know how to do this yet and hoped for a more simple way.
Allisone
A: 

Hi

You need to dynamically determine the height of the cell, and set your label so that it autosizes itself.

Hope this link will be helpful to you.

All the best.

Warrior
It's not about the cell, it's about the section header
Allisone