小编daf*_*noo的帖子

当前位置标题?Mapkit

我正在使用MapKit创建一个应用程序.这是一个看起来如何的图像: http://i.stack.imgur.com/Dt7Qg.png

我想从该引脚更改符号当前位置的(当前位置)标题.

由于声誉,LINK发表评论

这是代码:

import UIKit
import CoreLocation
import MapKit

class ViewController: UIViewController, CLLocationManagerDelegate,    MKMapViewDelegate {

@IBOutlet weak var theMap: MKMapView!
let locationManager = CLLocationManager()

override func viewDidLoad()
{
    super.viewDidLoad()


    locationManager.delegate = self
    locationManager.desiredAccuracy = kCLLocationAccuracyBest
    locationManager.requestAlwaysAuthorization()
    locationManager.startUpdatingLocation()

    let location = self.locationManager.location

    var latitude: Double = location.coordinate.latitude
    var longitude: Double = location.coordinate.longitude

    println("GPS Súradnice :: \(latitude), \(longitude)")

    theMap.delegate = self
    theMap.mapType = MKMapType.Standard
    theMap.showsUserLocation = true


}

override func didReceiveMemoryWarning()
{
    super.didReceiveMemoryWarning()

}



//--- Find Address of Current Location ---//

func …
Run Code Online (Sandbox Code Playgroud)

xcode mapkit ios swift

-1
推荐指数
1
解决办法
1800
查看次数

标签 统计

ios ×1

mapkit ×1

swift ×1

xcode ×1