         leftAlignedMixedOnOffCollectionViewController.view.addConstraint(leftAlignedMixedOnOffCollectionViewHeightConstraint)
     }
     
+    
+    
     internal func setupSearchBarControllerAtIndex(index: Int) {
+        contentStackView.insertArrangedSubview(searchBar, atIndex: index)
+        searchBar.delegate = self
+        searchBar.setNeedsLayout()
+        searchBar.layoutIfNeeded()
+        var searchTextField_ : UITextField? = nil
+        for subview in searchBar.subviews.first?.subviews ?? [UIView]() {
+            if let subview = subview as? UITextField {
+                searchTextField_ = subview
+                break
+            }
+        }
+        
+        guard let searchTextField = searchTextField_ else {
+            print("Could not find textfield in searchbar")
+            return
+        }
+        
+        searchTextField.leftViewMode = .Never
+        searchTextField.rightViewMode = .Never
+    
+        let tagScrollView = UIScrollView(frame: CGRectZero)
+        tagScrollView.showsHorizontalScrollIndicator = false
+        tagScrollView.showsVerticalScrollIndicator = false
+        tagScrollView.bounces = false
+        tagScrollView.translatesAutoresizingMaskIntoConstraints = false
+        searchTextField.addSubview(tagScrollView)
+        
+        var constraints = [NSLayoutConstraint]()
+        var dict : [String:UIView] = ["self": tagScrollView, "super": searchTextField]
+        constraints.append(NSLayoutConstraint(expressionFormat: "self.left = super.left + 3", parameters: dict))
+        constraints.append(NSLayoutConstraint(expressionFormat: "self.right = super.right - 3", parameters: dict))
+        constraints.append(NSLayoutConstraint(expressionFormat: "self.top = super.top + 4", parameters: dict))
+        constraints.append(NSLayoutConstraint(expressionFormat: "self.bottom = super.bottom - 4", parameters: dict))
+        searchTextField.addConstraints(constraints)
+
+        
         searchBarController = SnapTagsCollectionViewController()
         searchBarController.sizer = sizer
         searchBarController.configuration = searchBarViewConfig()

        let leftAlignedMixedOnOffContentSize = leftAlignedMixedOnOffCollectionViewController.contentSize()
        leftAlignedMixedOnOffCollectionViewHeightConstraint.constant = leftAlignedMixedOnOffContentSize.height
        
        searchBarController.scrollEnabled = false
        let searchBarContentSize = searchBarController.contentSize()
        searchBarHeightConstraint.constant = searchBarContentSize.height

        tagBarViewController.scrollEnabled = false
        let tagBarContentSize = tagBarViewController.contentSize()


}

extension ViewController : UISearchBarDelegate {
    func searchBarShouldBeginEditing(searchBar: UISearchBar) -> Bool {
        return false
    }
}