[的iOS] [cocos2d的] CCCallFuncND警告消息

问题描述:

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警告消息

是否有人能告诉我为什么这个代码原因警告消息? :)

它应该是数据..不.. indexPos

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

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

在“CCCallFuncND”按下“f5”后,它会显示“CCCallFuncND”下的所有类别,然后ypu可以识别哪一个支持哪些不支持(响应)。

简单的方法.......

玄翁是对的那个。

这将帮助你解决这个问题。