0

I am currently experimenting with PopToViewController and noticed that if I have the following scenario I get null back from the method:

Navigation Stack

UIViewController1 - position 0
UIViewController2
UIViewController3
UIViewController4
UIViewController5 presented Modally

I get an event triggering a pop back to UIViewController1. When I call NavigationController.PopToViewController from UIViewController1, the return value is null but the views are removed from the navigation stack but the modal stays open. I also don't appear to be getting any of the lifecycle events for the UIViewControllers that are removed.

Is this desired behaviour or documented anywhere? I can understand the modal remaining open but I don't get why the PopToViewController method would return null.

The ViewController I am popping back to is definitely in the Navigation Stack.

Robert
  • 61
  • 5
  • Possible duplicate of [popTOViewController](https://stackoverflow.com/questions/5753256/poptoviewcontroller) – Naresh Jul 19 '18 at 10:20
  • See this link. https://stackoverflow.com/questions/5753256/poptoviewcontroller/51420097#51420097 – Naresh Jul 19 '18 at 10:21

0 Answers0