码迷,mamicode.com
首页 > 其他好文 > 详细

选择省市区

时间:2018-05-04 14:14:31      阅读:221      评论:0      收藏:0      [点我收藏+]

标签:hvie   ace   info   city   省市区   block   href   bubuko   地址   

//可以选择到省市区、省市、省

-(void)btnClick:(UIButton *)button{ __weak typeof(self) weakSelf = self; PlacePickMainController *vc = [[PlacePickMainController alloc] init]; if (button.tag == 0) { vc.pickType = PlacePickTypeToCounty;//选择省-市-区 }else if (button.tag == 1){ vc.pickType = PlacePickTypeToCity;//选择省-市 }else{ vc.pickType = PlacePickTypeToProvince;//选择省 } [weakSelf.navigationController pushViewController:vc animated:YES]; __weak PlacePickMainController *weakVC = vc; weakVC.FinishDoneBlock = ^(NSString *selectAllStr, NSString *provinceID, NSString *cityID, NSString *countryID, NSString *holeInfoStr) { NSLog(@"%@---%@---%@----%@",provinceID,cityID,countryID,holeInfoStr); [button setTitle:holeInfoStr forState:UIControlStateNormal]; }; }

 

技术分享图片

DEMO地址  https://github.com/justqi/DQPlacePick

选择省市区

标签:hvie   ace   info   city   省市区   block   href   bubuko   地址   

原文地址:https://www.cnblogs.com/justqi/p/8989970.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!