With Alert, I switch from SecondViewController to FirstViewController by this method:

- (void) alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonAlertIndex { if (alertView.tag ==3) //выйгрышный алерт { FirstViewController *fvc = [[FirstViewController alloc]initWithNibName:@"FirstViewController" bundle:nil]; [self.navigationController pushViewController:fvc animated:YES]; } } 

But I want to change the style of the transition, how to do it? I was prompted that it is possible through transitionFromView, I’ve found code:

 [UIView transitionFromView:view2 toView:view1 duration:2.0 options:UIViewAnimationOptionTransitionFlipFromLeft completion:nil]; 

But I do not know how to fasten. What to write instead of view1 and view2? I have the following files: FirstViewController.h FirstViewController.m FirstViewController.xib SecondViewController.h SecondViewController.m SecondViewController.xib

Prompt good people)

    1 answer 1

    The transitionFromView method is needed for changing views, you have the same change in the presentation of controllers. All the more NavigationController `s.

    Look at the solution for NavigationController`a here . Although it is suitable for any animations.

    • It works, thanks!! What is "For Pop"? is it in the ipad?)) - Volt112
    • UINavigationController read the documentation. It has two key methods: pushViewController:animated: and popViewControllerAnimated: - BiMaWa