我试图制作一个滑出导航应用程序与不同的意见。一个这样的观点是谷歌地图。但是,当我运行该应用程序时,出现“Google”水印,但“我的位置”按钮是缺少。这是非常相似的这个职位google map sdk ios 7 mylocationbutton disappear但self.edgesForExtendedLayout = UIRectEdge.None;
不改变任何东西,除了给予额外的空白。此外,它没有任何意义,为什么谷歌水印出现,而不是位置按钮。ios mylocationbutton在谷歌地图上丢失
在ViewController.swift
override func viewDidLoad() {
super.viewDidLoad()
locationManager.delegate = self
locationManager.requestWhenInUseAuthorization()
mapView.delegate = self
mapView.settings.rotateGestures = false;
mapView.settings.compassButton = true;
}
func locationManager(manager: CLLocationManager!, didChangeAuthorizationStatus status: CLAuthorizationStatus) {
if status == .AuthorizedWhenInUse {
locationManager.startUpdatingLocation()
mapView.myLocationEnabled = true
mapView.settings.myLocationButton = true
}
}
任何帮助,不胜感激!
已经尝试过,它并不显示。任何其他想法? – Derick 2015-01-27 18:34:49
太棒了!它解决了我的问题!谢谢。 – mikezs 2016-01-15 12:13:28