I want that when you click on the toSecond button the transition disappears, and the backBtn2First button works back, but nothing works. That is, the transition is working but not the UIViewAnimationTransitionCurlUp in any way. Such a feeling that backBtn2First is simply ignored. How to make it work correctly?
-(IBAction) backBtn2First //для обратного перехода { FirstViewController *fvc = [[FirstViewController alloc]initWithNibName:@"FirstViewController" bundle:nil]; [UIView beginAnimations:nil context:NULL]; [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; [UIView setAnimationDuration:1.0]; [self.navigationController pushViewController:fvc animated:NO]; [UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.navigationController.view cache:NO]; [UIView commitAnimations]; } -(IBAction)toSecond { SecondViewController *svc = [[SecondViewController alloc]initWithNibName:@"InfoViewController" bundle:nil]; UIBarButtonItem *backBtn2 = [[UIBarButtonItem alloc]initWithTitle:@"try back" style:UIBarButtonItemStyleBordered target:self action:@selector(backBtn2First)]; [[self navigationItem]setBackBarButtonItem:backBtn2]; [self.navigationController pushViewController:svc animated:YES]; }