UITableViewHeader doesn't maintain position when device rotates

41 views Asked by At

I seem to be having issues with my UITableViewHeaderView not maintaining its position at the top when the device rotates. What seems to be happening is once the device rotates to landscape, the header completely disappears at the top. When I then rotate it back to portrait, the header seems to become massive and not reset to its original size. The header itself has imageviews and labels laid out inside the view using auto-layout.

Is there a way to adjust the header to stay where it is when the device rotates? I've tried looking at other questions but can't find a solution.

1

There are 1 answers

1
Sande Harsa On

Some thing to try is to use UITableViewHeaderFooterView and put the content inside the contentView property.