     
     /// Initialize the component
     func setup() {
-        /// MARK: Setting buttons properties
-        buttonSlide = CGFloat(-(buttonHeight / 2))
-        
-        primaryButton.setTitle(primaryButtonTitle, forState: .Normal)
-        primaryButton.backgroundColor = primaryButtonBgColor
-        addSubview(primaryButton)
-        
-        confirmButton.setTitle(confirmButtonTitle, forState: .Normal)
-        confirmButton.backgroundColor = confirmButtonBgColor
-        addSubview(confirmButton)
-
         /// MARK: Setting label properties
         label.text = labelSuccessText
         label.textAlignment = .Center
         label.backgroundColor = labelSuccessColor
         addSubview(label)
         
-        /// MARK: Actions for buttons
-        primaryButton.addTarget(self, action: "primaryTap:", forControlEvents: .TouchDown)
+        /// MARK: Setting buttons properties
+        buttonVerticalSlide = -(buttonHeight / 2)
+        buttonHorizontalSlide = -(buttonWidth / 2)
+        
+        confirmButton.setTitle(confirmButtonTitle, forState: .Normal)
+        confirmButton.backgroundColor = confirmButtonBgColor
+        addSubview(confirmButton)
+        
+        primaryButton.setTitle(primaryButtonTitle, forState: .Normal)
+        primaryButton.backgroundColor = primaryButtonBgColor
+        addSubview(primaryButton)
+        
+        /// MARK: Setting actions for buttons
+        if primaryButtonReactsToTap {
+            primaryButton.addTarget(self, action: "primaryTap:", forControlEvents: .TouchDown)
+        }
+        else {
+            /// Adding pan gesture to primary button
+            let panReconigzer = UIPanGestureRecognizer(target: self, action: "primaryHandlePan:")
+            panReconigzer.maximumNumberOfTouches = 1
+            primaryButton.addGestureRecognizer(panReconigzer)
+        }
+        
         confirmButton.addTarget(self, action: "confirmTap:", forControlEvents: .TouchDown)
-        
-        /// Adding pan gesture to primary button
-        let panReconigzer = UIPanGestureRecognizer(target: self, action: "handlePan:")
-        panReconigzer.maximumNumberOfTouches = 1
-        primaryButton.addGestureRecognizer(panReconigzer)
     }
     
     /// Called when the system wants update a layout

        let height  = bounds.size.height
        
        primaryButton.frame = CGRect(x: 0, y: 0, width: self.buttonWidth, height: self.buttonHeight)
        confirmButton.frame = CGRect(x: 0, y: 0, width: width, height: height)
        confirmButton.hidden = true
        
        label.frame = CGRect(x: 0, y: 0, width: width, height: height)
        label.hidden = true
    }
    
    @IBAction func primaryTap(sender: UIButton) {
        UIView.animateWithDuration(buttonAnimationDuration, animations: {
            self.primaryButton.center.y = self.buttonSlide
            self.confirmButton.hidden = false
        })
    }
    
    @IBAction func handlePan(sender: UIButton) {
        UIView.animateWithDuration(buttonAnimationDuration, animations: {
            self.primaryButton.center.y = self.buttonSlide
            self.confirmButton.hidden = false
        })
    }
    
    @IBAction func confirmTap(sender: UIButton) {
        UIView.animateWithDuration(buttonAnimationDuration, animations: {
            self.confirmButton.center.y = self.buttonSlide
            self.label.hidden = false
        })
    }
}

import UIKit

class DRDoubleTapButton: UIView {
    let primaryButton   = UIButton()
    let confirmButton   = UIButton()
    let label           = UILabel()

    var buttonTitleColor   = UIColor.whiteColor()
    var buttonWidth: CGFloat = 200.0
    var buttonHeight: CGFloat = 44.0
    var buttonVerticalSlide: CGFloat = -22.0
    var buttonHorizontalSlide: CGFloat = -100.0
    var buttonSlidesHorizontally = true
    var buttonOriginalCenter: CGPoint!
    
    var primaryButtonTitle      = "Press Me"
    var primaryButtonBgColor    = UIColor.blueColor()
    var primaryButtonReactsToTap = false
    var buttonAnimationDuration = 0.5
    
    var confirmButtonTitle      = "Confirm"
