UINavigationController的push动画效果

来源:互联网 发布:java定时器的工作原理 编辑:程序博客网 时间:2024/05/16 13:58
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下。

原创粉丝点击