मैं अपना नक्शा एनोटेट कर रहा हूं और एक छवि बस ठीक कर रहा हूं, लेकिन जब मैपव्यू पर एनोटेशन टैप करता हूं, तो छवि मेरी कस्टम छवि से लाल पिन पर जाती है। ऐसा क्यों है?एक कस्टम MKMapView एनोटेशन छवि स्पर्श पर गायब क्यों होती है?
- (MKAnnotationView *)mapView:(MKMapView *)newMapView viewForAnnotation:(id)newAnnotation {
MKPinAnnotationView *annotation = [[MKPinAnnotationView alloc] initWithAnnotation:newAnnotation reuseIdentifier:@"currentloc"];
if (annotation == nil) {
annotation = [[MKAnnotationView alloc] initWithAnnotation:newAnnotation reuseIdentifier:@"currentloc"];
}
annotation.image = [UIImage imageNamed:@"anno.png"];
annotation.canShowCallout = YES;
annotation.rightCalloutAccessoryView = [UIButton buttonWithType:UIButtonTypeDetailDisclosure];
UIImageView *imgView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"bus_stop_30x30.png"]];
annotation.leftCalloutAccessoryView = imgView;
return annotation;
}
मेरा कोड कुछ नमूना कोड के समान दिखता है जो इस समस्या का उत्पादन नहीं करता है।
धन्यवाद धन्यवाद .. –