I have an image of a checkmark as a .png in the same directory as my project, called "checkbox.png". I want to create a UIImageView with that image as the background and set it as the accessory view of a set of UITableViewCells. I currently have:
UIView * v = [[UIImageView alloc] initWithImage:[UIImage imageWithContentsOfFile:@"checkmark.png"]];
v.backgroundColor = [UIColor redColor];
cell.accessoryView = v;
[v autorelease];
Which isn't working. I can make another dummy UIView (ex.
v = [[UIView alloc] init];
v.backgroundColor = [UIColor redColor];
which works fine, it displays a little red box on the right side of my uitableviewcells. I"m not sure why the view with the checkbox isn't working. Is there something wrong with the way I'm specifying the path to the file?