简体   繁体   English

拨打iphone指南针的机芯

[英]dial movement for compass in iphone

I got a magnetic heading value from a compass. 我从指南针得到了磁航向值。 Now I need to rotate the needle based on the heading(angle) from that. 现在我需要根据标题(角度)旋转针头。 Please someone guide me how to do this. 请有人指导我如何做到这一点。

Thanks Prior... 先谢谢......

You can always transform (rotate) your layer (compass) with CGAffineTransformMakeRotation. 您始终可以使用CGAffineTransformMakeRotation转换(旋转)图层(指南针)。 For further reference take a look at this question . 如需进一步参考,请查看此问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM