Ich habe drei Textfelder aus meiner Sicht. 1. Postleitzahl, 2. Stadt und 3. Staat.AutoFill Stadt und Bundesstaat von Postleitzahl in iOS
Wie Auto Stadt und Staat Feld von der Postleitzahl in iOS automatisch ausfüllen?
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string
{
NSString *currentString = [textField.text stringByReplacingCharactersInRange:range withString:string];
int length = [currentString length];
if(length > 5)
{
return NO;
}
if(length == 5)
{
[self getCityAndState];
}
return YES;
}
- (void) getCityAndState
{
//How to use google (or any) api to autofill city and state in objective - c?
}
Verwenden Goolge GeoCoding API - [Diese] Siehe (https://developers.google.com/maps/documentation/geocoding/?csw=1) – Shruti
prüfen Link http://stackoverflow.com/questions/4749706/lookup-city-and-state-by-zip-google-geocode-api – user2071152