我正在用一些书学习 cocos2d,即 Pablo Ruiz 的书,这里有一些代码:
[next runAction:[CCSequence actions:[CCDelayTime
actionWithDuration:2],
[CCFadeIn actionWithDuration:1],
[CCDelayTime actionWithDuration:2],
[CCCallFuncND actionWithTarget:self selector:@selector(cFadeAndShow:data:)
data:images],nil]];
- (void) cFadeAndShow: (id)sender data:(void*) data
{
NSMutableArray *images = data;
[self fadeAndShow:images];
}
它给了我一个错误显示在数据上:runAction 中的图像:
Implicit conversion of Objective-C pointer type 'NSMutableArray *' to C pointer type 'void *' requires a bridged cast
我尝试修复它无济于事。我该怎么办?我尝试将 void* 更改为 NSMutableArray,但仍然没有帮助。如何桥接施法?我试过使用__bridge
,但它说你不能桥接转换 NSMutableArray。