问题描述
|
(IBAction)switchAppointment {
AppointmentController *appt = [[AppointmentController alloc] initWithNibName:nil bundle:nil];
appt.modalTransitionStyle = UIModalTransitionStyleCrossdissolve;
[self presentModalViewController:appt animated:YES];
[appt release];
}
那是我用来从一个.xib切换到另一个.xib的代码,但是在写着“ self presentModalViewController:appt animation:YES \”的行上,我收到SIGABRT错误。当我尝试进入该界面时,我的应用立即崩溃。
仅供参考,我也使用Xcode 4.2,但是在下载Beta版之前就已经这样做了。
解决方法
我对代码也有相同的答案:
nextView *second=[[nextView alloc] initWithNibName:nil bundle:nil];
[self presentModalViewController:second animated:YES];
[second release];
你的
米斯卡