1. 程式人生 > >選擇省市區

選擇省市區

pick CI log else dem 分享 count tar select

//可以選擇到省市區、省市、省

-(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

選擇省市區