[iOS][cocos2d]CCCallFunnd警告消息
警告:“CCCallFuncND”可能不响应“+actionWithTarget:selector:indexPos:”[iOS][cocos2d]CCCallFunnd警告消息,ios,cocos2d-iphone,Ios,Cocos2d Iphone,警告:“CCCallFuncND”可能不响应“+actionWithTarget:selector:indexPos:” 有人能告诉我为什么这个代码会导致警告信息吗?:) 应该是数据。。不是indexPos id actionScale1 = [CCScaleTo actionWithDuration:0 scale:0.1]; id actionScale2 = [CCScaleTo actionWithDuration:0.5 scale:1.0]; id actionCallFunc =
有人能告诉我为什么这个代码会导致警告信息吗?:) 应该是数据。。不是indexPos
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];
}
首先,当您转到xcode时,会收到这些类型的警告消息 在“CCCallFuncND”按下“f5”后,它将显示“CCCallFuncND”下的所有类别,然后ypu可以识别支持的类别和不支持的类别(响应) 简单的方法 玄翁是对的,试试看 这将帮助你解决这个问题
[CCCallFuncND actionWithTarget:pBall selector:@selector(insertBallAtCandidateList:data:) data:nIndex];