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”可能不会响应“+actionWithTarget:selector:indexPos:”
有人可以告诉我为什么这段代码会导致警告消息吗? :)
最佳答案
应该是数据..而不是indexPos..
[CCCallFuncND actionWithTarget:pBall selector:@selector(insertBallAtCandidateList:data:) data:nIndex];
关于ios - [iOS][cocos2d] CCCallFuncND 警告消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4993709/