             didSelectItem()
         }
     }
+    
+    public func selectItem(choice: Int, animated: Bool) {
+        selectItem(choice, animated: animated, force: false)
+    }
+}
+
+extension SwiftCarousel: UIScrollViewDelegate {
+    public func scrollViewDidEndDecelerating(scrollView: UIScrollView) {
+        didSelectItem()
+    }
+    
+    public func scrollViewDidEndScrollingAnimation(scrollView: UIScrollView) {
+        didSelectItem()
+    }
+    
+    public func scrollViewWillBeginDragging(scrollView: UIScrollView) {
+        delegate?.willBeginDragging?(withOffset: scrollView.contentOffset)
+    }
+    
+    public func scrollViewDidEndDragging(scrollView: UIScrollView, willDecelerate decelerate: Bool) {
+        delegate?.didEndDragging?(withOffset: scrollView.contentOffset)
+    }
+    
+    public func scrollViewWillEndDragging(scrollView: UIScrollView, withVelocity velocity: CGPoint, targetContentOffset: UnsafeMutablePointer<CGPoint>) {
+        var velocity = velocity.x * 300.0
+        if velocity >= maxVelocity {
+            velocity = maxVelocity
+        } else if velocity <= -maxVelocity {
+            velocity = -maxVelocity
+        }
+        
+        var targetX = scrollView.contentOffset.x + CGRectGetWidth(scrollView.frame) / 2.0 + velocity
+        if (targetX > scrollView.contentSize.width || targetX < 0.0) {
+            targetX = scrollView.contentSize.width / 3.0 + velocity
+        }
+        
+        let choiceView = nearestViewAtLocation(CGPoint(x: targetX, y: CGRectGetMinY(scrollView.frame)))
+        targetContentOffset.memory.x = choiceView.center.x - scrollView.frame.width / 2.0
+    }
 }
 
 extension UIView {

    case FloatWithSpacing(CGFloat)
}

public class SwiftCarousel: UIView, UIScrollViewDelegate {
    private var maxVelocity: CGFloat = 100.0
    private var shouldScroll: Bool = false
    private var shouldScrollToPosition: CGFloat = 0.0
    private var myContext = 0
    
    //MARK: - Properties
    private var originalChoicesNumber: Int = 0
    private var choices: Array<UIView> = []
    private var scrollView = UIScrollView()

        addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("H:|[scrollView]|", options: .AlignAllCenterX, metrics: nil, views: ["scrollView": scrollView]))
        addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("V:|[scrollView]|", options: .AlignAllCenterY, metrics: nil, views: ["scrollView": scrollView]))
        
        backgroundColor = UIColor.clearColor()
        scrollView.backgroundColor = UIColor.clearColor()
        scrollView.addObserver(self, forKeyPath: "contentOffset", options: [.New, .Old], context: nil)
        
        let gestureRecognizer = UITapGestureRecognizer(target: self, action: "viewTapped:")
        gestureRecognizer.cancelsTouchesInView = false
        scrollView.addGestureRecognizer(gestureRecognizer)
    }
    
    private func setupViews(views: Array<UIView>) {
