Flip transition uinavigationcontroller push

前端 未结 3 2006
粉色の甜心
粉色の甜心 2021-01-01 07:31

I am pushing a UIViewController in a navigation stack using the following code

[UIView animateWithDuration:0.75
                     animations:^{
                   


        
3条回答
  •  臣服心动
    2021-01-01 08:12

    //FirstViewController
    [UIView beginAnimations:@"animation" context:nil];
    [UIView setAnimationDuration:0.8]; 
    [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:self.navigationController.view cache:NO];
    [self.navigationController pushViewController: viewcontroller
     animated:NO];
    [UIView commitAnimations];
    
    //SecondViewController
    [UIView beginAnimations:@"animation" context:nil];
    [UIView setAnimationDuration:0.8];
    [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:self.navigationController.view cache:NO]; 
    [self.navigationController popViewControllerAnimated:NO];
    [UIView commitAnimations];
    

提交回复
热议问题