 
     func scrollOffsetTo(offset: CGPoint, animated: Bool) {
         let duration = animated ? bar!.durationForAnimation : 0
-        animating = true
         UIView.animateWithDuration(duration, animations: {
             self.contentOffset = offset
             }, completion: { _ in
-                self.animating = false
                 self.updateSubviews()
         })
     }


        weak var bar: MenuBar?
        var visibledCells = [MenuCell]()
        var animating = false

        override init(frame: CGRect) {
            super.init(frame: frame)


extension MenuBar.ContainerView : UIScrollViewDelegate {

    public func scrollViewDidEndDecelerating(scrollView: UIScrollView) {
        userInteractionDidEnd()
    }
