iOS 4.0 버전 이전에, CoreLocation
가 제대로 고도를보고했다, 지금은 항상 0피트로보고합니다. 는 아이폰 OS CoreLocation 고도
-(void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation*)newLocation fromLocation:(CLLocation *)oldLocation
{
NSString *tLatitude = [NSString stringWithFormat:@"%3.5f", newLocation.coordinate.latitude];
NSString *tLongitude = [NSString stringWithFormat:@"%3.5f", newLocation.coordinate.longitude];
/* the following returns 0 */
NSString *tAltitude = [NSString stringWithFormat:@"%i", newLocation.altitude];
/* theres more code, but it's not relevant,
and this worked prior to iOS 4.0*/
[manager stopUpdatingLocation];
}
이 장치도 시뮬레이터 작동하지, 다른 사람의 경험은이 문제입니까?
Core Location Data Types Reference 가입일
기기 또는 시뮬레이터에서 테스트 중이십니까? –
장치 및 시뮬레이터. – WrightsCS