本文介绍了如何从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位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!