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

那年仲夏 提交于 2019-12-05 00:40:52

问题


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?


回答1:


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];


来源:https://stackoverflow.com/questions/12348872/get-states-list-of-states-according-to-selected-country

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!