title: Adding buttons on tableview - can't access the sender
body: <p>I have used the following code to add buttons to my tableviewcell , when the button is pressed i need to know which row was it. so i have tagged the buttons (playButton viewWithTag:indexPath.row)
  The problem is that is if I define the target action method (play) to receive the sender it crashes with  "unrecognized selector ", any ides how to know on which row the button was pressed or why it is crashing like this 
  Thanks</p>
  
  <pre><code>-(void)configureCell: (UITableViewCell *)cell atIndexPath:(NSIndexPath *)indexPath {
  UIButton *playButton = [UIButton buttonWithType:UIButtonTypeCustom] ;
  [playButton setFrame:CGRectMake(150,5,40,40)];
  [playButton viewWithTag:indexPath.row] ; //Tagging the button
  [playButton setImage:[UIImage imageNamed:@"play.png"] forState:UIControlStateNormal];
  [playButton addTarget:self action:@selector(play) forControlEvents: UIControlEventTouchUpInside];
  [cell addSubview:playButton];
  </code></pre>
  
  <p>}</p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
  UITableViewCell *beatCell = nil;
  beatCell = [tableView dequeueReusableCellWithIdentifier:@"beatCell"];
  if (beatCell == nil){
      beatCell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"beatCell"];
  }
   [self configureCell:beatCell atIndexPath:indexPath];
  return beatCell;
  </code></pre>
  
  <p>}</p>
  
  <pre><code>-(void) play:(id) sender{
  UIButton *play = sender;
  NSLog(@"Play %i" , play.tag);
  </code></pre>
  
  <p>}</p>