Why doesn't this NSPredicate work?
问题 I have an Array of MKAnnotation objects called arrAnnotations . I want to pick out one of the annotations with the same coordinate as the one stored in a CLLocation object called "newLocation". I'm trying to use a NSPredicate , but it doesn't work. NSPredicate *predicate = [NSPredicate predicateWithFormat:@"(SELF.coordinate == %f)", newLocation.coordinate]; NSArray* filteredArray = [arrAnnotations filteredArrayUsingPredicate:predicate]; [self.mapView selectAnnotation:[filteredArray