美文网首页
全国城市选择控件(含城市ID,可扩展城市支持状态,经纬度,上级省

全国城市选择控件(含城市ID,可扩展城市支持状态,经纬度,上级省

作者: Leopx | 来源:发表于2017-03-10 11:05 被阅读0次

城市选择控件(含城市ID),城市及ID为国家统计局最新数据
用法示例:
1.导入头文件
#import "XPXCityPickerVC.h"

2.创建城市选择对象

XPXCityPickerVC *city = [[XPXCityPickerVC alloc] init]; 
city.locationCity = @"上海"; 
city.selectCityNameAndId = ^(NSString *cityName, NSString *cityId) {   

  NSLog(@"%@ %@",cityName, cityId);  

};
[self.navigationController pushViewController:city animated:YES];

项目GitHub链接:
https://github.com/leoxpx/XPXCityPicker#

1.png 2.png 3.png

相关文章

网友评论

      本文标题:全国城市选择控件(含城市ID,可扩展城市支持状态,经纬度,上级省

      本文链接:https://www.haomeiwen.com/subject/bqyngttx.html