SPGooglePlacesAutocomplete is a simple objective-c wrapper around the Google Places auto-complete API.
Take a look at this API from github, which can be useful https://github.com/spoletto/SPGooglePlacesAutocomplete
Use is shown here. By adding the .h file, you can access functions that implement the Google APIs from within the function. You can set parameters such as partial address bar, radius, language used by your application, your location (lat, long)
#import "SPGooglePlacesAutocompleteQuery.h"
...
SPGooglePlacesAutocompleteQuery *query = [SPGooglePlacesAutocompleteQuery query];
query.input = @"185 berry str";
query.radius = 100.0;
query.language = @"en";
query.types = SPPlaceTypeGeocode;
query.location = CLLocationCoordinate2DMake(37.76999, -122.44696)
Then call -fetchPlaces to check the Google APIs and get the results. The resulting array will return objects of class SPGooglePlacesAutocompletePlace.
[query fetchPlaces:^(NSArray *places, NSError *error) {
NSLog(@"Places returned %@", places);
}];
He also has a sample project that can be used.
source
share