2
votes

new to ios programming. When i run the simulator I get this error.

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle (loaded)' with name 'cusCell''

here is the line that i get the error

static NSString *CellIdentifier = @"cusCell";
customCell *cell = (customCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];

if (cell == nil)
{
    ==>    NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"cusCell" owner:self options:nil];
    cell = [nib objectAtIndex:0];
}
1
Are you trying to load your cell from a nib/xib file, or from a storyboard?zpasternack

1 Answers

0
votes

Sometimes this error can occur when you rename some files directly, and XCode fails to comprehend it. Just remove the file's reference from your project (Right Click - Delete and "Remove Reference")and just drag and drop again the files into your project. It worked for me.