1. 准备一个类似的图片:比如
redaccessoryimage.png
2. 替换
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
//...
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil] autorelease];
UIButton *myAccessoryButton = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 24, 24)];
[myAccessoryButton setBackgroundColor:[UIColor clearColor]];
[myAccessoryButton setImage:[UIImage imageNamed:@"redaccessoryimage.png"] forState:UIControlStateNormal];
[cell setAccessoryView:myAccessoryButton];
[myAccessoryButton release];
//...
}
//...
}