[转]iphone之pushViewController:animated:的不同页面转换特效

1. 首先要明确的是,不使用pushViewController的默认动画,所以在调用这个函数时,要将animated设置为NO.

2. 使用普通的来CATransition实现转换效果,代码如下:

CATransition *animation = [CATransition animation];

                [animation setDuration:0.5];

                animation.type = @"oglFlip";

                [animation setSubtype:kCATransitionFromLeft];

                [animation setTimingFunction:[CAMediaTimingFunctionfunctionWithName:kCAMediaTimingFunctionEaseOut]];

                [self.navigationController pushViewController:singleVcanimated:NO];

                [self.navigationController.view.layer addAnimation:animationforKey:nil];

posted on 2013-03-22 11:09  骑驴走天下  阅读(144)  评论(0编辑  收藏  举报

导航