且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

iOS iPhone在MKMapView上显示用户在空间中的方向和方向,如指南针应用程序

更新时间:2022-12-30 11:03:16

我遇到了类似的情况。我认为我们没有图书馆或设置来显示蓝色图标上的方向(至少我的搜索没有成功)。

I faced a similar situation. I don't think we have library or settings to display the direction on the blue icon (at least my search was not successful).

然而,使用CLHeading创建我们自己的方向指示器并不困难(参考TommyG的回答)。

However it is not difficult to create our own direction indicator using the CLHeading (reference in TommyG's answer).

我所做的是在地图中显示蓝色图标,并在不同视图中提供一个小箭头以指示方向。

What I did was to display the blue icon as in the map and provide a small arrow in a different view to indicate the direction.

希望这在某种程度上有所帮助

Hope this helps in some way