title: switch statements in swift using buttons
body: <p>i cant figure out how to use my switch statement in swift so that when i click either button it will execute the println(). each time i click either button it just executes the default.    </p>
  
  <pre><code>class ViewController: UIViewController{
  
      var addOne : UIButton = UIButton(frame: CGRectMake(0, 0, 40, 40))
      var addFive : UIButton = UIButton(frame: CGRectMake(0, 0, 40, 40))
  
      override func viewDidLoad() {
          super.viewDidLoad()
          // Do any additional setup after loading the view, typically from a nib.
  
          addOne.setTitle("+1", forState: UIControlState.Normal)
          addOne.backgroundColor = UIColor.blackColor()
          addOne.center = (CGPointMake(40, 250))
          addOne.addTarget(self, action: "player", forControlEvents: UIControlEvents.TouchUpInside)
          view.addSubview(addOne)
  
          addFive.setTitle("+5", forState: UIControlState.Normal)
          addFive.backgroundColor = UIColor.blackColor()
          addFive.center = (CGPointMake(200, 250))
          addFive.addTarget(self, action: "player", forControlEvents: UIControlEvents.TouchUpInside)
          view.addSubview(addFive)
      }
  
      override func didReceiveMemoryWarning() {
          super.didReceiveMemoryWarning()
          // Dispose of any resources that can be recreated.
      }
  
      func player(){
  
          switch (true){
  
          case addOne:
              println("goodbye")
          case addFive:
              println("hello world")
  
          default:
              println("hello")
          }
  
      }
  
  }
  </code></pre>