Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get States list of states according to selected country [closed]

I want to retrieve names of all the states list of a particular country which is selected from a drop down menu.

I know how to retrieve the list of all countries via apple code but now i want the list of all the states.

Is there any code db or API available for that?

like image 242
Aakil Ladhani Avatar asked Sep 10 '12 09:09

Aakil Ladhani


1 Answers

You can download this sqlite file. This is a database of countries with their respective states. you can re - create a query every time the user selects a country.

NSString *queryString = [NSString stringWithFormat:@"select zone_id , name from
                       zone where country_id = %d", countryID];
like image 66
janusfidel Avatar answered Oct 16 '22 10:10

janusfidel