2012-12-17 47 views
0

我以前做了一個按鈕,並從故事板,它拖動到.h文件後,並將其設置是這樣的:IOS - 讓異常刪除按鈕參考

@property (weak, nonatomic) IBOutlet UIButton *deleteComment; 

然後我意識到我需要一個動作按鈕並擦除此按鈕的代碼。現在,當我嘗試去到這個畫面,我得到這個異常:

*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<TopicEditController 0xa027ac0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key edit.' 
*** First throw call stack: 

和系統指向此點:

int main(int argc, char *argv[]) 
{ 
    @autoreleasepool 
    { 
     return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 
    } 
} 

可能有人請告訴我如何阻止這種情況發生?

謝謝!

+0

你也刪除了廈門國際銀行/故事板裏以前的連接(一個出口)? – Alladinian

回答

1

您的按鈕仍然鏈接到您刪除的插座。進入界面生成器,選擇你的按鈕。打開右側的檢查器並刪除插座連接。

enter image description here

+0

謝謝你,這是非常有益的,它的工作:) – Genadinik