UITableViewCell with image on the right?

Oliver GL picture Oliver GL · Apr 23, 2009 · Viewed 45.6k times · Source

Is there a way to set the UITableViewCell.image to display on the right hand side of the cell instead of the left? Or will I need to add a separate UIImageView on the right side of the cell layout?

Answer

Alex Wayne picture Alex Wayne · Apr 23, 2009

No. But you can easily add an image view as the accessory view to a table cell for the same effect.

UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"foo.png"]];
cell.accessoryView = imageView;
[imageView release];