I had custom MKAnnotationView implemented and it worked correctly before enabling ARC. initWithAnnotation method was implemented like this:
- (id)initWithAnnotation:(id <MKAnnotation>)annotation reuseIdentifier:(NSString *)reuseIdentifier
{
self.hasBuiltInDraggingSupport = [[MKAnnotationView class] instancesRespondToSelector:NSSelectorFromString(@"isDraggable")];
if (self.hasBuiltInDraggingSupport)
{
MKPinAnnotationView *pinAnnView = [[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:reuseIdentifier];
self = (AnnotationView*)pinAnnView;
if (self)
[self performSelector:NSSelectorFromString(@"setDraggable:") withObject:[NSNumber numberWithBool:YES]];
}
self.canShowCallout = YES;
return self;
}
After enabling ARC I started to receive EXC_BAD_ACCESS in the following line:
self = (AnnotationView*)pinAnnView;
Currently i have no idea what happens.