gpt4 book ai didi

objective-c - ios:将指南针添加到 ARView

转载 作者:塔克拉玛干 更新时间:2023-11-02 20:18:02 24 4
gpt4 key购买 nike

我想在以下项目中向 ARView 添加指南针:http://developer.apple.com/library/ios/#samplecode/pARk/Listings/pARk_ARView_m.html#//apple_ref/doc/uid/DTS40011083-pARk_ARView_m-DontLinkElementID_5

我使用了 - (void) locationManager:(CLLocationManager *)manager didUpdateHeading:(CLHeading *)newHeading

但是好像没有被执行。请帮我解决这个问题。提前致谢

最佳答案

请参阅以下来自 Location Awareness Programming Guide 的引述.此外,您可能需要在 设置 应用程序中检查您的位置配置(在 iOS 6 中的“隐私”下),以确保您的应用程序已获得位置操作授权。

根据指南:

The steps for receiving heading events are as follows:

  1. Create a CLLocationManager object.
  2. Determine whether heading events are available by calling the headingAvailable class method. (In iOS 3.x and earlier, check the value of the headingAvailable property instead.)
  3. Assign a delegate to the location manager object.
  4. If you want true north values, start location services.
  5. Call the startUpdatingHeading method to begin the delivery of heading events.

关于objective-c - ios:将指南针添加到 ARView,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13392903/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com