Latest 0.0.2
Homepage https://github.com/liuyongjiesail/YJLocationPicker
License MIT
Platforms ios 5.0, requires ARC
Dependencies Masonry
Authors

一行代码实现省市区三级地区选择功能

CocoaPods支持

你可以在 Podfile 中加入下面一行代码来使用YJLocationPicker

pod 'YJLocationPicker'

完成后需将demo中Resource资源文件Address.plist拖入您的工程中

示例代码

//选择地区按钮

  • (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];

}] show];

}

Latest podspec

{
    "name": "YJLocationPicker",
    "version": "0.0.2",
    "summary": "u4e00u884cu4ee3u7801u5b9eu73b0u7701u5e02u533au4e09u7ea7u5730u533au9009u62e9u529fu80fd",
    "homepage": "https://github.com/liuyongjiesail/YJLocationPicker",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "u5218u6c38u6770": "[email protected]"
    },
    "social_media_url": "http://blog.csdn.net/yj_sail?viewmode=list",
    "platforms": {
        "ios": "5.0"
    },
    "source": {
        "git": "https://github.com/liuyongjiesail/YJLocationPicker.git",
        "tag": "0.0.2"
    },
    "source_files": "YJLocationPicker/*.{h,m}",
    "requires_arc": true,
    "dependencies": {
        "Masonry": []
    }
}

Pin It on Pinterest

Share This