Last active
May 6, 2016 03:18
-
-
Save nfarah86/6b2252bd2f7a492a99151a35af0a7658 to your computer and use it in GitHub Desktop.
Get the User's Latitude and Longitude Coordinates Every 10 seconds
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// omitted code | |
- (void)viewDidLoad | |
{ | |
// omitted code | |
self.timer = [NSTimer scheduledTimerWithTimeInterval:10 target:self selector:@selector(timerDidFire:) userInfo:nil repeats:YES]; | |
} | |
-(void)timerDidFire: (id)sender | |
{ | |
NFHLocationManager *locationManager = [NFHLocationManager sharedLocationManager]; | |
if(locationManager.updating) { | |
CLLocation *location = [locationManager lastLocation]; | |
// omitted 2 lines of code | |
} | |
} | |
// omitted code |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment