pushViewController专场动画

注意[self.navigationController pushViewController:MyVC animated:NO]; 设置成NO

CATransition *animation = [CATransition animation];
    
    [animation setDuration:0.3];
    
    [animation setType: kCATransitionMoveIn];
    
    [animation setSubtype: kCATransitionFromTop];
    
    [animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionDefault]];

    [self.navigationController pushViewController:MyVC animated:NO];
    
    
    [self.navigationController.view.layer addAnimation:animation forKey:nil];

你可能感兴趣的:(pushViewController专场动画)