jeudi 25 juin 2015

TableView Header hight according to screen size

I have a TablevView with a TableView header created by the interface builder inside the same xib of the TableView.

I want to set the height of the header according to the screen size for example I want the header to take 50% of the screen size.

Here is what I get now with the static height in the iPhone 4s.

Tableview header in iPhone 4s

And here is is what I get in the iPhone 6.

Tableview header in iPhone 6

Note that the content of the header is static, so I am no looking for the dynamic height cell.

I cant set constraints to the header using auto-layout ! I tried to set a height constraint based of the height of the TableView, but I can't reach that in interface builder.

See more ..

Aucun commentaire:

Enregistrer un commentaire