     @IBOutlet weak var control1: BetterSegmentedControl!
     @IBOutlet weak var control3: BetterSegmentedControl!
     
+    // MARK: - Examples
     override func viewDidLoad() {
         super.viewDidLoad()
         
-        // As a navigation item
+        // BetterSegmentedControl 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"],

        navigationSegmentedControl.addTarget(self, action: #selector(ViewController.navigationSegmentedControlValueChanged(_:)), forControlEvents: .ValueChanged)
        navigationItem.titleView = navigationSegmentedControl
        
        // Created and designed in IB
        control1.titles = ["Recent","Nearby","All"]
        control1.titleFont = UIFont(name: "HelveticaNeue-Medium", size: 13.0)!
        control1.alwaysAnnouncesValue = true
        print(control1.titles)
        
        // Control 2 is defined in IB
        
        // Many options & error handling
        control3.titles = ["One","Two","Three","Four","Five","Six"]
        control3.titleFont = UIFont(name: "HelveticaNeue-Light", size: 14.0)!
        do {

    @IBAction func segmentedControl1ValueChanged(sender: BetterSegmentedControl) {
        print("The selected index is \(sender.index) and the title is \(sender.titles[Int(sender.index)])")
    }
}

