         // As a navigation item
         let navigationSegmentedControl = BetterSegmentedControl(
             frame: CGRect(x: 35.0, y: 40.0, width: 200.0, height: 30.0),
-            titles: ["Lights On", "Lights Off"],
+            titles: LightMode.allValuesString,
             index: 0,
             backgroundColor: .darkGrayColor(),
             titleColor: .lightGrayColor(),

import BetterSegmentedControl

class ViewController: UIViewController {
    
    @IBOutlet weak var control1: BetterSegmentedControl!
    @IBOutlet weak var control3: BetterSegmentedControl!

    }
    
    func navigationSegmentedControlValueChanged(sender: BetterSegmentedControl) {

        let selectedMode = sender.titles[Int(sender.index)]
        
        if let lightMode = LightMode(rawValue: selectedMode) {
            if lightMode == .On {
                print("Turning lights on.")
                view.backgroundColor = .whiteColor()
            }
            else {
                print("Turning lights off.")
                view.backgroundColor = .darkGrayColor()
            }
        }
        
    }
    
    @IBAction func segmentedControl1ValueChanged(sender: BetterSegmentedControl) {
