0

这里的例子:

查看 UITableViewCell 右侧的指南针

4

3 回答 3

2

用于CLLocationManager获取您的位置和航向,然后计算每个坐标的相对方向。

于 2012-08-06T10:26:40.177 回答
0

@kyr is right, you can calculate direction BY CLLocationManager, and about the rotated arows images, These could be static images with round background and arrow on it, everytime you calculate direction, you can rotate the Image by CGAffinetransform and CGAffineTransformMakeRotation.

于 2012-08-06T11:10:00.667 回答
0

Use CLLocationManager to get the heading.

-(void)locationManager:(CLLocationManager *)manager didUpdateHeading:(CLHeading *)newHeading {
    CLLocationDirection true = [newHeading trueHeading];
    CLLocationDirection magnetic = [newHeading magneticHeading];
}
于 2012-08-06T11:12:57.780 回答