My App navigation is like below:
NavigationController ---> RootViewController --(Show Segue)-> SomeViewController --(Show Segue)-> ParentViewController (With ContainerView)
So, ParentViewController has a container view. This container view is populated programmatically, at runtime, depending upon user selection. So, basically the view hierarchy is like this:
ParentViewController (With ContainerView) ---(Embed Segue) --> ContainerViewController --(Custom Segue, for deciding which child to show at runtime) ---> FirstChildViewController/SecondChildViewController
Now, I display a modal view when a button is tapped in SecondChildViewController. Everything is fine, till this point.
But, now I want to update data in SecondChildViewController on the dismissal of ModalViewController. I try to do it like this in ModalViewController:
[self dismissViewControllerAnimated:YES completion: ^{ [secondChildVC updateList]; }];
But, I am getting following error:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UINavigationController updateList]: unrecognized selector sent to instance 0x127e451b0'
How can I fix this issue? I know its a weird navigation, and there is too much stacking on views from user experience point of view, but that is the way client wants to implement.
