Take the 2-minute tour ×

My app started crashing lately I need some help to figure it out why.

In the app delegate I create a navigation controller

UINavigationController *localNavigationController;
tabBarController = [[UITabBarController alloc] init];
NSMutableArray *localControllersArray = [[NSMutableArray alloc] initWithCapacity:3];

And then load into 3 controllers (1 shown)

SecondViewController *secondViewController;
secondViewController = [[SecondViewController alloc] initWithTabBar];
localNavigationController = [[UINavigationController alloc] 


[localControllersArray addObject:localNavigationController];
[localNavigationController release];
[secondViewController release];

One of the view has a button that calls an action that pushes a new view

Ref *third = [[Ref alloc] initWithNibName:@"Fourthview" bundle:nil];

so far so good. I have updated an older xib that now I want to use but the app is crashes as soon as it pushed

Sup *third = [[Sup alloc] initWithNibName:@"Fifthview" bundle:nil];

If I go to IB and disconnect all UILabel Outlet it will work. But connecting for example pName will crash

Here's the error

'[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key pName.'


share|improve this question

1 Answer 1

up vote 1 down vote accepted

The class Sup, which is being used to load the Fifthview XIB, must have either a property or an ivar named pName. This is probably due to an IBOutlet in the XIB that connects a pName property to File's Owner.

The XIB loading process is attempting to use KVC to connect all of the IBOutlets defined in the XIB, which in practice means it's calling -[setValue:forKey:] where the key is equal to @"pName". If you already have a pName property declared in Sup, make sure you also have @synthesize pName; somewhere in the implementation in Sup.m.

share|improve this answer
You were the first one so you got the point. However it was a typo. Just spent another half hour chasing my own tail :-) The XIB file name was incorrect. –  user643097 May 24 '11 at 1:13

Your Answer


