views:

117

answers:

2

Is it possible to swap out the icon for UITableViewCellAccessoryDetailDisclosureButton with a custom icon?

+2  A: 

Sure. Set the accessoryView to a custom image view.

Noah Witherspoon
+1  A: 

Use this in 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;

Dont forget to include the image in your app and the function the selector is assigned too.

ing0