欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Sending 'ccColor4B' (aka 'struct_ccColor4B') to parameter of incompatible type

程序员文章站 2022-03-16 09:59:38
...
今天遇到了如下的一个错误,
Sending 'ccColor4B' (aka 'struct_ccColor4B') to parameter of incompatible type CiColor
网上搜寻解决方案如下,就是要强制设置下类型。
按如下改变:
+ (id) layerWithColor:(ccColor4B)color
{
    return [[(CCColorLayer*)[self alloc] initWithColor:color] autorelease];
    //return [[[self alloc] initWithColor:color] autorelease];
}