iOS 4.3上的PresentViewController崩溃,但iOS 5上没有

iOS 4.3上的PresentViewController崩溃,但iOS 5上没有,ios,xcode,crash,sigabrt,Ios,Xcode,Crash,Sigabrt,有人能告诉我为什么在4.3模拟器上,当SIGABRT未识别选择器被发送到实例时,这段代码会崩溃,但在iOS5模拟器上运行良好 matchSetup = [[viewMatchSetup alloc]initWithNibName:@"viewMatchSetup" bundle:nil]; [matchSetup setModalTransitionStyle:UIModalTransitionStyleFlipHorizontal]; [self presentViewController:m

有人能告诉我为什么在4.3模拟器上,当SIGABRT未识别选择器被发送到实例时,这段代码会崩溃,但在iOS5模拟器上运行良好

matchSetup = [[viewMatchSetup alloc]initWithNibName:@"viewMatchSetup" bundle:nil];
[matchSetup setModalTransitionStyle:UIModalTransitionStyleFlipHorizontal];
[self presentViewController:matchSetup animated:YES completion:NULL];
提前谢谢


修复:[自我呈现ModalviewController:matchSetup动画:是]//模态是必需的更改

它会崩溃,因为iOS 4.3上没有
ui视图控制器
presentViewController:animated:completion:
方法。它是在iOS 5中引入的。由于不使用完成块,只需使用“旧”方法
presentModalViewController:animated:

[self presentModalViewController:matchSetup animated:YES];

您可以使用
响应选择器:
功能[self-presentViewController:matchSetup animated:YES]执行检查;哦,行了,那也不行。同样的错误。[self-presentModalViewController:matchSetup-animated:YES]WorksTouch,尽管我引用了正确名称的方法,但我的示例是错误的。我已经修好了。