我已经在注释视图中添加图像,当我接触注释查看其照片量变到质变为红脚任何一个可以告诉我什么是他的原因吧MapView的注释
- (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id <MKAnnotation>)annotation
{
MKPinAnnotationView* newAnnotation = [[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:@"annotation1"];
if (annotation == _mapView.userLocation)
{
newAnnotation.rightCalloutAccessoryView = [UIButton buttonWithType:UIButtonTypeDetailDisclosure];
return nil;
}
//[newAnnotation setSelected:YES];
newAnnotation.image = [UIImage imageNamed:@"sample.png"];
newAnnotation.rightCalloutAccessoryView = [UIButton buttonWithType:UIButtonTypeDetailDisclosure];
newAnnotation.canShowCallout = YES;
[newAnnotation retain];
return newAnnotation;
}
您是否在MKPinAnnotationView中添加图像。 ? – Jhaliya 2011-03-22 08:17:04
如果你想一些答案,我建议您发布一些代码,一定会帮助你更好地 – visakh7 2011-03-22 08:22:05
你做删除当u触摸注解视图 – Splendid 2011-03-22 09:27:41