Giter Club home page Giter Club logo

chooselocation's Introduction

ChooseLocation

京东选择收货地址

###导读 目前大多数APP的地址选择是用系统的picker View,也不乏用tableview自定义的. 这里分享一个高仿京东的地址选择给大家. 源码地址:https://github.com/HelloYeah/ChooseLocation 欢迎大家checkout,Star...

#####下面是京东收货地址的一些交互以及代码思路分析

1.刚打开选择地址视图时,底部ScrollView的滚动范围只有一屏宽.

2.点击某个省时,增加对应的市级列表,底部ScrollView横向滚动区域增加一屏宽.

1.gif

1.当重新选择省的时候,移除后面的市级别列表,区级别列表

2.移除顶部的市按钮,区按钮.

3.并且底部ScrollView的滚动范围减少至两屏宽.

2.gif

1.当重新选择省市的时候,对应顶部按钮的宽度跟着改变,对应下级的按钮的x值要相应调整 2.按钮底部的指示条的长度和位置跟着相应变化

tmp5deefbb7.png

#####其他注意点

1.点击灰色区域,取消地址选择,回到主界面

2.京东用的是网络请求获取省市区信息,每点击一个cell,向服务器发送请求,获取下级信息.这里用的是本地plist表

下面是plist表的格式

tmp4fa6b8b2.png

源码地址:https://github.com/HelloYeah/ChooseLocation 欢迎大家checkout,Star...

chooselocation's People

Contributors

helloyeah avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.