I do not know any other templates, but this does not mean that they do not exist. :)
, :
, MKAnnotation. NSString* title subtitle CLLocationCoordinate2D setter (, ). . mapView -mapView:viewForAnnotation: , UITableView. , View , (, UIButtonTypeDetailDisclosure ). . image MKAnnotationView. , : aView.centerOffset = CGPointMake(0, -20)
:
- (MKAnnotationView *) mapView: (MKMapView *) mapView viewForAnnotation: (id<MKAnnotation>) annotation {
MKAnnotationView *aView = [mapView dequeueReusableAnnotationViewWithIdentifier:@"pinView"];
if (!aView) {
aView = [[MKAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:@"pinView"];
}
aView.rightCalloutAccessoryView = [UIButton buttonWithType:UIButtonTypeDetailDisclosure];
[(UIButton*)aView.rightCalloutAccessoryView addTarget:self action:@selector(showDetails:) forControlEvents:UIControlEventTouchUpInside];
aView.canShowCallout = YES;
aView.enabled = YES;
aView.image = [UIImage imageNamed:@"green_pin.png"];
aView.centerOffset = CGPointMake(0, -20);
return aView;
}