Skip to content

Instantly share code, notes, and snippets.

@edwardean
Created April 24, 2017 02:12
Show Gist options
  • Save edwardean/9b0e7c9ba0c33ab327c5eada0eacff49 to your computer and use it in GitHub Desktop.
Save edwardean/9b0e7c9ba0c33ab327c5eada0eacff49 to your computer and use it in GitHub Desktop.
excute code and only once in swift:
class Once {
static let run: Void = {
print(“code execute”)
}()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment