Giter Site home page Giter Site logo

lyxareapicker's Introduction

LYXAreaPicker

在项目开发中,选择地区的场景很常见,为了方便使用,从项目中摘出了最近写的地址选择控件LYXAreaPicker, 此控件采用本地json解析的方式,省市县三级联动,仿京东的地址选择样式和逻辑。

LYXAreaPicker01.png

一、集成方式:

1.可以下载下来把LYXAreaPicker文件夹拖进项目中

二、使用

1.导入头文件 #import "LYXAreaPickerView.h"

2.使用的代码参考如下:

//创建
LYXAreaPickerView *areaPickerView = [[LYXAreaPickerView alloc] initWithFrame:CGRectZero];
//显示
[areaPickerView showInView:self.view];
//设置选择地址的回调
areaPickerView.selectComplete = ^(NSString * _Nonnull area) {
    //显示选择的地址
    self.areaTextFiled.text = area;
};

注意事项:

1、控件采用Masonry布局,引入的项目中需要集成Masonry框架。

2、选中的对勾图片可自定义设定,在LYXAreaListTableViewCell.m中进行修改即可。

lyxareapicker's People

Contributors

liuyunxinok avatar

Stargazers

Levofloxacin avatar  avatar Been avatar  avatar

Watchers

James Cloos avatar  avatar

Forkers

levofloxacin

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.