title: Can UINavigationController only handle a maximum of 4 Viewcontrollers?
body: <p>I am trying to build a storyboard in Xcode 7.x with more than 4 consequtive view controllers embedded in a UINavigationController.
  The navigation controller is the initial view controller.
  Embedded is a simple view controller only containing a single button, which is connected to an Adaptive Show Segue, calling a similar view controller and so on. Each one calling the next by a simple Show Segue.
  The Push only works for 3 consecutive calls, thereafter the reference to the navigation controller is lost.
  The 5th view controller and on are presented modally.</p>
  
  <p>I am having this problem in different project at least since iOS 8.</p>
  
  <p>Is the UINavigationController viewControllers stack limited to 4 entries?</p>
  
  <p><a href="http://i.stack.imgur.com/Zpqqg.png" rel="nofollow">More than 4 view controllers embedded in an UINavigationController</a></p>
  
  <p>The code of the embedded view controllers:</p>
  
  <pre><code>class ViewController: UIViewController {
  
      override func viewDidAppear(animated: Bool) {
          super.viewDidAppear(animated)
  
          print("ViewCintroller:\(title) NavController:\(navigationController) stack size:\(navigationController?.viewControllers.count)")
          print()
      }
  }
  </code></pre>
  
  <p>output:</p>
  
  <pre class="lang-none prettyprint-override"><code>ViewController:Optional("V1") NavController:Optional(&lt;UINavigationController: 0x7fd57b024200&gt;) stack size:Optional(1)
  ViewController:Optional("V2") NavController:Optional(&lt;UINavigationController: 0x7fd57b024200&gt;) stack size:Optional(2)
  ViewController:Optional("V3") NavController:Optional(&lt;UINavigationController: 0x7fd57b024200&gt;) stack size:Optional(3)
  ViewController:Optional("V4") NavController:Optional(&lt;UINavigationController: 0x7fd57b024200&gt;) stack size:Optional(4)
  ViewController:Optional("V5") NavController:nil stack size:nil
  ViewController:Optional("V6") NavController:nil stack size:nil
  </code></pre>
  
  <p>changing all segues to the deprecated push type leads to the required result:</p>
  
  <pre class="lang-none prettyprint-override"><code>ViewController:Optional("V1") NavController:Optional(&lt;UINavigationController: 0x7fc8a1026200&gt;) stack size:Optional(1)
  ViewController:Optional("V2") NavController:Optional(&lt;UINavigationController: 0x7fc8a1026200&gt;) stack size:Optional(2)
  ViewController:Optional("V3") NavController:Optional(&lt;UINavigationController: 0x7fc8a1026200&gt;) stack size:Optional(3)
  ViewController:Optional("V4") NavController:Optional(&lt;UINavigationController: 0x7fc8a1026200&gt;) stack size:Optional(4)
  ViewController:Optional("V5") NavController:Optional(&lt;UINavigationController: 0x7fc8a1026200&gt;) stack size:Optional(5)
  ViewController:Optional("V6") NavController:Optional(&lt;UINavigationController: 0x7fc8a1026200&gt;) stack size:Optional(6)
  </code></pre>
  
  <p>Edit:</p>
  
  <p>In my opinion, the problem is with interface builder.
  I got a working solution with changing all show segues to push segues, compiling, changing the push segues back to show segues, compiling again and the anomaly is gone. The navigation stack isn't limited any more to 4 view controllers.</p>