Skip to content

Instantly share code, notes, and snippets.

@CavalcanteLeo
Forked from chrishulbert/LocationHelper.h
Created March 22, 2016 02:36
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 CavalcanteLeo/36c8f9c27a5903194a0e to your computer and use it in GitHub Desktop.
Save CavalcanteLeo/36c8f9c27a5903194a0e to your computer and use it in GitHub Desktop.
Blocks location helper for finding a very rough location on an iphone
//
// LocationHelper.h
//
// Created by Chris Hulbert on 24/04/12.
//
#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>
#define locationHelperPurpose @"This app would like to know your location for some good reason." // Change this!
typedef void(^LocationBlock)(CLLocation* location); // Is called with nil on error
@interface LocationHelper : NSObject<CLLocationManagerDelegate>
+ (void)getRoughLocation:(LocationBlock)block;
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment