iOS 11 Uirefreshcontrol with Navigationbar Largetitle and Searchcontroller Disappearing

iOS 11 prefersLargeTitles not updating until scroll

I had the same problem. Although you are not using Storyboards but I hope this could help someone. I checked "Prefer Large Titles" for the Navigation Controller (not the View Controller) I embedded my TableViewController in. All the View Controllers after the Navigation Controller turned and had large titles, and it should work.

Sample Image

Swift - NavigationBar issue with SearchController

When not using a translucent NavigationBar you need to ensure that both adjusts scroll view insets and extend edges under opaque bars are set to true on your ViewController.

Link of the answer:
Setting NavigationController's NavigationBar translucent property to false causes extra padding

Prefer Large Titles and RefreshControl not working well

At the end what worked for me was:

  • In order to fix the RefreshControl progress bar disappearing bug with large titles:

    self.extendedLayoutIncludesOpaqueBars = true
  • In order to fix the list offset after refreshcontrol.endRefreshing():

    let top = self.tableView.adjustedContentInset.top
    let y = self.refreshControl!.frame.maxY + top
    self.tableView.setContentOffset(CGPoint(x: 0, y: -y), animated:true)


Related Topics



Leave a reply



Submit