 		
 		repeatCount = 0;
 		coinView.layer.removeAllAnimations()
-		self.coinView.layer.contents = UIImage(named: "coin-heads-medium.png").CGImage
+		self.coinView.layer.contents = UIImage(named: "coin-heads-medium.png")!.CGImage
 		doAnimation()
 	}
 

		super.viewDidLoad()
		
		var layer:CALayer = coinView.layer
		layer.contents = UIImage(named: "coin-heads-medium.png").CGImage
	}
	
	


		if ( repeatCount++ > maxReps ) {
			
			coinView.layer.contents = (Int(arc4random()) % 2 == 0) ? UIImage(named: "coin-tails-medium.png")!.CGImage : UIImage(named: "coin-heads-medium.png")!.CGImage
			coinView.layer.transform = CATransform3DIdentity
			flipButton.enabled = true
			
