नहीं बुलाया calloutAccessoryControlTapped / शुरू हो रहा

वोट
5

मैं अपने आवेदन में इस उदाहरण का इस्तेमाल किया है,

http://spitzkoff.com/craig/?p=81

लेकिन इसकी बुला नहीं / calloutAccessoryControlTapped ट्रिगर के रूप में मैं accessorycontrol उपयोग किया।

यहाँ मेरी कोड है।

- (void)viewDidLoad {
    MapAnnotation *annotation = nil;
    annotation = [[MapAnnotation alloc] initWithCoordinate:[[trackPointsArray objectAtIndex:trackPointsArray.count - 2] coordinate]];
    [mapView addAnnotation:annotation];
    [super viewDidLoad];
}

- (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id <MKAnnotation>)annotation
{
    MKAnnotationView *annotationView = nil;

    // start pin
    static NSString *StartPinIdentifier = @StartPinIdentifier;
    MKPinAnnotationView *startPin = [annotationView dequeueReusableCellWithIdentifier:StartPinIdentifier];

    if (startPin == nil) {
        startPin = [[[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:StartPinIdentifier] autorelease];
        startPin.animatesDrop = YES;
        startPin.pinColor = MKPinAnnotationColorGreen;
        startPin.rightCalloutAccessoryView = [UIButton buttonWithType:UIButtonTypeDetailDisclosure];
        startPin.canShowCallout = YES;
        startPin.enabled = YES;

        UIImage *image = [UIImage imageNamed:@location.png];
        UIImageView *imgView = [[UIImageView alloc] initWithImage:image];
        startPin.leftCalloutAccessoryView = imgView;
    }

    annotationView = startPin;
    return annotationView;
}

- (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control
{
     NSLog(@calloutAccessoryControlTapped);
}

मैं थोड़ी देर के लिए इस समस्या के साथ संघर्ष कर रहा है, बहुत से लोगों को साथ ही साथ एक ही समस्या हो रही है की तरह लगता है। किसी भी सहायता की सराहना की जाएगी। धन्यवाद

29/07/2009 को 01:47
का स्रोत उपयोगकर्ता
अन्य भाषाओं में...                            


1 जवाब

वोट
0

समस्या सुलझ गयी! मेरे अन्य दृश्य MapView अवरुद्ध किया गया। [आत्म setUserInteractionEnabled: NO];

29/07/2009 को 01:57
का स्रोत उपयोगकर्ता

Cookies help us deliver our services. By using our services, you agree to our use of cookies. Learn more