IOS6 cards, DON'T MISS the details button (blue chevron) on all my cards! How to get it back

As I understand it, there were no problems with the transition to iOS 6. But for some reason, the detail disclosure button will now NOT MAP in my application maps. Is there any way to get this back. Wow, completely unexpected. This has been working for many years, so all delegates are fine.

#pragma mark MKMapViewDelegate
- (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id <MKAnnotation>)annotation {

MKPinAnnotationView *pin = [[[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:@"REUSEME"] autorelease];
UIButton *button = [UIButton buttonWithType:UIButtonTypeDetailDisclosure];

if ([annotation isKindOfClass:[MKUserLocation class]]) {
    pin.animatesDrop = YES;
    return nil;
} else {
    [pin setPinColor:MKPinAnnotationColorGreen];
}

pin.rightCalloutAccessoryView = button;
pin.animatesDrop = YES;
pin.canShowCallout = YES;

return pin;
}
+5
source share
9 answers

Now in iOS 6 you must set the delegate before adding annotation to mapView

here: http://www.openradar.me/12346693

+2
source

I had the same problem and setting the MapView delegate to the Storyboard did the trick for me, now the call arrows work :)

+2

, !

mapView.delegate = self;
[self.mapView addAnnotation:ann];

Tks,

+2

, , , MKPinAnnotationPinView, :

    MKPinAnnotationView *pinView = (MKPinAnnotationView *)[mapView dequeueReusableAnnotationViewWithIdentifier:@"CustomPinAnnotationView"];
0

, , :

MKPinAnnotationView * MyPin = (MKPinAnnotationView *) [mapView dequeueReusableAnnotationViewWithIdentifier: @ "MyPin" ];

, xcode 4.5/iOS 6.

0

mapKit iOS 6, , . MKMapView (.. viewDidLoad), . mapView.delegate = self, loadView (void).

0

@ErCa iOS loadView, .

. , .

@ed-potter iOS4? , autorelease MKPinAnnotationView, ARC.

0

. , MKMapView , viewDidLoad: - . , , mapView setMapView:.

, , MKMapView, :

@property (, ) IBOutlet MKMapView * mapView;

setMapView:

- (void) setMapView: (MKMapView *) mapView {

_mapView = mapView;

self.mapView.delegate = self;//needed to move setting of the mapView delegate here because they changed when the viewForAnnotations delegate function is called when Apple went to iOS 6 and changed the maps App.  Now all of the annotations are loaded and the views for those annotations are set up before the View Controller even calls viewDidLoad.

[self updateMapView];

}

0

, self.mapView.delegate = self viewDidLoad, mapView:viewForAnnotation: , leftCalloutAccessoryView UIImageView. Ray Wenderlich MapKit iOS 6 Tutorial :

First select MainStoryboard.storyboard. Then set the View controller (top right of the list) as a delegate to control a click on the map screen and drag the line from the delegate to the view controller.

0
source

All Articles