简体   繁体   English

带有块的UINavigationController动画过渡

[英]Animate UINavigationController transition with blocks

Can anyone tell the block animation equivalent of this below code snippet? 谁能告诉这个下面的代码片段等效的块动画?

[UIView beginAnimations:@"View Flip" context:nil];
[UIView setAnimationDuration:0.75];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight 
           forView:self.navigationController.view cache:NO];

NextViewController *next = [[NextViewController alloc] 
           initWithNibName:@"NextViewController" bundle:nil];

[self.navigationController pushViewController:next animated:YES];
[next release];
[UIView commitAnimations];
NextViewController *next = [[NextViewController alloc] initWithNibName:@"NextViewController" bundle:nil];

[UIView transitionWithView:self.navigationController.view 
                  duration:0.75 
                   options:UIViewAnimationOptionTransitionFlipFromRight 
                animations:^{
                 [self.navigationController pushViewController:next animated:NO];
                } 
                completion:nil];
UIView: + (void)transitionFromView:(UIView *)fromView toView:(UIView *)toView duration:(NSTimeInterval)duration options:(UIViewAnimationOptions)options completion:(void (^)(BOOL finished))completion

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 UINavigationController-使用后退按钮弹出时如何不设置动画? - UINavigationController - how to not animate when popping using backbutton? UINavigationController + UITableViewController 在横向方向的返回转换错误 - Back Transition Wrong in UINavigationController + UITableViewController in Landscape Orientation 在动画ViewController转换期间将ViewControllers推送到UINavigationController - Pushing ViewControllers to UINavigationController during an animated ViewController transition UINavigationController:推大图像时过渡不平滑 - UINavigationController: transition not smooth while pushing large images UINavigationController推送过渡期间的低帧速率 - Low frame rate during UINavigationController push transition 更改UINavigationController过渡效果的正确方法是什么 - What is the proper way to change the UINavigationController transition effect UINavigationController转换动画触发太快 - UINavigationController transition animations triggered too fast iPhone开发人员-UINavigationController可以使视图的一部分动画吗? - iphone dev - Can UINavigationController animate part of the view? iPhone UINavigationController:仅对视图的一部分进行动画处理 - iPhone UINavigationController : Animate only part of the view 如何为视图之间的过渡设置动画? - how to animate transition between views?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM