Skip to content

Instantly share code, notes, and snippets.

@totiz
Last active September 12, 2018 09:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save totiz/d3da94b08bf21e1de4acf5f05d117333 to your computer and use it in GitHub Desktop.
Save totiz/d3da94b08bf21e1de4acf5f05d117333 to your computer and use it in GitHub Desktop.
Lazy Controller
class Controller {
lazy var things = [String]()
lazy var lines: [Line] = {
return [Line(begin: CGPoint(x: 1, y: 1), end: CGPoint(x: 20, y: 20)),
Line(begin: CGPoint(x: 50, y: 50), end: CGPoint(x: 10, y: 10))]
}()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment