When i run my app, it crashes and i got this error:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[AnnotationsDisplay coordinate]: unrecognized selector sent to instance 0x795bda0'
AnnotationsDisplay
it's a class to manage displaying the PINS on the Map.
EDIT: This is my AnnotationsDisplay class code:
#import <Foundation/Foundation.h>
#import <MapKit/MapKit.h>
@interface AnnotationsDisplay : NSObject<MKAnnotation> {
NSString *title;
CLLocationCoordinate2D coordinate;
}
- (id)initWithTitle:(NSString *)ttl andCoordinate:(CLLocationCoordinate2D)c2d;
@end
.m:
#import "AnnotationsDisplay.h"
@implementation AnnotationsDisplay
- (id)initWithTitle:(NSString *)ttl andCoordinate:(CLLocationCoordinate2D)c2d {
title = ttl;
coordinate = c2d;
return self;
}
@end