Last active
August 29, 2015 14:15
-
-
Save claymcleod/d66f08c06918cee065be to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Title: Lazy Initialization of Swift Variables | |
// Authors: Clay McLeod | |
// Description: An example of how to create a variable using lazy initialization | |
// in the Swift programming language. | |
// Section: Swift | |
// Subsection: Variables | |
import UIKit | |
lazy var _animator : UIDynamicAnimator! = { | |
[unowned self] in | |
return UIDynamicAnimator(referenceView: self.view) | |
}() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment