2011-08-16 13 views

Respuesta

24

De acuerdo con el código de abajo, la imagen pasador y el MKPinAnnotationView son ambos 32 puntos de ancho y 39 puntos altos:

- (MKAnnotationView *)mapView:(MKMapView *)mapView 
     viewForAnnotation:(id <MKAnnotation>)annotation 
{ 
    MKPinAnnotationView *pav = (MKPinAnnotationView *)[mapView 
      dequeueReusableAnnotationViewWithIdentifier:@"test"]; 
    if (pav == nil) 
    { 
     pav = [[[MKPinAnnotationView alloc] initWithAnnotation:annotation 
       reuseIdentifier:@"test"] autorelease]; 
    } 

    pav.annotation = annotation; 

    NSLog(@"pav.frame.size = %@, pav.image.size = %@", 
     NSStringFromCGSize(pav.frame.size), 
     NSStringFromCGSize(pav.image.size)); 

    return pav; 
} 
Cuestiones relacionadas