X 분으로 서버의 새 위치와 업데이트를 추적하는 앱을 개발 중입니다. 시간 diff가 X 분보다 크거나 같을 때 위치 업데이트를 중지하고 서버로 전송 한 다음 X 분 미만인 경우 위치 업데이트를 시작합니다. 그러나 didUpdateToLocation 대리자 메소드는 X 분 미만이면 호출되지 않습니다.CLLocationManager가 델리게이트 메서드를 호출하지 않습니다.
나는 여기에 내 코드를 게시하고있다 :
- (void)locationManager:(CLLocationManager *)manager
didUpdateToLocation:(CLLocation *)newLocation
fromLocation:(CLLocation *)oldLocation
{
if (theDiff > 10.0f || myDate == nil)
{
[self stopUpdating];
}
else
{
[self.mLocationManager startUpdatingLocation];
}
}
.h에을 추가 했습니까? –
iMeMyself
예. 내 .h 파일에 추가했습니다. – Sharme
나는 프로토콜을 의미합니까? 즉 UIViewController –
iMeMyself