我有一个自定义类,它是SKSpriteNode
. 我正在尝试覆盖spriteNodeWithColor:size:
返回的方法instancetype
。我试试这个:
-(instancetype)initWithColor:(UIColor *)color size:(CGSize)size{
self.color = color;
self.size = size;
//do other setup stuff here
return self;
}
但它每次都崩溃。在此先感谢您的帮助