-1

Just a question I have that doesn't appear to have been directly answered here before.

I have a simple app using storyboard which has a navigation controller set as the initial view controller in the storyboard, and the first view controller set as the navigation controller's root view controller.

I've read that the window has exactly one root view controller. Is that, then, in this case the navigation controller itself, since it's the initial view controller, or does the window share the navigation controller's root view controller?

Thanks in advance for any help.

cheznead
  • 2,589
  • 7
  • 29
  • 50
  • If someone is going to down vote a perfectly good question, at least have the decency to explain why. – cheznead Jun 28 '15 at 11:31

1 Answers1

1

The window's rootViewController is the navigation controller.

The navigation controller's rootViewController is its first view controller.

Those are two different view controllers.

What's probably confusing is that the navigation controller is a (specialized) view controller.

  • Awesome. Does the vc set as the 'initial' view controller in storyboard automatically become the window's root view controller? If not, how does the window determine which is its rvc? – cheznead Jun 27 '15 at 21:49
  • 1
    Correct. Storyboard sets it automatically for you. –  Jun 27 '15 at 21:51