我學習cocos2d的一些書籍,即通過巴勃羅·魯伊斯·書,這裏是一些代碼:在ARC橋接投和Cocos2d
[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
我試着修復它無濟於事。我該怎麼辦?我試圖改變無效*到NSMutableArray,仍然沒有幫助。我如何橋接演員?我嘗試使用__bridge
,但它說,你不能橋接施放NSMutableArray。
考慮使用CCCallBlock而不是 – LearnCocos2D 2012-07-26 14:22:36