如何从GMSMapView更改myLocationButton位置? [英] How to change myLocationButton position from a GMSMapView?

查看:82
本文介绍了如何从GMSMapView更改myLocationButton位置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道如何从GMSMapView实例获取myLocationButton实例吗?或更改默认位置的方法?我只需要向上移动一些像素即可.

Anybody know how to get the instance of the myLocationButton from a GMSMapView instance? Or a way to change the default position? I just need to move it some pixels up.

推荐答案

根据此

According the the issue tracker for this Issue 5864: Bug: GMSMapView Padding appears not to work with AutoLayout there is an easier workaround:

- (void)viewDidAppear:(BOOL)animated {
  // This padding will be observed by the mapView
  _mapView.padding = UIEdgeInsetsMake(64, 0, 64, 0);
}

这篇关于如何从GMSMapView更改myLocationButton位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆