亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

setValue:forUndefinedKey:此類與鍵的鍵值編碼不兼容

setValue:forUndefinedKey:此類與鍵的鍵值編碼不兼容

慕桂英546537 2019-10-08 15:26:59
我正在創建一個登錄以查看支持票。第一個視圖是票證視圖,如果您未登錄,則將您帶到登錄屏幕。但是我收到這個:支持[3209:18e03] *由于未捕獲的異常'NSUnknownKeyException'而終止應用程序,原因:'[setValue:forUndefinedKey:]:此類不適用于鍵LoginScreen的鍵值編碼。*第一擲調用堆棧:(0x1f17012 0x1634e7e 0x1f9ffb1 0x10e1711 0x1062ec8 0x10629b7 0x108d428 0x7990cc 0x1648663 0x1f1245a 0x797bcf 0x65ce37 0x65d418 0x65d648 0x65d882 0x669235 0x8683d2 0x6664f3 0x666777 0x6667b7 0x9d1fe2 0x9c3ad9 0x65e422 0x2b15 0x65f753 0x65fb2f 0x661286 0x65fe3f 0x592910 0x592895 0x5926e5 0x1edfafe 0x1edfa3d 0x1ebd7c2 0x1ebcf44 0x1ebce1b 0x22aa7e3 0x22aa668 0x57c65c 0x1f0d 0x1e35)的libc + + abi.dylib:終止調用引發異常這是我的LoginScreen.m代碼#import "UIAlertView+error.h"#import "LoginScreen.h"#import "API.h"#include <CommonCrypto/CommonDigest.h>#define sayWhat @"REMOVEDFORSECURITY"@implementation LoginScreen-(void)viewDidLoad {    NSLog(@"Found me!");    [super viewDidLoad];    //focus on the username field /show keyboard    [fldUsername becomeFirstResponder];}- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation{        // Return YES for supported orientations        return (interfaceOrientation == UIInterfaceOrientationPortrait);    }    -(IBAction)btnLoginRegisterTapped:(UIButton*)sender {    if (fldUsername.text.length < 4 || fldPassword.text.length < 4){        [UIAlertView error:@"Enter username and password over 4 chars each."];        return;    }    //very basic encryption called "salting"    NSString* saltedPassword = [NSString stringWithFormat:@"%@%@", fldPassword.text, sayWhat];    //prep the hashed storage    NSString* hashedPassword = nil;    unsigned char hashedPasswordData[CC_SHA1_DIGEST_LENGTH];
查看完整描述

4 回答

?
白豬掌柜的

TA貢獻1893條經驗 獲得超10個贊

此類莫名其妙的異常通常是xib文件不干凈的結果。xib在xcode中打開,選擇“文件所有者”,然后單擊“連接檢查器”(右上角箭頭),一次查看所有出口。尋找!s表示缺少電源插座。


查看完整回答
反對 回復 2019-10-08
?
catspeake

TA貢獻1111條經驗 獲得超0個贊

在Interface Builder中檢查您的連接。您可能是指不存在的IBOutletIBAction。


查看完整回答
反對 回復 2019-10-08
?
MMMHUHU

TA貢獻1834條經驗 獲得超8個贊

http://img1.sycdn.imooc.com//5d9c3a730001382602360149.jpg

多謝你們。我通過您的幫助解決了這個問題。因此,希望此屏幕截圖對遇到相同問題的人有所幫助。


查看完整回答
反對 回復 2019-10-08
  • 4 回答
  • 0 關注
  • 1568 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號