저는 iPhone 개발에 익숙하지 않습니다. 현재 위치를 결정할 때 CLLocationManager의 작업 과정을 알고 싶습니다. 단추 이벤트에 대해 아래 코드를 사용하여 현재 위치를 찾습니다.위치 관리자가 현재 위치를 찾은 후 반복적으로 현재 위치를 찾습니다.
self.locationManager = [[[CLLocationManager alloc] init] autorelease];
self.locationManager.delegate = self; // Tells the location manager to send updates to this object
[locationManager startUpdatingLocation];
- (void)locationManager: (CLLocationManager *)manager didUpdateToLocation: (CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation
{ }
에서 나는 위도 긴 값을 결정하고 현재 위치를로드 한.
잘 작동합니다. 한 가지만 알고 싶습니다. 새 위치로 업데이트 한 후 다시 한번 현재 위치를 얻으려면 다시 호출해야합니다. 현재 위치를 찾을 수 없다면 다시 한 번 검색합니다. 현재 위치.
나는 두 경우 모두
설치 1. 아이폰이 현재의 위치를 결정하기위한 알고 싶어요.
2. 아이폰이 현재 위치를 판단 할 수없는 경우.
제발 도와주세요. 감사합니다.