Getting magneticHeading value
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]];
}
精彩评论