开发者

[iOS][cocos2d] CCCallFuncND warning message

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 actio开发者_StackOverflowns:actionScale1, actionScale2, actionCallFunc, nil];


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

warning: 'CCCallFuncND' may not respond to '+actionWithTarget:selector:indexPos:'

Does anybody can tell me why this code cause warning message? :)


It should be data.. Not indexPos..

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


first u get these type of warning message you go to your xcode.

after "CCCallFuncND" press 'f5' it will display what all the category is coming under "CCCallFuncND" then ypu can identify which one supports are which not support(responding).

Simple way.......

Xuanweng is right try that.

that will help you to solve this.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜