calloutAccessoryControlTapped nem hívott / váltott

szavazat
5

Én használtam ezt például az én alkalmazás,

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

de nem hív / kiváltó calloutAccessoryControlTapped mint én megérintette a accessorycontrol.

Itt van a kód.

- (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);
}

Azt már küzd ezzel a problémával egy ideig, úgy tűnik, mint egy csomó ember van, amelynek ugyanaz a probléma is. Minden segítséget szívesen vennénk. Kösz

A kérdést 29/07/2009 01:47
a forrás felhasználó
Más nyelveken...                            


1 válasz

szavazat
0

Probléma megoldódott! A másik nézet blokkolja a mapview. [Self setUserInteractionEnabled: NO];

Válaszolt 29/07/2009 01:57
a forrás felhasználó

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