gpt4 book ai didi

ios - 如何从 GMSMapView 更改 myLocationButton 位置?

转载 作者:可可西里 更新时间:2023-11-01 04:06:11 25 4
gpt4 key购买 nike

有人知道如何从 GMSMapView 实例中获取 myLocationButton 实例吗?或者改变默认位置的方法?我只需要将它向上移动一些像素。

最佳答案

根据此 Issue 5864: Bug: GMSMapView Padding appears not to work with AutoLayout 的问题跟踪器有一个更简单的解决方法:

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

关于ios - 如何从 GMSMapView 更改 myLocationButton 位置?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17182308/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com