Post

Replies

Boosts

Views

Activity

Reply to A bug with UIRefreshControl + UISearchController?
Setting navigationItem.hidesSearchBarWhenScrolling = false will enforce search bar visibility. I found a working solution which lets you keep the default search bar behavior. Just recreate and assign the refresh control every time the table view controller appears on screen. If you subclassed UITableViewController: class MyTableViewController: UITableViewController { ... override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) refreshControl = UIRefreshControl(...)     } } If you use view controller containment: class MyContainerViewController: UITableViewController { private let tableViewController = UITableViewController(style: .plain) ... override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) tableViewController.refreshControl = UIRefreshControl(...)     } }
Aug ’21