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

标签 ios cocos2d-iphone

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/

相关文章:

c++ - 这段代码如何对链接器隐藏符号?

ios - UITableViewCell 不水平裁剪内容

ios - 如何将 png 图像复制到剪贴板以便将其粘贴到其他应用程序中?

objective-c - 括号+点语法问题

objective-c - 在 Cocos2d 中没有调用单例方法

ios - iAd 中的奇怪错误

ios - Cocos2d。数字操纵杆(游戏 handle )?

ios - 将单元格添加到现有的 UICollectionView(发送到不可变对象(immutable对象)的变异方法)

ios - 什么类型的 HealthKit 单元用于 VO2 Max 测量? - swift 4

ios - 如何使用 ViewModifier 在 swiftUI 中选择性地设置前景色以查看