hello.
i'm trying develop first app, map app shows nearby grocery stores pins. have 1 problem, i'm not able "users" location when press "location" button.
have found tutorials latitude , longitude, , have changed them location, when i'm place , presses location button, old location appears.
there way location "autoupdate"?
code in viewcontroller.m file
code:
-(ibaction)getlocation { mapview.showsuserlocation = yes; mkcoordinateregion region; region.center.latitude = 61.232357; region.center.longitude = 10.22526; region.span.longitudedelta = 0.01; region.span.latitudedelta = 0.01; [mapview setregion:region animated:yes];
you allways setting region same latitude , longitude, you're not getting real time data..
there delegate method that, updatetolocation, need search that, if new location has found, trigger method..
should flow.
Forums iPhone, iPad, and iPod Touch iOS Programming
- iPhone
- Mac OS & System Software
- iPad
- Apple Watch
- Notebooks
- iTunes
- Apple ID
- iCloud
- Desktop Computers
- Apple Music
- Professional Applications
- iPod
- iWork
- Apple TV
- iLife
- Wireless
No comments:
Post a Comment