Is it possible to swap out the icon for UITableViewCellAccessoryDetailDisclosureButton
with a custom icon?
views:
117answers:
2
+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
2010-01-29 19:50:55