There is:

navigation controller: { (самый главный контрол навигации) view controller: { tab bar controller: { navigation controller: { view controller (я тут) }, navigation controller: { view controller }, navigation controller: { view controller } } } } 

How to get access from the “I'm here” control to the UINavigationController, which is “most important”

  • it may be easier to rewrite everything normally :) - Max Mikheyenko
  • one
    assuming your nav controller is a window root, you can try this: UINavigationController *controller = [UIApplication sharedApplication].keyWindow.rootViewController; - Max Mikheyenko
  • @MaxMikheyenko unfortunately, there is no person who would push to the best practice, but how would you rewrite my monster? =) I have a greeting control, a controller with authorization and a tab bar controller, I would like to keep as few controllers as possible in memory and thought that if an authorized user starts the application, he throws it immediately onto the tab bar, and if he wanted to exit, then when pressed, make it possible to make pop in tabbar and the welcome window appears as the first element in the upper navigation control - user204104
  • Helped my comment about the root? - Max Mikheyenko
  • and as regards rewriting, I would say either to make a tab bar as root, and to authorize through a modal view; either show a greeting and authorization on one nav controller, and after authorization replace it with a tab bar - Max Mikheyenko

1 answer 1

assuming your nav controller is a window root, you can try this

 UINavigationController *controller = [UIApplication sharedApplication].keyWindow.rootViewController;