title: UIButton gets covered when UITableViewCell is selected
body: <p>I'm using a UIButton inside my UITableViewCell, this button can be selected, gold star, and unselected, gray star, as shown bellow.</p>
  
  <p><img src="https://i.stack.imgur.com/yRknc.png" alt="enter image description here"></p>
  
  <p>The problem is that when ever the cell is selected, no matter if the button is selected or not it will turn to a gray color (this gray color is different than the gray color of unselected mode of the star). I've been trying to figure out why this happens, but had no luck.</p>
  
  <p><img src="https://i.stack.imgur.com/M40q8.png" alt="enter image description here"></p>
  
  <p>here is the implementation of the cells,</p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
  
  UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell"];    
  UIButton *button = [[UIButton buttonWithType:UIButtonTypeCustom]retain];
  
  //set the background of the cells
  cell.backgroundView = [[UIImageView alloc] initWithImage:[UIImage imageNamed: @"cellBackground.png"]];
  cell.selectedBackgroundView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"cellselected2.png"]];
  
  // set the button content
  [button setImage:[UIImage imageNamed:@"star.png" ] forState:UIControlStateNormal];
  [button setImage:[UIImage imageNamed:@"starSelected.png"] forState:UIControlStateSelected];
  [button addTarget:self action:@selector(selectedButton:) forControlEvents:UIControlEventTouchUpInside];
  [button setFrame:CGRectMake(280, 10,  24, 24)];
  
  [cell addSubview:button];
  
  return cell;
  }
  </code></pre>
  
  <p>also when I tap the button when the cell is selected the button will totally disappear!</p>
  
  <p>Thanks,</p>