Hierarchy of warning window when loading a delegate

Today I update my Xcode and started updating my application for the new iPhone 5 screen.

I suddenly notice that every time I go from screen A to screen B, I get this warning:

Warning: an attempt to present whose gaze is not in the Hierarchy window!

// This delegate method prepares the segue from Screen A (DilemmaViewController) to Screen B (OptionsViewController) - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { // Executes the following "if" statement if the user wants to add new options if ([segue.identifier isEqualToString:@"AddOptions"]) { UINavigationController *navigationController = segue.destinationViewController; OptionsViewController *controller = (OptionsViewController *)navigationController.topViewController; controller.delegate = self; // If the user has already put some inputs on the form we send them through the segue if ([edit count] > 0){ controller.edit = edit; } } } 

I have not touched this since the first version of my application, so I'm not sure what might happen here.

I looked at the website and some people talk about moving the code from viewDidLoad to viewAppear, but I don't think this applies to this scenario.

+7
source share
1 answer

Ok, I figured it out.

My problem was that at some point I made a mistake when connecting the Touch Up Inside event on top of the original (and correct) segue event:

enter image description here

Now I fixed it:

enter image description here

It works correctly again.

+4
source

All Articles