title: Custom accessoryView image and accessoryButtonTappedForRowWithIndexPath
body: <p>I am trying to get a custom image working with the <code>accessoryButtonTappedForRowWithIndexPath</code> function. From what I understand in order to do this, you have to use a <code>UIButton</code>, simply adding a <code>UIImageView</code> on the <code>UITableViewCellAccessoryDetailDisclosureButton</code> will not work.</p>
  
  <p>My problem is how to get the touch gesture from my <code>UITableViewCell</code> subclass into the parent <code>UITableView</code> function.  </p>
  
  <p>Here is the code in my <code>UITableViewCell</code> subclass:</p>
  
  <pre><code>upVote = [UIButton buttonWithType:UIButtonTypeCustom];
  UIImage *upVoteImg = [UIImage imageNamed:@"vote.png"];
  upVote.frame = CGRectMake(self.frame.size.width-upVoteImg.size.width, 0, upVoteImg.size.width , upVoteImg.size.height);
  [upVote setBackgroundImage:upVoteImg forState:UIControlStateNormal];
  [self.contentView addSubview:upVote];
  [upVote addTarget:self action:@selector(checkButtonTapped:event:)  forControlEvents:UIControlEventTouchUpInside];
  </code></pre>
  
  <p>The calling function (also inside the subclass of the <code>UITableViewCell</code>)</p>
  
  <pre><code>- (void)checkButtonTapped:(id)sender event:(id)event
  {
      UITableView *tableView = (UITableView *)self.superview;
      [tableView.delegate tableView:tableView accessoryButtonTappedForRowWithIndexPath:[tableView indexPathForCell:self]];
  }
  </code></pre>
  
  <p>It crashes at the final line of the above function with this:</p>
  
  <blockquote>
    <p>*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UITableViewWrapperView
    delegate]: unrecognized selector sent to instance 0x16f48160'</p>
  </blockquote>