iphone ios 全国省市,城市数据库(sqlite3, UIPickerView)源码(例子)与解析

来源:互联网 发布:秒杀红包软件 编辑:程序博客网 时间:2024/04/28 07:44




这个是例子中的截图,其中有几个关键点

1)数据库来源网络

2)第二列、第三列的内容分别依赖与前一列

3)sqllite数据库采用开源的FMDB

4)采用控件UIPickerView显示


其中第二点的关键代码

- (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component{    NSLog(@"Selecting row %d component %d", row, component);        [self updateSelection];        // When A is changed, we need to reload B and C    if (component == 0) {        [pickerView reloadComponent:1];        [pickerView reloadComponent:2];    } else if (component == 1) {        [pickerView reloadComponent:2];    }}


源码:有要的联系我邮箱吧, linzhiji@gmail.com 

以下大家友情支持一下:

做了一个产品,需要人气支持一下,android和iphone上91市场搜索#super junior粉丝团#,或者直接到页面下载http://m.ixingji.com/m.html?p=X16,大家帮忙捧捧场。




原创粉丝点击