gpt4 book ai didi

ios - [iOS][cocos2d] CCCallFuncND 警告消息

转载 作者:行者123 更新时间:2023-11-29 05:06:23 25 4
gpt4 key购买 nike

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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com