[英]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.