Skip to content

Instantly share code, notes, and snippets.

@robertmryan
Last active February 28, 2016 23:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robertmryan/c526b6a4e477428f2a15 to your computer and use it in GitHub Desktop.
Save robertmryan/c526b6a4e477428f2a15 to your computer and use it in GitHub Desktop.
Lazily instantiate location manager
lazy var locationManager: CLLocationManager = {
let manager = CLLocationManager()
manager.requestWhenInUseAuthorization()
return manager
}()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment