I’m getting the location through - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation. It should work when you move (can’t really test it in simulator, at least I don’t know how) but when I first load the app, the mapview is focused on the whole world, not just my location. Can I anyhow call the method to change the location on first view?
Here is my current code if it helps:
http://pastebin.com/9Sb2xVmE
http://pastebin.com/rh9WB2ca
I’m getting the location through – (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation . It
Share
If your using mapkit:
Have you tried
Example:
this should zoom the mapview to your desired size, while maintaining focus on the center.
If your using CoreLocation:
Heres a checklist of what might have gone wrong:
I advise you to go to this page : Getting location of a iOS device with objective-C and follow the tutorial bit by bit. That should help you out.
Also, heres the mapkit docs
Best of luck with your project :]