Latest 1.0.0
Homepage https://github.com/talisk/SKChinaCitySelector
License MIT
Platforms ios 8.0, requires ARC
Authors

enter image description hereenter image description here enter image description here

简介

基于UITableView的中国城市选择。数据来自百度APIStore。

使用方法

第一步:导入

使用CocoaPods导入,在Podfile中添加:

pod 'SKChinaCitySelector'

之后终端中执行

pod install

第二步:引用

在需要选择城市的文件中,添加头文件:

#import <SKChinaCitySelector/CityListViewController.h>

声明协议:

@interface ViewController ()<CityListDelegate>

添加回调方法:

- (void)didSelectCityWithName:(NSString *)cityName {
  // 处理选择城市之后的操作
}

调用:

CityListViewController *cityListVC = [[CityListViewController alloc] init];
UINavigationController *naviVC = [[UINavigationController alloc] initWithRootViewController:cityListVC];
[self presentViewController:naviVC animated:YES completion:nil];

Latest podspec

{
    "name": "SKChinaCitySelector",
    "version": "1.0.0",
    "summary": "An China city selector.",
    "homepage": "https://github.com/talisk/SKChinaCitySelector",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Swain": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/talisk/SKChinaCitySelector.git",
        "tag": "1.0.0"
    },
    "source_files": "Source/*.{h,m}",
    "requires_arc": true
}

Pin It on Pinterest

Share This