-1

I added a view to my app that I open from a button and can't find what I'm doing wrong.

I triple checked that dataSource & delegate are connected to File's Owner

*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<HelpViewController 0xab58980> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key Picker.'

The code in my viewcontroller.h

@interface LanguageSelectionViewController : UIViewController {

    IBOutlet UILabel *label;
    IBOutlet UIPickerView *Picker;
    NSArray *PickerData;
}

@property (retain, nonatomic) IBOutlet UIPickerView *Picker;
@property (retain, nonatomic) NSArray *PickerData;
@end

Anyone got a solution or a tip in the right direction?

rmaddy
  • 314,917
  • 42
  • 532
  • 579
  • 6
    Yup, looks like you have connected an outlet to a property called "Picker" and then deleted the property in the code. You also need to remove the connection from the Storyboard file/Xib file. – Fogmeister Jul 23 '13 at 15:24
  • possible duplicate of [The class is not key value coding-compliant for the key](http://stackoverflow.com/questions/5932397/the-class-is-not-key-value-coding-compliant-for-the-key) – rmaddy Jul 23 '13 at 15:47
  • Also see these search results: http://stackoverflow.com/search?q=NSUnknownKeyException+class+is+not+key+value+coding-compliant+for+the+key . Please always do a some searching on error messages before posting a question. – rmaddy Jul 23 '13 at 15:48

1 Answers1

2

Go to your storyboard click the helpviewcontroller (the whole thing so you have a blue outline around the view) now with the utility toolbar (toolbar on the right) click the arrow (the right most icon) you should see a ! mark on one of the connections. Delete that and it should work.

BluGeni
  • 3,378
  • 8
  • 36
  • 64