Configure MKAnnotation

Warm greetings

I use the code below to show annotation on iOS mkmapview when clicking on the map.

MKPointAnnotation *aAnnotationPoint = [[MKPointAnnotation alloc] init];

aAnnotationPoint.title = @"Virginia";
aAnnotationPoint.subtitle = @"This is a test code .this is a test code. This is a test codeThis is a test code .this is a test code. This is a test code";

// Add the annotationPoint to the map
[myMapView addAnnotation:aAnnotationPoint];

The problem is that the annotation does not fully display the text - it disables it with .... This is the result:

enter image description here

I searched for this pattern over the Internet, but with no luck. How can i do this?

+3
source share
1 answer

By default, the size calloutthrough MKPointAnnotationmatches the size indicated on the image. Due to the very long subtitle, the subtitle text is not displayed completely.

, . , UIBarButton UIImageView pinView.

, . !

+4

Source: https://habr.com/ru/post/1794619/


All Articles