Δεν 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. [Self 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