I am having some problems with popping items from the navigation stack and no idea why its behaving like it is.
Stack
A classA
B classB
C classC
D classD
At stack D I create another classD and add it to the stack.
Stack
A classA
B classB
C classC
D classD
E classD
Before I create E and push it on to the stack, I do a pop to get rid of D so that the stack becomes
Stack
A classA
B classB
C classC
E classD
However when I pop, the self.navigationController.viewcontrollers becomes 0 and im stuck on C with E not becoming visible. Why does the pop just remove everything and go to C?
At C in didSelectRowAtIndexPath I create a ClassD and do:
[self.navigationController pushViewController:ClassD animated:YES];
At D in didSelectRowAtIndexPath I create another ClassD and do:
[self.navigationController popViewControllerAnimated:NO]; //remove current and replace with new
[self.navigationController pushViewController:ClassD animated:YES];
But it doesn't seem to do what as expected. I sense the transition from pop to push seems to be too fast nothing is appearing? Any ideas?