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];