使用块动画UINavigationController过渡

Gra*_*ell 1 iphone xcode objective-c ios objective-c-blocks

任何人都可以告诉块动画相当于下面的代码片段吗?

[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];
Run Code Online (Sandbox Code Playgroud)

Pau*_*ter 12

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];
Run Code Online (Sandbox Code Playgroud)