This may be a very stupid question. I’m just wondering
Is there a method that would be called after a NavigationController has been segued?
[which works just like viewDidLoad in UIViewController, besides viewDidLoad is called after the view controller has loaded its view hierarchy into memory]
If there isn’t such a thing, is it possible to write one into the UIKit Framework??
(I know we can always use RootViewController’s viewDidLoad to trigger something after a NavigationController has been segued. I’m just being curious..)
First, there are no views loaded by a
UINavigationController. It just controlsUIViewControllersthat in turn control views. Therefore there is no need to have a callback likeviewDidLoad.Second, you already have a place where you can customize the
UINavigationControllerafter it has been created: inprepareForSegue:of the calling view controller, or in your app delegate if it is the root navigation controller.Of course, you can always subclass
UINavigationControllerand override itsinitmethods if you want to encapsulate your modifications.