I’ve applied a semi-transparent image to my UITableViewCell.contentView. Whenever I add my custom accessoryView, it doesn’t have the right background as shown here:

This is the relevant code:
UITableViewCell *tableViewCell = [[UITableViewCell alloc] init];
[tableViewCell.contentView setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"cell-bg.png"]]];
//[tableViewCell.backgroundView setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"cell-bg.png"]]];
tableViewCell.textLabel.text = @"Test";
UIButton *accessoryButton = [UIButton buttonWithType:UIButtonTypeCustom];
[accessoryButton setBackgroundImage:[UIImage imageNamed:@"arrow.png"] forState:UIControlStateNormal];
[accessoryButton setFrame:CGRectMake(0, 0, 34, 34)];
tableViewCell.accessoryView = accessoryButton;
I’ve also tried adding the background image to backgroundView instead of contentView, but it doesn’t show up at all. How to solve this? Thanks
In your UITableViewCell crate one UIImage object. Add it on your cell. And then add all the other objects on the image. You’ll get the desire screens that way.