I declared the two different push segue in the myview1
to display the myview2
.
Two different push segue is called from two different button actions. Its showing the myview2
.
In myview2
I am poping the navigationcontroller
back to the myview1
in button action.
I am getting error in ios7 but in the previous version of iOS its working:
nested push animation can result in corrupted navigation bar
Finishing up a navigation transition in an unexpected state. Navigation Bar subview tree might get corrupted.
myview2:
- (IBAction)saveButtonPressed:(id)sender {
if ([self.addString isEqualToString:@"ADD"]) {
NSLog(@"11111111add save");
Xen_ViewController *viewcontroller = [[Xen_ViewController alloc] init];
DOING some method calling.....
//[self.navigationController popViewControllerAnimated:YES];
}
else if ([self.addString isEqualToString:@"UPDATE"]){
NSLog(@"222222222update save");
Xen_ViewController *viewcontroller = [[Xen_ViewController alloc] init];
DOING some method calling.....
.....
}
[self.navigationController popViewControllerAnimated:YES];
myview1:
-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{
if([segue.identifier isEqualToString:@"CallingConfigurationEdit"]){
//UINavigationController *navController = (UINavigationController *)segue.destinationViewController;
Xen_ConfigurationViewController *controller = segue.destinationViewController;
controller.addString = @"ADD";
}
if ([segue.identifier isEqualToString:@"Updation"])
{
Xen_ConfigurationViewController *controller = segue.destinationViewController;
controller.updateString = self.string;
controller.addString = @"UPDATE";
}
}
How do I overcome this error?