 
         var prevView: UIView? = nil
         for view in categoryButtons {
-            contentView.addSubview(view)
+            buttonViews.addSubview(view)
 
             view.snp_makeConstraints { make in
-                make.centerY.equalTo(contentView)
+                make.centerY.equalTo(buttonViews)
 
                 if let prevView = prevView {
                     make.leading.equalTo(prevView.snp_trailing).offset(Size.spacing)
                 }
                 else {
-                    make.leading.equalTo(contentView.snp_leading).offset(Size.sideMargins)
+                    make.leading.equalTo(buttonViews.snp_leading).offset(Size.sideMargins)
                 }
             }
 
             prevView = view
         }
 
-        layoutIfNeeded()
-
-        for view in categoryButtons {
-            if view.frame.maxX > allCategoriesButton.frame.minX {
-                view.hidden = true
+        if let prevView = prevView {
+            prevView.snp_makeConstraints { make in
+                make.trailing.equalTo(buttonViews.snp_trailing).offset(-Size.sideMargins)
             }
         }
     }

    }

    private func arrange() {
        contentView.addSubview(allCategoriesButton)

        allCategoriesButton.snp_makeConstraints { make in
            make.top.bottom.trailing.equalTo(contentView)
            make.width.equalTo(contentView.snp_height)
        }
    }



    private var buttonEndpointLookup: [UIButton: ElloAPI] = [:]
    private var categoryButtons: [UIButton] = []
    private var gradientView = UIView()
    private var buttonViews = UIScrollView()
    private var gradientLayer = CAGradientLayer()
    private var allCategoriesButton = WhiteElloButton()

    private class func buttonTitle(category: String, selected: Bool) -> NSAttributedString {
        var attrs: [String: AnyObject] = [
