I'm basically just asking, is there a difference in how the code/app is running between these two scenarios:

1) You push to a viewcontroller

2) You push to a viewcontroller, then pop that viewcontroller, and then push to it again

It seems like there must be, because my app works correctly in situation 1, but looses some functionality in situation 2.

I have a navigation controller with push segues between viewcontrollers. In the main menu screen you can press a button which is a push segue to another viewcontroller, viewController2, which shows an imageview with a map on it, and then the user chooses a location and the imageview displays directional arrows.

There is a back button viewController2, which is just a standard custom back button:

- (IBAction)customBackButton:(id)sender {
    [self.navigationController popViewControllerAnimated:YES];
}

If I click this back button, I get brought back to the main menu... and then if I then navigate to viewcontroller2 again, with the same push segue, then some of the functionality doesn't work anymore. It shows the map, but the arrows won't get put onto the map.

It seems like the code can't interact with some of the properties of the viewcontroller2 class. For instance, I have a UILabel called _destinationLabel with text that should change based on the location the user chooses. This never gets changed, even though it goes through the code correctly. However, other labels do get changed correctly.

0

There are 0 answers