I need to style the default delete button on a tableview cell in objective c, ios5. The general idea is the assumption that you can do something like this:
UIImage *addImage = [UIImage imageNamed:@"greenButtonDark.png"];
UIButton *addButton = [UIButton buttonWithType:UIButtonTypeCustom];
addButton.frame = CGRectMake(0, 0, addImage.size.width, addImage.size.height);
[addButton setImage:addImage forState:UIControlStateNormal];
[addButton addTarget:self action:@selector(pushAddItem) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *addBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:addButton] ;
self.navigationItem.rightBarButtonItem = addBarButtonItem;
The above code is called in the viewDidLoad method and overwrites the right button in the header. I assume there is something comparable for any button the system adds by default but I don’t know how to access this particular one.
If I am failing to articulate this, the delete button I refer to is the one automatically generated with this code…
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
{
if(editingStyle == UITableViewCellEditingStyleDelete)
{
//do something when someone hits delete
}
}
If I need to clarify anything let me know. Thanks.

Take a look at this answer iPhone UITableView – Delete Button, it should basically answer your question. In short you might need to subclass UITableViewCell and override the -(void)willTransitionToState:(UITableViewCellStateMask)state and -(void)didTransitionToState:(UITableViewCellStateMask)state and modify the button here.
Another alternative might be subclassing the UITableViewCell and implementing the delete button functionality yourself (recognize the swipe gesture, present the button and handle when it’s pressed in a similar way the default method of UITableView delegate does).