我不确定为什么在执行 pushViewController 时会收到 SIGABRT 错误。我将 mpCustomFoodController 作为 IBOUTLET 并在我的 nib 文件中有一个 viewController 和一个等待接收它的文件,但是每次调用都会失败。
-(IBAction)createNewCustomFood:(id)sender{
[self cancelButtonColorChange:sender];
self.title = @"Cancel";
mpCustomFoodController = [[MPCustomFood alloc]initWithNibName:@"MPCustomFood" bundle:nil];
//this is where the error occurs once is calls this
[self.navigationController pushViewController:mpCustomFoodController animated:YES];
//this will be calling the new view
}