选择省市区
Posted justqi
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了选择省市区相关的知识,希望对你有一定的参考价值。
//可以选择到省市区、省市、省
-(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]; }; }
以上是关于选择省市区的主要内容,如果未能解决你的问题,请参考以下文章
Android中选择器PickerView(第三方控件)的使用2----省市区选择