UINavigationBar stretch

I am using default navigationBar with large title and searchBar in navigation item. The problem I am having is when the tableView is scrolled down to see the refreshControl, then navigationBar also increases its height which i want to avoid.


So here is my setup

NavigationController with RootViewController

  • This contains Container View with following navigation bar and two controllers -
    1. NavigationBar with
      • Large Titles
      • Search Controller inside Navigationitem
    2. ViewController(VC1) has
      • TableView
        • Refresh View Controll added into table view
    3. ViewController(VC2) has
      • TableView
        • Refresh View Controll added into table view
  • Selecting cell from either of the TablView push another ViewController(VC3) which has -
    • Inferred NavigationBar with
      • Large Titles
      • Search Controller inside Navigationitem
    • Table View
      • Refresh control added into TableView


My problem statement is -

When I pull down table view in VC3, navigation bar height also increases which I dont want to.

Answered by WebguruInfosystems in 337670022

You should add width constraint for search bar if you use Xcode 9.

Accepted Answer

You should add width constraint for search bar if you use Xcode 9.

UINavigationBar stretch
 
 
Q