0.unrecognized selector sent to instance:
1、向一個已釋放對像發送資訊
2、向一個不存在的對像發送資訊,特別注意,有參數的方向法名要加":"號(@seletor(dosomething:))
1.this class is not key value coding-compliant for the key ...1、interface build與代碼中IBOutlet的串連所引起的。2、在代碼中對iboutlet的名稱進行了修改,導致interface build中的串連實效。3、如果在該viewcontroller串連的xib檔案中沒發現錯誤,那就很可能是mainWindow.xib檔案中存在問題,在mainWindow.xib的tabbarcontroller的某個tab的viewcontroller設定了loadfrom"**.xib",但忘了將其class設為對應的viewcontroller類了。
2.Local declaration of 'scrollView' hides instance variable 1、己存在一個和 'scrollView'一樣的外部變數(指標)
3. 使用 main.xib時,有 報“defines presentation context is not available prior to xcode 4.2 ”的waring。解決: 選擇main.xib的 navigation controller , 然後,Development選擇 Xcode 4.2
4.Property with 'retain (or strong)' attribute must be of object type...通常是聲名id,int等類型當作指標導致,不要*號即可。
5.Missing file warnings 由於我使用了xcode內建的respositories,按照網上在終端輸入指令的方法均不可行。這裡我有個方法,在該項目xcode裡在同一個地方新之建同一樣的檔案,然後在xcode裡刪除,即可。
6.mutating method sent to immutable object....mutating method(可變數對應的方法)
immutable object(不可改變的變數):
明白了吧?比如將NSMutableArray的方法用在NSArray上就會報這個錯誤。
7.Multiple build commands for output file
target引用了名字重複的資源,找到當前的target,展開之後,找到Copy Bundle Resources欄目,然後在裡面找到重複名字的資源,刪除不要的那個即可