transitionWithView使用ViewControllers

时间:2014-06-05 05:08:48

标签: ios iphone objective-c cocoa-touch

我使用以下代码进行转换:

[UIView
     transitionWithView:appDelegate.window
     duration:0.5
     options:UIViewAnimationOptionTransitionCrossDissolve
     animations:^(void) {
         BOOL oldState = [UIView areAnimationsEnabled];

         [UIView setAnimationsEnabled:NO];

         appDelegate.window.rootViewController = rootRegistrationVC;

         [UIView setAnimationsEnabled:oldState];
     }
     completion:nil];

它显示了从一个viewController到另一个viewController的crossDissolve动画,但是在这个动画之后,如果我尝试按下加载的视图控制器中的按钮,我会收到错误:

libc++abi.dylib: terminate_handler unexpectedly threw an exception

为什么会发生这种情况?

0 个答案:

没有答案