3

In my app, if the user slides 'Text Size' (under Settings > General > Text Size) to a large value, the city labels in the MKMapView are enlarged. I am sure this is intended and desired in many or most cases, but for my application, the large labels are obfuscating the map annotations itself. This makes it difficult to relate map annotations/overlays (which are the central focus of the app) to their exact position on the map.

Is there are way to opt out of the dynamic text in the map so that the Text Size changes will not affect it?

Hap
  • 556
  • 1
  • 6
  • 20
  • Are you adding the annotations to a layer between the roads and the labels for the roads? If you put the annotations on the top no map labels should appear in front of them. – Craig Jan 01 '14 at 01:08
  • @Craig Sorry I missed your reply until now. I edited my question slightly because I misstated the problem. The labels were actually hiding the map (not the annotations). That is a problem because, while the annotations are visible, it's difficult to get a context for where exactly on the map they refer. – Hap Jan 08 '14 at 16:04
  • I understand that the increased text size may start/end some labels "far" from where they refer but that should not affect the location of the annotations. Are you using custom images for your annotations or the standard pin? When using custom images, you may need to set the centerOffset so that the annotation image continues to point to the right coordinate regardless of zoom or other factors. If you'd like, post screenshots with "normal" and "large" text sizes along with the annotations to show exactly what you mean. –  Jan 08 '14 at 16:15

1 Answers1

0

Well, if you look into the documentation you can see that to support dynamic size you have to use the new UIFont methods introduced in iOS 7 on an object. To not support dynamic size, you would probably have to change the font of the said labels to a fixed size. That being said, The MapKit Framework provides no way to change the font of these labels to the best of my knowledge. However a quick web search pointed me to the MKOverlay and MKAnnotation classes as the only thing related to font and MKMapView.

UPDATE: As Pointed Out By Apple(https://devforums.apple.com/message/931571#931571) the only way to change it is to adjust the font labels, using the new API's in iOS 7.

virindh
  • 3,775
  • 3
  • 24
  • 49
  • It turns out there is no way to turn off the dynamic text (verified by an Apple rep: https://devforums.apple.com/message/931571#931571) or (as you mentioned) change the font properties on the labels. If you'd like to edit your answer to reflect that, I'll check it as correct. – Hap Jan 08 '14 at 16:07