According to the Apple doc here , the stack is a kind of double-list. It looks like this:
self.modalViewcontroller --> navigationController1 navigationController1.modalViewController --> navigationController2 navigationController2.modalViewController --> navigationController3
and
navigationController1.parentViewcontroller--> self navigationController2.parentViewcontroller--> navigationController1 navigationController3.parentViewcontroller--> navigationController2
The problem is that you cannot communicate with these properties as they are read-only. The only solution I see is to reject navigationController2 when navigationcontroller3 is rejected.
For example, try this in your navigationController3 class:
-(void)viewWillDisappear:(BOOL)animated { [super viewWillDisappear:animated]; self.parentviewcontroller.
FKDev source share