 
     UIView.animateWithDuration(duration, delay:delay, usingSpringWithDamping: damping, initialSpringVelocity: velocity, options: [], animations: { () -> Void in
       self.transform = CGAffineTransformIdentity
-      if willdisappear {
+      if willDisappear {
         self.alpha = 0
       }
       else {

    case .FadeIn:
      alpha = 0
    case .FadeOut:
      willdisappear = true
    case .FadeOutIn:
      let animation = CABasicAnimation()
      animation.keyPath = "opacity"

    var scaleX: CGFloat = 1
    var scaleY: CGFloat = 1
  
    var willDisappear = false
    
    switch(animationType) {
    case .SlideLeft:
