Created
February 9, 2012 23:28
-
-
Save jagbolanos/1784229 to your computer and use it in GitHub Desktop.
Background Task and then Timer
This file contains hidden or 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
| UIBackgroundTaskIdentifier bgTask; | |
| bgTask = [app beginBackgroundTaskWithExpirationHandler:^{ | |
| [app endBackgroundTask:bgTask]; | |
| }]; | |
| self.updateLocationTimer = [NSTimer scheduledTimerWithTimeInterval:UPDATE_INTERVAL target:self selector:@selector(shouldStartLocationUpdate) userInfo:nil repeats:YES]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Click here for work Timer in background in swift 3 or later