Trying to migrate my project to Swift 2.
I get a lot of compiler errors, most of which are easy to fix, as they are just syntactic changes.
However, I do not know how best to deal with this error:
When calling the designated initializer from my subclass SKSpriteNode, an error message appears: "Type" UIColor "does not comply with the protocol" NilLiteralConvertible "for transmission nilto color:
import SpriteKit
class MyClass: SKSpriteNode {
init() {
let texture = SKTexture(imageNamed: "MyTexture.png")
super.init(texture: texture, color: nil, size: texture.size())
}
}
I can get around this by passing UIColor.clearColor(), but I think this is not the right way to handle this.
Any suggestions that were highly appreciated, as well as what has changed here (of course, there was enough explanation link)?