小编Muh*_*jum的帖子

我想在Swift中找到Qibla Direction(方向的简单指南针)

所有代码都运行良好,但不能提供所需的结果.方向针不会移动到完美的位置.有时它有效,有时不行.

func DegreesToRadians (value:Double) -> Double {
    return value * M_PI / 180.0
}

func RadiansToDegrees (value:Double) -> Double {
    return value * 180.0 / M_PI
}

class ViewController: UIViewController , CLLocationManagerDelegate {
    var needleAngle : Double?

    //Main Composs
    @IBOutlet weak var composs: UIImageView!

    //Needle Move with respect to compose
    @IBOutlet weak var needle: UIImageView!

    @IBOutlet weak var mapView: MKMapView!

    // Kabhalocation 
    var kabahLocation : CLLocation?
    var latitude  : Double?
    var longitude : Double?
    var distanceFromKabah : Double?

    let locationManger …
Run Code Online (Sandbox Code Playgroud)

core-location ios swift

6
推荐指数
2
解决办法
1564
查看次数

标签 统计

core-location ×1

ios ×1

swift ×1