ios实现地点省市区的选择怎么实现
1个回答
展开全部
如何实现,你需要代码吗
//选择地区按钮
(IBAction)selectAction:(UIButton *)sender {
//直接调用
[[[YJLocationPicker alloc] initWithSlectedLocation:^(NSArray *locationArray) {
//array里面放的是省市区三级
NSLog(@"%@", locationArray);
//拼接后给button赋值
[sender setTitle:[[locationArray[0] stringByAppendingString:locationArray[1]] stringByAppendingString:locationArray[2]]forState:UIControlStateNormal];
//选择地区按钮
(IBAction)selectAction:(UIButton *)sender {
//直接调用
[[[YJLocationPicker alloc] initWithSlectedLocation:^(NSArray *locationArray) {
//array里面放的是省市区三级
NSLog(@"%@", locationArray);
//拼接后给button赋值
[sender setTitle:[[locationArray[0] stringByAppendingString:locationArray[1]] stringByAppendingString:locationArray[2]]forState:UIControlStateNormal];
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询