是否可以使用自定义图标替换UITableViewCellAccessoryDetailDisclosureButton
的图标?
答案 0 :(得分:2)
不确定。将accessoryView
设置为自定义图像视图。
答案 1 :(得分:1)
在viewForAnnotation中使用它:
UIButton *advertButton = [UIButton buttonWithType:UIButtonTypeCustom];
advertButton.frame = CGRectMake(0, 0, 23, 23);
advertButton.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
advertButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentCenter;
[advertButton setImage:[UIImage imageNamed:@"button-image.png"] forState:UIControlStateNormal];
[advertButton addTarget:self action:@selector(advertFunction:) forControlEvents:UIControlEventTouchUpInside];
annView.rightCalloutAccessoryView = advertButton;
不要忘记在您的应用中包含图片以及指定选择器的功能。