 import Foundation
 import UIKit
 
-let PINK = UIColor(red:0.992157, green: 0.215686, blue: 0.403922, alpha: 1)
-let DARK_PINK = UIColor(red:0.798012, green: 0.171076, blue: 0.321758, alpha: 1)
-
 @IBDesignable
 public class TKTransitionSubmitButton : UIButton, UIViewControllerTransitioningDelegate {
+    
+    lazy var spiner: SpinerLayer! = {
+        let s = SpinerLayer(frame: self.frame)
+        self.layer.addSublayer(s)
+        return s
+    }()
+    
+    @IBInspectable var spinnerColor: UIColor = UIColor.whiteColor() {
+        didSet {
+            spiner.spinnerColor = spinnerColor
+        }
+    }
     
     public var didEndFinishAnimation : (()->())? = nil
 

        }
    }
    
    func returnToOriginalState() {
        
        self.layer.removeAllAnimations()
        self.setTitle(self.cachedTitle, forState: .Normal)
    }
    
    func shrink() {

    let shrinkCurve = CAMediaTimingFunction(name: kCAMediaTimingFunctionLinear)
    let expandCurve = CAMediaTimingFunction(controlPoints: 0.95, 0.02, 1, 0.05)
    let shrinkDuration: CFTimeInterval  = 0.1
    @IBInspectable public var normalCornerRadius:CGFloat? = 0.0{
        didSet {
            self.layer.cornerRadius = normalCornerRadius!
