     self.addSubview(self.titleLabel)
   }
   
-  override func touchesBegan(touches: NSSet, withEvent event: UIEvent) {
+  override func touchesBegan(touches: Set<NSObject>, withEvent event: UIEvent) {
     
     self.cancelEvent = false
     self.currentState = UIControlState.Highlighted
     self.setNeedsDisplay()
   }
   
-  override func touchesMoved(touches: NSSet, withEvent event: UIEvent) {
+  override func touchesMoved(touches: Set<NSObject>, withEvent event: UIEvent) {
     
     self.cancelEvent = true
     self.currentState = UIControlState.Normal
     self.setNeedsDisplay()
     if let nextResponder = self.nextResponder() {
-      nextResponder.touchesMoved(touches, withEvent: event)
-    }
-  }
-  
-  override func touchesEnded(touches: NSSet, withEvent event: UIEvent) {
+      nextResponder.touchesMoved(touches as Set<NSObject>, withEvent: event)
+    }
+  }
+  
+  override func touchesEnded(touches: Set<NSObject>, withEvent event: UIEvent) {
     
     self.currentState = UIControlState.Normal
     self.setNeedsDisplay()
     
     if self.cancelEvent {
       if let nextResponder = self.nextResponder() {
-        nextResponder.touchesEnded(touches, withEvent: event)
+        nextResponder.touchesEnded(touches as Set<NSObject>, withEvent: event)
       }
     } else {
       self.triggerSelector()

  func addTarget(target: AnyObject?, action: Selector,
    forControlEvents controlEvents: UIControlEvents) {
      
      let newTarget = Target()
      newTarget.target = target
      newTarget.action = action
      newTarget.event = controlEvents
      
      for targetElement in targets {
        if compareTarget(newTarget, target2: targetElement) {
          return
        }
      }


private class TitleForState {
  
  var string: String?
  var state = UIControlState.Normal
}

