ludo
ludo

Reputation: 1479

UITableViewHeader (fix position)

I added a UITableviewHeader to my tableview, is there a way to make it fix. I want to scroll with my TableView but always be able to watch the Header.

Upvotes: 1

Views: 974

Answers (2)

Ben Gottlieb
Ben Gottlieb

Reputation: 85542

If your table has only one section, you can use a section header instead of a table header, and it should do what you want. If not, use Rengers' suggestion.

Upvotes: 2

Rengers
Rengers

Reputation: 15238

There is currently no way to achieve this using a standard UITableViewHeader. You'll have to shrink the UITableView and put a UIView at the top if you want this behavior.

As far as I know a UITableViewController doesn't allow you to change the UITableView frame, so you should create a 'container' UIView with an UITableView in it and a custom UIViewController subclass that controls is.

Upvotes: -1

Related Questions