title: swift-- Variable button action
body: <p>I would like to ask a simple question : 
  how can I give a variable to the action in the creation of a button ?</p>
  
  <p>if for create the button use :</p>
  
  <pre><code> newButton.addTarget(self, action: "buttonAction:", forControlEvents: UIControlEvents.TouchUpInside)
  </code></pre>
  
  <p>on Object-c i did </p>
  
  <pre><code>NSString *selectorName = [NSString stringWithFormat:@"Button%d:",index+1];
  
  [newButton addTarget:self action:NSSelectorFromString(selectorName) forControlEvents:UIControlEventTouchUpInside];
  </code></pre>
  
  <p>and on Swift ?</p>