Hi!I am using iPhone sdk 4.0.I have used below code for taking Current location but it's delegate methods is not called Automatically...My code is given below:
in .hfile
i have import
CoreLocation/CoreLocation.h
also delegate
CLLocationManagerDelegate
CLLocationManager *locationManager;
in .mfile
locationManager = [[CLLocationManager alloc] init];
locationManager.delegate = self;
locationManager.distanceFilter = kCLDistanceFilterNone; // whenever we move
locationManager.desiredAccuracy = kCLLocationAccuracyHundredMeters; // 100 m
[locationManager startUpdatingLocation];
but i don't get the current location for that......My Delegate Method is which is not called:
- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation {