         return animation
     }
     
-    private func timingFunctionForAnimationOptions(options: UIViewAnimationOptions) -> CAMediaTimingFunction {
+    private func timingFunctionForAnimationCurve(curve: UIViewAnimationCurve) -> CAMediaTimingFunction {
         var timingFunction: NSString? = nil
         
-        switch options {
-        case UIViewAnimationOptions.CurveEaseIn:
+        switch curve {
+        case .EaseIn:
             timingFunction = kCAMediaTimingFunctionEaseIn
-        case UIViewAnimationOptions.CurveEaseInOut:
+        case .EaseInOut:
             timingFunction = kCAMediaTimingFunctionEaseInEaseOut
-        case UIViewAnimationOptions.CurveEaseOut:
+        case .EaseOut:
             timingFunction = kCAMediaTimingFunctionEaseOut
         default:
             timingFunction = kCAMediaTimingFunctionLinear

        let animation = CAKeyframeAnimation(keyPath: "locations")
        
        // Get timing function
        let timingFunction = timingFunctionForAnimationOptions(animationCurve)
        
        // Define keyTimes
        switch (type) {

        let animation = CAKeyframeAnimation(keyPath: property)
        
        // Get timing function
        let timingFunction = timingFunctionForAnimationCurve(animationCurve)
        
        // Calculate times based on marqueeType
        var totalDuration: NSTimeInterval = 0.0
