谁能告诉这个下面的代码片段等效的块动画?
[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];
关于iphone - 带有 block 的UINavigationController动画过渡,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10737461/