Reputation: 21
SKAction.group([moveToAction, SKAction.fadeAlphaTo(1.0, duration: 0.2)]), completion:nil)
}
runAction(SKAction.waitForDuration(0.2), completion: completion)
When I do this, I get the error:
nil is not compatible with expected argument type '() -> Void'
Upvotes: 2
Views: 4625
Reputation: 25846
() -> Void
is not Optional
so it can not be nil
.
You should pass empty closure as completion
parameter:
..., completion: {})
Upvotes: 6