0

For some reasons, I hope to get the current location without using the delegate method.
Is there some solutions which can get the current location just from CLLocationManager?

Pratik Bhiyani
  • 2,489
  • 3
  • 17
  • 27
zproject89
  • 225
  • 5
  • 19

2 Answers2

5

You can also use location method of CLLocationManager class which will return last known location of device.

manager = [[CLLocationManager alloc] init]; [manager startUpdatingLocation]; CLLocation *location = [manager location];

4

Check below links , those are the good Implementation of location update with Block :

https://github.com/ideaismobile/AKLocationManager

https://github.com/axldyb/CLLocationManager-blocks

https://github.com/keithpitt/DKLocationManager

Even you can use NSNotificationCenter for it ,

Check this : https://stackoverflow.com/a/16173504/2919739

Community
  • 1
  • 1
Pratik Bhiyani
  • 2,489
  • 3
  • 17
  • 27