How to change the Push and Pop animations in a navigation based app

前端 未结 25 1543
清酒与你
清酒与你 2020-11-22 12:46

I have a navigation based application and I want to change the animation of the push and pop animations. How would I do that?

Edit 2018

Ther

25条回答
  •  闹比i
    闹比i (楼主)
    2020-11-22 13:02

    Using private calls is a bad idea as Apple no longer approve apps that do that. Maybe you could try this:

    //Init Animation
    [UIView beginAnimations:nil context:NULL];
    [UIView setAnimationDuration: 0.50];
    
    
    [UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.navigationController.view cache:YES];
    
    //Create ViewController
    MyViewController *myVC = [[MyViewController alloc] initWith...];
    
    [self.navigationController pushViewController:myVC animated:NO];
    [myVC release];
    
    //Start Animation
    [UIView commitAnimations];
    

提交回复
热议问题