2
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'

Paul Floyd
  • 5,530
  • 5
  • 29
  • 43
Jai Singh
  • 21
  • 1
  • 2

1 Answers1

6

() -> Void is not Optional so it can not be nil.

You should pass empty closure as completion parameter:

..., completion: {})
mixel
  • 25,177
  • 13
  • 126
  • 165