设置presentVC跟PushVC一样的效果即从右到左的动画

 SettingViewController *VC = [[SettingViewControlleralloc]init];

        VC.view.backgroundColor = [UIColorwhiteColor];

        BaseNavigationController *nav = [[BaseNavigationControlleralloc]initWithRootViewController:VC];

        nav.navigationBar.barTintColor = kRedColor;

        

        CATransition *tran = [CATransitionanimation];

        tran.type = kCATransitionPush;

        tran.subtype = kCATransitionFromRight;

        tran.duration = 0.5;

        [[UIApplicationsharedApplication].keyWindow.layeraddAnimation:tran forKey:@"PushFromRight"];

        

        [selfpresentViewController:nav animated:YEScompletion:^{

            

 

        }];

 

posted on 2015-04-24 11:56  助金  阅读(495)  评论(0编辑  收藏  举报