NavigationController – viewWillAppear & viewWillDisAppear

Sometimes, You might face some kind of problems when you add navigation controller as a subview of any view.

One of the problem is “viewWillApplear”, “viewWillDisappear”, “viewDidAppear”, “viewDidDisappear” might not get called.

To resolve this issue, Try to add navigationController.view in UIWindow instead of adding into any of Views.

Again for the clarification, Following methods would get called only if navigationController is added as subview only in a Window.

Leave a Reply

Your email address will not be published. Required fields are marked *