         }
         return selected
     }
-    
+
     public func getSelectedValues() -> [String] {
         return self.getSelectedItems().map { (let item) -> String in
             return item.value
         }
     }
-    
+
     public func getSelectedValue() -> String {
         return self.getSelectedValues().first!
     }
-    
+
     public func onSelection(){
         self.callOnSelection(self)
     }
-    
+
     public func positionItems(){
-        
+
         if self.items.count <= 1 {
             return
         }
-        
+
         for index in 1...(self.items.count - 1) {
             let item = self.items[index]
-            item.backgroundColor = UIColor.blueColor()
             item.snp_updateConstraints(closure: { (make) -> Void in
                 make.left.width.equalTo(self)
                 make.height.equalTo(self.itemHeight)

import SnapKit

public class PineSelectGroup: UIView {
    
    public var items: [UIView] = []
    var callOnSelection : PineSelectGroup -> Void = {_ in }
    public var separator : Bool = true
    public var itemHeight = 40
    

    public required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    public init(){
        super.init(frame: CGRect.zero)
        self.setup()
    }
    
    public convenience init(items: [AnyObject]){
        self.init()
        self.pushItems(items)
        self.positionItems()
        self.after()
    }
    
    public convenience init(items: [AnyObject], onselection: (PineSelectGroup) -> Void){
        self.init(items: items)
        self.callOnSelection = onselection
    }
    
    public func setup(){
        addAnchorItem()
    }
    
    public func createItem(data: Dictionary<String, String>, group: PineSelectGroup) -> UIView {
        let item = PineSelectGroupItem(data: data, group: self)
        return item
    }
    
    func pushItems(items: [AnyObject]){
        for (index, item) in items.enumerate() {
            let entry = item as! Dictionary<String, String>

            })
        }
    }

    // OVERIDE THIS FUNCTION TO DO THINGS AFTER THE GROUP HAS BEEN DRAWN
    func after(){

    }

}
