UINavigationController 从下向上的视图切换效果

#import <QuartzCore/QuartzCore.h>


  

UIViewController *newVC = [[UIViewControlleralloc] initWithNibName:nilbundle:nil];

    newVC.view.backgroundColor = [UIColororangeColor];

    

   CATransition *transition = [CATransitionanimation];

    transition.duration =1;

    transition.timingFunction = [CAMediaTimingFunctionfunctionWithName:kCAMediaTimingFunctionEaseInEaseOut]; 

    transition.type =kCATransitionPush

    transition.subtype =kCATransitionFromTop;

    transition.delegate =self

    [self.navigationController.view.layeraddAnimation:transitionforKey:nil];

   self.navigationController.navigationBarHidden =NO

    [self.navigationControllerpushViewController:newVC animated:NO];


你可能感兴趣的:(UINavigationController 从下向上的视图切换效果)