I want to read my current location using Map view in my iPhone application.
My current location may be changed depends upon timing.
Now I will be one location, after one hour I will have travelled some kilometers. But my aim is, whenever I will be there, that current location, I will be want to read.
If there is any way to possible to read like this.
If you have a MKMapView object called mapView, you’d do:
That’ll turn on MKMapView’s built in location services. You don’t need to deal with CLLocation Manager necessarily, because MKMapView will handle the work of locating the device for you.
Now, receiving the updates that MKMapView produces is a touch trickier if you’ve never worked with delegates before.
In your .h, you want to adopt the
<MKMapViewDelegate>protocol.Then, right next the above line, say:
Then, implement the following method:
That method will get called every time MKMapView updates its location, probably every few seconds at least.