You are using a main storyboard, so you must wait until *after* the
main storyboard has loaded automatically. After that, the navigation
controller is your window's rootViewController and the MainView
controller is the first child of the navigation controller.