のサブクラスであるカスタム クラスがありSKSpriteNode
ます。spriteNodeWithColor:size:
を返すメソッドをオーバーライドしようとしていますinstancetype
。私はこれを試します:
-(instancetype)initWithColor:(UIColor *)color size:(CGSize)size{
self.color = color;
self.size = size;
//do other setup stuff here
return self;
}
しかし、毎回クラッシュします。よろしくお願いいたします。