您的位置:首页 > 产品设计 > UI/UE

UINavigationController的push动画效果

2013-11-14 11:19 405 查看
CATransition *transition = [CATransition animation];

transition.duration = kAnimationDuration;

transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];

transition.type = kCATransitionPush;

transition.subtype = kCATransitionFromTop;

transitioning = YES;

transition.delegate = self;

[self.navigationController.view.layer addAnimation:transition forKey:nil];

self.navigationController.navigationBarHidden = NO;

[self.navigationController pushViewController:tableViewController animated:YES];

可是为什么没有翻页等动作呢,即UIViewAnimationTransitionFlipFromRight? transition.type的动作有

Transition Type Description

kCATransitionFade The layer fades as it becomes visible or hidden.

kCATransitionMoveIn The layer slides into place over any existing content.

kCATransitionPush The layer pushes any existing content as it slides into place

kCATransitionReveal The layer is gradually revealed in the direction specified
by the transition subtype.

源地址,之前用过一点,讨论的帖子,mark下。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: