title: UIButton in UITableViewCell Not Working in iOS7
body: <p>I have a UIButton in a UITableViewCell that has been working correctly since iOS4, now since the iOS7 update it no longer works. It is basically an image of an empty box. When user clicks on the image (UIButton) the image changes to a checked box. I am NOT using an XIB. Anybody have any suggestions? Thanks in advance.</p>
  
  <p>(I have already tried <code>contentView.userInteractionEnabled = NO;</code> and <code>[cell bringSubviewToFront:button]</code> but this didn't work)</p>
  
  <p>Here is some relevant code:</p>
  
  <pre><code>- (UITableViewCell *)taskCell:(NSIndexPath *)indexPath table:(UITableView *)localTableView managed:(NSManagedObject *)managedTask dateFormat:(NSDateFormatter *)localDateFormatter{
      static NSString *CellIdentifier = @"Cell"; 
  
      UITableViewCell *cell = [localTableView dequeueReusableCellWithIdentifier:CellIdentifier];
      if (cell == nil) {
          cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease];
  
          // Checkbox
          UIButton *button = [[UIButton alloc] initWithFrame:CGRectMake(-4.0f, -3.0f, 48.0f, 48.0f)];
          button.tag=kCellButtonViewTag;
          button.adjustsImageWhenHighlighted=NO;
          [button setImage:[UIImage imageNamed:@"uncheckedPriorityNone.png"] forState:UIControlStateNormal];
          [button addTarget:self action:@selector(toggleCheckedMode:) forControlEvents:UIControlEventTouchUpInside];
          [cell.contentView addSubview:button];
          [button release];
          }
  }
  
  
  - (IBAction)toggleCheckedMode:(id)sender{
  
      NSManagedObjectContext *context = [self.fetchedResultsController managedObjectContext];
  
      UITableViewCell *clickedCell = (UITableViewCell *)[[sender superview] superview];
      NSIndexPath *indexPath = [self.tableView indexPathForCell:clickedCell];
      Task *localTask = [self.fetchedResultsController objectAtIndexPath:indexPath];
  
      UIButton *button = sender;
      [button setImage:[UIImage imageNamed:@"checkedGray.png"] forState:UIControlStateNormal];
  }
  </code></pre>