Reputation: 1
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];
}
warning: 'CCCallFuncND' may not respond to '+actionWithTarget:selector:indexPos:'
Does anybody can tell me why this code cause warning message? :)
Upvotes: 0
Views: 774
Reputation: 1059
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.
Upvotes: 0
Reputation: 1939
It should be data.. Not indexPos..
[CCCallFuncND actionWithTarget:pBall selector:@selector(insertBallAtCandidateList:data:) data:nIndex];
Upvotes: 1