开发者

Getting magneticHeading value

开发者 https://www.devze.com 2023-03-03 03:52 出处:网络
Can I get the magnetic heading value on the following delegate? If so, how can I get it into a UILabel?

Can I get the magnetic heading value on the following delegate? If so, how can I get it into a UILabel?

- (void)locationManager:(CLLo开发者_开发知识库cationManager *)manager didUpdateHeading:(CLHeading *)newHeading {

}


Yup:

- (void)locationManager:(CLLocationManager *)manager didUpdateHeading:(CLHeading *)newHeading {
    myLabel.text = [NSString stringWithFormat:@"%f", [newHeading magneticHeading]];
}
0

精彩评论

暂无评论...
验证码 换一张
取 消