0

I have this problem:

In my App I use this very simply code:

- (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control {
       self.mapPopup.hidden=false;
    }

This code on the iOS 6 version of my App works great.... on the same app for iOS7 when I tap 2 times, the App crash.

The error that came out is "EXC_BAD_ACCESS".

I've also noted that in ios6 don't makes any distinction from left touch or right touch (on the annotation)... in ios7 yes!

I must manage differents touches (left & right)?

For better understand... I've a stuff like this: enter image description here

If i click over blue button, all works fine (the app open a detail view). When I close the opened view, if I tap over the text (ie. "Current Location") my app crashes

4

2 に答える 2

1

私は大きな間違いを犯したことをお詫びします:私はこのコードを使用しました:

[rightButton addTarget:self:@selector(mapView:annotationView:calloutAccessoryControlTapped:) forControlEvents:UIControlEventTouchUpInside];

アクションを指定しますが、これによりコードが 2 回実行されます...おそらくクラッシュの原因です!!!

問題が解決しました!!!:D ご清聴ありがとうございました..

于 2013-10-25T13:56:05.557 に答える