SIGABRT error when using pushViewController

I'm not sure why I get a SIGABRT error when I go to make pushViewController. I have mpCustomFoodController as an IBOUTLET, and I have a viewController inside my nib file and the file that is waiting to receive it, but then it fails on this call every time.

 -(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

}

+3
source share
2 answers

If I were to guess, I would say that you are either not using the correct nib name, or your File Owner object does not have a nonexistent outlet that is assigned. In addition, if you replaced the main view in nib or changed the class of your controller, the output viewmay not be assigned.

+6
source

.. . , nib , .

0

All Articles