在MKMapView上隐藏Google徽标(Hide Google logo on MKMapView)

编程入门 行业动态 更新时间:2024-10-26 00:23:59
在MKMapView上隐藏Google徽标(Hide Google logo on MKMapView)

有人知道如何将Google徽标隐藏在MKMapView吗?

我不想隐瞒它。 我想要相反。 原因是一个应用程序因为被拒绝了

8.6如果原始内容的所有品牌特征保持不变并且完全可见,则可以在应用程序中使用通过Google Maps API获取的Google地图和Google地球图片。 覆盖或修改Google徽标或版权所有者标识的应用将被拒绝

现在我想撤销这一点,但我不知道哪个代码负责此行为。

编辑:

我认为原因是这个代码行

self.mapView=[[[MKMapView alloc] initWithFrame:self.view.bounds] autorelease];

self.view.bounds不占用导航栏。 我会试试这个:

CGRect mapSize = CGRectMake(self.view.bounds.origin.x, self.view.bounds.origin.y, self.view.bounds.size.width, self.view.bounds.size.height - 44.0f); self.mapView = [[[MKMapView alloc] initWithFrame:mapSize] autorelease];

Does somebody know how the Google logo can be hidden on a MKMapView?

I don't want to hide it. I want the opposite. The reason is that a app got rejected because of

8.6 Google Maps and Google Earth images obtained via the Google Maps API can be used within an application if all brand features of the original content remain unaltered and fully visible. Apps that cover up or modify the Google logo or copyright holders identification will be rejected

Now I want to undo this, but I don't know which code is responsible for this behavior.

Edit:

I think the reason is this code line

self.mapView=[[[MKMapView alloc] initWithFrame:self.view.bounds] autorelease];

self.view.bounds does not take the navigation bar in account. I will try this:

CGRect mapSize = CGRectMake(self.view.bounds.origin.x, self.view.bounds.origin.y, self.view.bounds.size.width, self.view.bounds.size.height - 44.0f); self.mapView = [[[MKMapView alloc] initWithFrame:mapSize] autorelease];

最满意答案

Google徽标会自动显示在任何MapView的左下角。 它被隐藏的唯一方法就是覆盖那个角落。

我还没有看到你的应用程序,但如果我不得不猜测,我会说其中的一个是真的:

您的地图视图延伸到屏幕底部附近的控件下方,比如标签栏下方,或者如果没有任何东西在下方(iPhone上的480像素以下),则可能完全离开视图的底部。

您的地图视图在底部可以正常使用,除非出现下面的内容,例如工具栏。

事物通常在肖像模式下摆放得很好,但是当用户切换到风景时,您不会正确调整地图的大小,并且底部会被切断。

The Google logo automatically appears in the lower-left corner of any MapView. The only way it gets hidden is by covering that corner.

I haven't seen your app, but if I had to guess I'd say that one of these is true:

Your map view extends below a control near the bottom of the screen, like below a Tab Bar, or maybe just entirely off the bottom of the view if there's nothing down there (below 480 px on the iPhone).

Your map view is ok at the bottom except when something appears down there, like a Toolbar.

Things are generally laid out fine in portrait mode but when the user switches to landscape you're not resizing your map correctly and the bottom of it is getting cut off.

更多推荐

本文发布于:2023-07-23 01:20:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1225588.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:徽标   Google   MKMapView   Hide   logo

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!