This class is not key value coding-compliant for the key Picker

瘦欲@ 提交于 2019-12-25 19:07:12

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/17814389/this-class-is-not-key-value-coding-compliant-for-the-key-picker

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!