简体   繁体   English

可以在MKMapView中关闭动态文本吗?

[英]Possible to turn off dynamic text in MKMapView?

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. 在我的应用程序中,如果用户将“文本大小”(在“设置”>“常规”>“文本大小”下)滑动到较大值,则会放大MKMapView中的城市标签。 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? 是否有办法选择退出地图中的动态文本,以便文本大小更改不会影响它?

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. 好吧,如果您查看文档,您可以看到,为了支持动态大小,您必须在对象上使用iOS 7中引入的新UIFont方法。 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. 话虽这么说,MapKit框架无法根据我的知识更改这些标签的字体。 However a quick web search pointed me to the MKOverlay and MKAnnotation classes as the only thing related to font and MKMapView. 然而,一个快速的网络搜索指向我MKOverlay和MKAnnotation类作为唯一与font和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. 更新:正如Apple指出的那样( https://devforums.apple.com/message/931571#931571 ),改变它的唯一方法是使用iOS 7中的新API调整字体标签。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 可以在IOS Webview中关闭指令性文字吗? - Possible to turn off predective text in IOS Webview? 如何设置MKMapView视角并关闭3D建筑? - How to set MKMapView view angle and turn off 3D building? 可以关闭Metal中的多缓冲/双缓冲吗? - Possible to turn off multibuffering/doublebuffering in Metal? iPhone:可以在应用中打开/关闭定位服务吗? - iPhone: Possible to turn on/off Location Services in app? MKMapView Routeline不在路上 - MKMapView Routeline is off the road 是否可以从iOS上的不同应用程序打开/关闭通知 - Is it possible to turn on/off notification from different applications on ios 是否可以在应用程序中提供设置以让用户打开或关闭Braze通知? - Is it possible to provide setting in app to let user turn on or off Braze notification? Swift 4中的代码是否可以关闭wifi或将iPhone切换为离线模式? - is it possible to turn off wifi or switch iPhone to offline mode in codes in swift 4? 是否可以通过应用程序中的关闭设备(iPhone / iPad)? - Is it possible to turn off the device (iPhone/iPad) from with in the app? 是否可以在SceneKit中关闭抗锯齿功能以使像素艺术图像更清晰? - Is it possible to turn off antialiasing in SceneKit to make pixel art images sharp?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM