      The "home" location is the traditional location of `UILabel` text. This property essentially reflects if a scroll animation is underway.
      */
     public var awayFromHome: Bool {
+        #if swift(>=2.3)
         if let presentationLayer = sublabel.layer.presentationLayer() {
             return !(presentationLayer.position.x == homeLabelFrame.origin.x)
         }
+        #else
+        if let presentationLayer = sublabel.layer.presentationLayer() as? CALayer {
+            return !(presentationLayer.position.x == homeLabelFrame.origin.x)
+        }
+        #endif
         
         return false
     }

import QuartzCore

@IBDesignable

public class MarqueeLabel: UILabel, CAAnimationDelegate {
    

        }
    }
    
    #if swift(>=2.3)
    public func animationDidStop(anim: CAAnimation, finished flag: Bool) {
        scrollDidStop(anim, finished: flag)
    }
    #else
    override public func animationDidStop(anim: CAAnimation, finished flag: Bool) {
        scrollDidStop(anim, finished: flag)
    }
    #endif
    
    private func scrollDidStop(anim: CAAnimation, finished flag: Bool) {
        if let setupAnim = anim as? GradientSetupAnimation {
            if let finalColors = setupAnim.toValue as? [CGColorRef] {
                maskLayer?.colors = finalColors
