1.報錯: "OBJC_CLASS$_TableViewController", referenced from:
clang: error: linker command failed with exit code 1 (use -v to see invocation)
原因:類可以import也可以打代碼宵溅,但是找不到桃犬,是因為沒有參與編譯,可能是新建類的時候沒有勾選target
解決:選中對應(yīng)的target點build phases 第二個下面沒有它再菊,把它加進去就可以了
2.報錯:[<TestAudioPlayerViewController 0x198620> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key w.'
原因:在xib中某個控件已經(jīng)通過outlet連接到ViewController中的某個變量上了,后來變量刪除了碌奉,但是這種連接關(guān)系沒有刪除而晒,導(dǎo)致啟動時找不到對應(yīng)的key略步,拋出上述exception
解決:把多的線刪掉
3.報錯:unable to dequeue a cell with identifier cell - must register a nib or a class for the identifier or connect a prototype cell in a storyboard
原因:沒有register。
解決:[self.tableView register...]
4.報錯:Could not find a storyboard named 'Main'
原因:想手寫代碼刪了storyBoard沒刪除main
解決:target下Development Info 下 main interface 刪除main
5.報錯:linker command failed with exit code 1
"duplicate symbol OBJC_METACLASS$_類名 in:"錯誤
原因:
1.90%都是因為#import了.m文件
2.其他可能是因為項目中存在了2個一樣的.m文件
解決:刪改
6.報錯:Unknown class in Interface Builder
原因:沒有把storyBoard和對應(yīng)的類聯(lián)系起來
7.報錯:'Invalid update: invalid number of rows in section 0. The number of rows contained in an existing section after the update (6) must be equal to the number of rows contained in that section before the update (6), plus or minus the number of rows inserted or deleted from that section (0 inserted, 1 deleted) and plus or minus the number of rows moved into or out of that section (0 moved in, 0 moved out).'
原因:刪除單元格時應(yīng)該先修改數(shù)據(jù)模型再刪除
8.模擬器是黑的
原因:1.沒有加makeVisible
2.沒有把storyBoard里的箭頭指向某個C
9.報錯:Push segues can only be used when the source controller is managed by an instance of UINavigationController.
原因:第一個的箭頭應(yīng)該指向navi而不是第一個VC盯滚,這樣都沒有navibar