I'm trying to lazy instantiate a UIDynamicAnimator in my code. I want to initialise it with an UIView as an IBOutlet I have.
class ViewController: UIViewController {
@IBOutlet var gameView : UIView
@lazy var animator = UIDynamicAnimator(referenceView: gameView)
...
I'm assuming this isn't working because the UIView isn't yet created because the animator property throws back an error saying it can't find the gameView.
How can I get around this?