コンパスを特定の場所に向ける必要があるプロジェクトに取り組んでいます。ユーザーがiPhoneを傾けたり移動したりしても、このコンパスは常にこの場所を指す必要があります。場所と現在の方向に対する角度を取得しましたが、コンパスを指すこの機能を実装する方法がわかりません。何か助けてくれますか。
CLLocationDirection direction = newHeading.magneticHeading;
double radians = -direction / 180.0 * M_PI;
//For Rotate Niddle
CGFloat angle = RadiansToDegrees(radians);
double angletothelocation=[self bearingToLocation:destinationLocation];
[self rotateArrowView:arrowView degrees:(angle+radianangle)];
しかし、私は間違った方向に進んでいます。誰かが私にそれを行う方法を提案できますか?前もって感謝します....