iOS故事板崩溃NSUnknownKeyException

时间:2016-01-11 04:06:51

标签: ios nsunknownkeyexception

我有一个单独的视图应用程序,其中包含操作和插座。我收到这个错误。

- (void)showiAdBanner
 {
    if( !_adView ) { // only add to view if it's not already there
        _adView = [[ADBannerView alloc] initWithFrame:CGRectMake(0, self.view.frame.size.height - 50, 320, 50)]; //initialize it
        _adView.delegate = self; // set delegate
    }
    _adView.hidden = NO; //reveal it
    _bannerIsVisible = YES; //set bool to yes
}

- (void)hideiAdBanner {
   _adView.hidden = YES; //hide it
   _bannerIsVisible = NO; // set bool to no
}

我检查了2016-01-11 12:00:21.279 Dummy[1118:85250] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIViewController 0x7fd50b626eb0> setValue :forUndefinedKey:]: this class is not key value coding-compliant for the key addressField.' ,并且它正确地挂钩了代码。这是一个重现问题的虚拟项目:

https://github.com/LinHuan/Dummy

0 个答案:

没有答案