cllocationmanager

    1热度

    1回答

    我想,当用户从任何地图销300米(所有引脚从API来) 我通过计算距离发送通知之间的距离.. currentLocation = CLLocationManager() currentLocation!.distance(from: pinLoc) 我得到的距离吧,不过,为了跟踪用户的位置(驾驶),我必须把我的代码中(didUpdateLocations)功能,这将不断循环永远[我不使用st

    1热度

    1回答

    我想使用allowDeferredLocationUpdates(untilTraveled:超时:)推迟位置更新。随后的文档是https://developer.apple.com/documentation/corelocation/cllocationmanager/1620547-allowdeferredlocationupdates。 即使通过尝试各种方式,从调试器取下手机,保持手机闲

    0热度

    1回答

    我是新手编码器,我正在使用教程来帮助我学习。 我正在做一个天气应用程序,但我收到这个错误,并希望有人可以帮助。 'CLLocationManagerDelegate' 不能建造,因为它没有可访问的初始化 谢谢。

    0热度

    1回答

    我一直在iOS 11中的“允许使用”和“始终允许”位置服务遇到问题。 iOS中的问题没有问题< 11.在尝试修复时遵循此thread,但仍然无效。我错过了什么?先谢谢你。 我在我的应用程序UITabViewController和UINavigationController每个选项卡内。 我有一个singleton LocationManager类。我将我的UINavigationControlle

    0热度

    1回答

    我在的.plist添加了所有3个可能的密钥获取背景位置更新: 隐私 - 位置始终和使用时使用情况说明 隐私 - 位置在使用时的用法说明 隐私 - 位置用法说明 我的代码是: private lazy var locationManager: CLLocationManager = { let manager = CLLocationManager() manager.desir

    0热度

    2回答

    我可以在表格上显示位置列表。但现在我想根据当前位置对其进行排序。 这是我怎么显示我的位置: func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentif

    3热度

    1回答

    我试图写一个简单的方法,喂了CLLocationDegrees并返回CLPlacemark。看着Apple's documentation,这看起来很简单。 下面是我所倾倒入一个游乐场: import CoreLocation // this is necessary for async code in a playground import PlaygroundSupport // th

    1热度

    1回答

    我正在使用JSQMessagesViewController在我的应用程序中实现聊天。我希望能够向用户发送我正在与我的位置聊天。这就是我所做的。 func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) { self.latestLocation = lo

    1热度

    2回答

    我正在寻找一种方法,可以跟踪用户到达指定坐标集附近的情况。该功能需要在应用程序处于后台时工作(最好在100米以内)。另外,为了保存电池,我最好不要想太多的坐标读数(也许每10分钟读一次,时间不超过几个小时)。 有一对夫妇的,我试图完成这项任务的方式,但一直未能取得理想的结果: 背景定时器: 我在添加一个后台任务( App.delegate) func applicationDidEnterBack

    4热度

    1回答

    iOS的对话框提示和消失后半秒: let locationManager = CLLocationManager() switch CLLocationManager.authorizationStatus() { case .authorizedWhenInUse: print("In Use \(locationManager.location?.des