title: Passing parameters to addTarget:action:forControlEvents
body: <p>I am using addTarget:action:forControlEvents like this:</p>
  
  <p><pre><code>[newsButton addTarget:self
  action:@selector(switchToNewsDetails)
  forControlEvents:UIControlEventTouchUpInside];
  </pre></code></p>
  
  <p>and I would like to pass parameters to my selector "switchToNewsDetails".
  The only thing I succeed in doing is to pass the (id)sender by writing:
  <pre><code>action:@selector(switchToNewsDetails:)</pre></code></p>
  
  <p>But I am trying to pass variables like integer values. Writing it this way doesn't work :</p>
  
  <p><pre><code>int i = 0;
  [newsButton addTarget:self
  action:@selector(switchToNewsDetails:i)
  forControlEvents:UIControlEventTouchUpInside];
  </pre></code></p>
  
  <p>Writing it this way does not work either:</p>
  
  <p><pre><code>int i = 0;
  [newsButton addTarget:self
  action:@selector(switchToNewsDetails:i:)
  forControlEvents:UIControlEventTouchUpInside];
  </pre></code></p>
  
  <p>Any help would be appreciated :)</p>