         }
     }
     
-    override func layoutSubviews() {
-        
+    /// Positions each button within the frame
+    private func positionButtons() {
         let areaUsedBySpacing = spacing * CGFloat(daysOfWeek.count + 1)
         let buttonSideLength = min((frame.width - areaUsedBySpacing) / CGFloat(daysOfWeek.count), frame.height)
         let buttonSize = CGSize(width: buttonSideLength, height: buttonSideLength)

            button.layer.cornerRadius = 0.5 * button.bounds.size.width
            button.setTitle(daysOfWeek[index].name, forState: UIControlState.Normal)
        }
        customizeButtonAppearance()
    }
    
    private func customizeButtonAppearance() {
        for (index, button) in daysOfWeekButtons.enumerate() {
            button.backgroundColor = daysOfWeek[index].selected ?  selectedColor :  unselectedColor
            button.titleLabel?.font = UIFont.systemFontOfSize(fontSize)
            button.setTitleColor(textColor, forState: UIControlState.Normal)
        }
    }
    
    // MARK: DayOfWeekPicker User Interaction

    var delegate: RZGDayOfWeekPickerDelegate?
    
    // MARK: Attribute Inspector variables
    
    @IBInspectable
    var unselectedColor: UIColor = UIColor.blackColor() { didSet { customizeButtonAppearance() } }
    
