I'm trying to push a certain numbers of controllers at the same time using the prepareForSegue method, but getting this error:
nested push animation can result in corrupted navigation bar and Finishing up a navigation transition in an unexpected state. Navigation Bar subview tree might get corrupted.
Here the code:
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if ([[segue identifier] isEqualToString:@"rawSegue"]){
MyController * aController = [segue destinationViewController];
[aController setText:theText];
[aController setType:Type];
[aController setCountry:country];
}
}
The prepareForSegue method is called for each object contained in an NSMutableArray. How can I call multiple view controllers without getting this error? The Segue is wired in the storyboard with the correct identifier.