title: uitableview delete button image in iOS
body: <p>I want to change swipe button image of uitableview cell. I have searched for it but I am not get desired result. I have used this code:</p>
  
  <pre><code>- (void)willTransitionToState:(UITableViewCellStateMask)state{
      [super willTransitionToState:state];
      if ((state &amp; UITableViewCellStateShowingDeleteConfirmationMask) == UITableViewCellStateShowingDeleteConfirmationMask) {
          for (UIView *subview in self.subviews) {
              if ([NSStringFromClass([subview class]) isEqualToString:@"UITableViewCellDeleteConfirmationControl"]) {
                  UIImageView *deleteBtn = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 64, 33)];
                  [deleteBtn setImage:[UIImage imageNamed:@"delete.png"]];
                  [[subview.subviews objectAtIndex:0] addSubview:deleteBtn];
  
              }
          }
      }
  }
  </code></pre>
  
  <p>But this is not working in iOS 9. Please suggest me how to achieve this in iOS 9.</p>
  
  <p>If I used this code then its working but image is not set properly:</p>
  
  <pre><code>[[UIButton
        appearanceWhenContainedIn:[TableViewCell class], nil]
       setImage:[UIImage imageNamed:@"Delete-notification.png"] forState:UIControlStateNormal];
  
  
  -(NSArray *)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath {
   UITableViewRowAction *button = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@"Button 1" handler:^(UITableViewRowAction *action, NSIndexPath *indexPath)
      {
          NSLog(@"Action to perform with Button 1");
      }];
  
  
      return @[button];
  }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/a4mqP.png" alt="like this">]<a href="https://i.stack.imgur.com/a4mqP.png" rel="nofollow noreferrer">1</a></p>
  
  <p>Thanks in advance!</p>