mkplacemark

Create a title for annotation from MKLocalSearch

北城以北 提交于 2020-01-03 03:28:04
问题 I have added an MKLocalSearch and the pins are displaying correctly. The only problem is that the pins titles have both the name and address, were I only want the name. How would I change this. Here is the code I am using - - (void)mapView:(MKMapView *)mapView regionDidChangeAnimated:(BOOL)animated { MKLocalSearchRequest *request = [[MKLocalSearchRequest alloc] init]; request.naturalLanguageQuery = @"School"; request.region = mapView.region; MKLocalSearch *localSearch = [[MKLocalSearch alloc]

Create a title for annotation from MKLocalSearch

三世轮回 提交于 2019-12-06 15:13:43
I have added an MKLocalSearch and the pins are displaying correctly. The only problem is that the pins titles have both the name and address, were I only want the name. How would I change this. Here is the code I am using - - (void)mapView:(MKMapView *)mapView regionDidChangeAnimated:(BOOL)animated { MKLocalSearchRequest *request = [[MKLocalSearchRequest alloc] init]; request.naturalLanguageQuery = @"School"; request.region = mapView.region; MKLocalSearch *localSearch = [[MKLocalSearch alloc] initWithRequest:request]; [localSearch startWithCompletionHandler:^(MKLocalSearchResponse *response,