Skip to content

Instantly share code, notes, and snippets.

@richarddas
Forked from chrishulbert/LocationHelper.h
Created October 15, 2012 10:05
Show Gist options
  • Save richarddas/3891790 to your computer and use it in GitHub Desktop.
Save richarddas/3891790 to your computer and use it in GitHub Desktop.
Blocks location helper for finding location on an iphone
//
// LocationHelper.h
//
// Created by Chris Hulbert on 24/04/12.
// Modified by Richard Das 15/10/12.
//
#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>
#define locationHelperPurpose @"Lovetune would like to know your location to add it to your tweets."
typedef void(^LocationBlock)(CLLocation* location); // Is called with nil on error
@interface LocationHelper : NSObject<CLLocationManagerDelegate>
{
CLLocation *bestEffortAtLocation;
}
@property (nonatomic, retain) CLLocation *bestEffortAtLocation;
+ (void)getLocation:(LocationBlock)block;
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment