问题
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?
回答1:
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.
来源:https://stackoverflow.com/questions/45147582/swift-fixed-searchbar-into-tableview-header