Jun 9, 2018

Escaping closure

A clusure that is

  • passed in to a function as parameter
  • called after the function has returned

Closures are non-escaping by default in Swift 3+.

Use @escaping to mark it as escaping.