Usually sample codes use UIButtonTypeDetailDisclosure as right button, but you can't use that unless you really show additional details. For anything else, you must use a custom button.UIButton *button = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 20, 20)]; [button setImage:[UIImage imageNamed:@"myButton.png"] forState:UIControlStateNormal]; view.rightCalloutAccessoryView = button;
Tuesday, May 25, 2010
How to Create Custom Map Annotation Button
Custom accessory button for MKPinAnnotationView right side, create inside MKMapViewDelegate protocol mapView:viewForAnnotation method:
Labels:
accessory,
delegate,
iphone,
map,
MKMapViewDelegate,
MKPinAnnotationView,
UIButton,
UIButtonTypeDetailDisclosure,
UIImage
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment