5

Having an issue while using large titles navigation bar and search bar in the navigation controller, when I try to pull for refreshing tableview shows an abrupt behavior on end refreshing.

var searchController : UISearchController!
self.searchController = UISearchController(searchResultsController: nil)

        self.tableView.refreshControl = self.refreshControl

        self.navigationItem.searchController = searchController
        self.navigationItem.hidesSearchBarWhenScrolling = false

        self.definesPresentationContext = true
        self.searchController.obscuresBackgroundDuringPresentation = false

        self.searchController.delegate = self
        self.searchController.searchBar.delegate = self
        self.searchController.searchResultsUpdater = self

On end refreshing

enter image description here

a.masri
  • 2,439
  • 1
  • 14
  • 32

1 Answers1

2

I had the same issue, and the only way I managed to get it working is by manually setting tableView's contentOffset.

tableView.refreshControl?.endRefreshing()
tableView.setContentOffset(CGPoint(x: 0, y: 0), animated: true)