Coder Social home page Coder Social logo

ldrefresh's Introduction

GitHub 上下拉刷新项目代码已不少,为何还写LDRefresh呢?

1.高扩展性: 平时定制GitHub的上下拉刷新代码时发现代码过于繁琐,不易修改,代码简单的项目可扩展性又不强,LDRefresh代码通俗易懂, 在做到简单的同时不失扩展性, 在理解上下拉刷新要素的基础上,你在本代码之上稍加修改,便能实现大部分软件的上下拉刷新效果!

2.集成京东商品详情页上下拉切换:一直想实现下这个效果,此次将此功能集成了进来!

效果演示

Demo说明

1.京东Demo:

(一)淘宝商品详情页,知乎回答上下拉切换 都类似此效果

2.微博Demo:

(一)微博最新版的上下拉刷新去除了时间显示,刷新控件应该简约,时间有些多余。

(二)demo中第一次上拉刷新LoadMoreEnabled默认是使能的,第二次置成了NO所以无法上拉加载更多了,重新下拉刷新会置成YES。

功能说明:

支持tableView,collectionView, webView 以及所有继承自scrollView的控件。

具体使用查看Demo代码,刷新结束注意调用endRefresh!

//下拉刷新
_tableView.refreshHeader = [_tableView addRefreshHeaderWithHandler:^ {
}];

//上拉加载更多
_tableView.refreshFooter = [_tableView addRefreshFooterWithHandler:^ {
}];

ldrefresh's People

Contributors

sntd avatar

Watchers

Lucky_lee 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.