0
我在iOS 10中用于显示注释和标题的代码不再显示iOS 11中的标题。在iOS 11中,注释被选中,但标题不再显示。任何有关如何在iOS 10中显示标题的提示?MKPointAnnotation不再显示iOS中的标题11
MKPointAnnotation* theAnnotation = [MKPointAnnotation new];
theAnnotation.coordinate = CLLocationCoordinate2DMake(aLocation.latDegrees, aLocation.lonDegrees);
[theAnnotation setTitle:@"Hello world"];
[self.mapView removeAnnotations:self.mapView.annotations];
[self.mapView addAnnotation:theAnnotation];
[self.mapView showAnnotations:@[theAnnotation] animated:NO];
[self.mapView selectAnnotation:theAnnotation animated:YES];