美文网首页Edison
iOS自定义省市区(县)选择器

iOS自定义省市区(县)选择器

作者: Hither | 来源:发表于2017-03-21 17:03 被阅读89次

效果图

#使用:
-(LocationPickerView *)locationPickerView{
    
    if (!_locationPickerView) {
        _locationPickerView = [[LocationPickerView alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
        __weak typeof(self) wself = self;
        _locationPickerView.completion = ^(NSString *provinceName,NSString *cityName,NSString *countyName) {
            __strong typeof(wself) self = wself;
            self.addressLabel.text = [NSString stringWithFormat:@"%@ %@ %@",provinceName,cityName,countyName];
        };
        [self.navigationController.view addSubview:_locationPickerView];
    }
    
    return _locationPickerView;
}

地址:[https://github.com/hejintaochenxin/HJTLocationPickerView.git]

相关文章

网友评论

    本文标题:iOS自定义省市区(县)选择器

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