title: iOS 11 large title navigation bar switch scroll view
body: <p>I have view controller with 2 tables inside. Tables are placed horizontally near each other. I have kind of segmented control to switch between these tables. I want to use large titles. An I want large titles to collapse and expand. As far as I know UINavigationBar (or maybe it is another object?) observes offset of the scroll view which is at index 0 in the subviews array. So, when I switch to another table I call this</p>
  
  <p><code>view.sendSubview(toBack: table)</code></p>
  
  <p>I also tried to force NavigationBar assign new scroll view by calling this</p>
  
  <p><code>self.navigationController?.navigationBar.prefersLargeTitles = false
  self.navigationController?.navigationBar.prefersLargeTitles = true
  </code></p>
  
  <p>It helps to assign new scroll view. But sometimes scroll view is buggy on the first dragging event.</p>
  
  <p>I also tried to add kind of RootScrollView to ViewController and send offset changes to it. This way I could avoid changing assigned ScrollView. But it is also buggy. You can find some info here: 
  <a href="https://github.com/uias/Pageboy/issues/122" rel="noreferrer">https://github.com/uias/Pageboy/issues/122</a>
  One developer was able to accomplish such behaviour, but later it became buggy</p>
  
  <p>Any suggestions are really welcome!</p>
  
  <p>UPDATE:
  If you have any suggestions about ScrollView struggle in the video, please share them. Thanks!</p>
  
  <p><a href="https://i.stack.imgur.com/QlSVV.gif" rel="noreferrer"><img src="https://i.stack.imgur.com/QlSVV.gif" alt="enter image description here"></a></p>