2011-02-14 99 views
0
id actionScale1 = [CCScaleTo actionWithDuration:0 scale:0.1]; 
id actionScale2 = [CCScaleTo actionWithDuration:0.5 scale:1.0]; 
id actionCallFunc = [CCCallFuncND actionWithTarget:pBall selector:@selector(insertBallAtCandidateList:indexPos:) indexPos:nIndex, nil]; 
id actionSequence = [CCSequence actions:actionScale1, actionScale2, actionCallFunc, nil]; 


- (void) insertBallAtCandidateList:(Ball*)ball indexPos:(NSInteger)nIndex { 
[candidateBalls insertObject:ball atIndex:nIndex]; 
} 

警告: 'CCCallFuncND' 可能不響應 ':選擇:indexPos:+ actionWithTarget'[的iOS] [cocos2d的] CCCallFuncND警告消息

是否有人能告訴我爲什麼這個代碼原因警告消息? :)

回答

1

它應該是數據..不.. indexPos

[CCCallFuncND actionWithTarget:pBall selector:@selector(insertBallAtCandidateList:data:) data:nIndex]; 
0

第一u得到這些類型的警告信息,你去你的Xcode。

在「CCCallFuncND」按下「f5」後,它會顯示「CCCallFuncND」下的所有類別,然後ypu可以識別哪一個支持哪些不支持(響應)。

簡單的方法.......

玄翁是對的那個。

這將幫助你解決這個問題。