我正在創(chuàng)建一個(gè)登錄以查看支持票。第一個(gè)視圖是票證視圖,如果您未登錄,則將您帶到登錄屏幕。但是我收到這個(gè):支持[3209:18e03] *由于未捕獲的異常'NSUnknownKeyException'而終止應(yīng)用程序,原因:'[setValue:forUndefinedKey:]:此類不適用于鍵LoginScreen的鍵值編碼。*第一擲調(diào)用堆棧:(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:終止調(diào)用引發(fā)異常這是我的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貢獻(xiàn)1893條經(jīng)驗(yàn) 獲得超10個(gè)贊
此類莫名其妙的異常通常是xib
文件不干凈的結(jié)果。xib
在xcode中打開,選擇“文件所有者”,然后單擊“連接檢查器”(右上角箭頭),一次查看所有出口。尋找!
s表示缺少電源插座。

catspeake
TA貢獻(xiàn)1111條經(jīng)驗(yàn) 獲得超0個(gè)贊
在Interface Builder中檢查您的連接。您可能是指不存在的IBOutlet
或IBAction
。

MMMHUHU
TA貢獻(xiàn)1834條經(jīng)驗(yàn) 獲得超8個(gè)贊
多謝你們。我通過您的幫助解決了這個(gè)問題。因此,希望此屏幕截圖對(duì)遇到相同問題的人有所幫助。
- 4 回答
- 0 關(guān)注
- 1538 瀏覽
添加回答
舉報(bào)
0/150
提交
取消