I'm getting crashes while working with MKAnnotation
implementation
*** Terminating app due to uncaught exception NSRangeException
, reason: Cannot remove an observer MKMapAnnotationManager for the key path "coordinate" from DevicesGroupAnnotation because it is not registered as an observer.
I've implemented coordinate property in following way
@synthesize coordinate = _coordinate;
@synthesize deviceInfos = _deviceInfos;
- (void)setDeviceInfos:(NSArray *)deviceInfos {
_deviceInfos = deviceInfos;
self.coordinate = [[self class] coordinateFromDeviceInfosGroup:self.deviceInfos];
}
- (void)setCoordinate:(CLLocationCoordinate2D)newCoordinate {
_coordinate = newCoordinate;
}
What am I doing wrong? What requirements exists on coordinate property implementation?