我試圖製作一個滑出導航應用程序與不同的意見。一個這樣的觀點是谷歌地圖。但是,當我運行該應用程序時,出現「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