根据所选国家/地区获取国家/地区列表 [英] Get States list of states according to selected country
本文介绍了根据所选国家/地区获取国家/地区列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想检索从下拉菜单中选择的特定国家/地区的所有州列表的名称.
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.
是否有可用的代码数据库或 API?
Is there any code db or API available for that?
推荐答案
您可以下载 这个 sqlite 文件.这是一个国家及其各自国家的数据库.您可以在每次用户选择国家/地区时重新创建查询.
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];
这篇关于根据所选国家/地区获取国家/地区列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文