Andre
Andre

Reputation: 7648

Swift: fixed searchBar into tableView header

I have a tableView with a searchBar inside the table header.

Everything is working well except when I scroll down the rows, the search bar disappear.

How can I make it fixed?

Upvotes: 0

Views: 1042

Answers (1)

Nemanja
Nemanja

Reputation: 194

There is no a way to maintain the header of a tableView fixed, but an useful approach when you need a unique header, could be to use UIViewController instead of UITableViewController, and set the header (UIView that contains searchBar) above the tableView.

Upvotes: 1

Related Questions