Comments (6)
I will add this eventually. Note that it should be designed in a fashion similar to addPullToRefreshWithActionHandler:
method. Something like: addInfiniteScrollingWithActionHandler:
. Feel free to implement it yourself and submit a pull request.
from svpulltorefresh.
I am working on integrating this into the SVPullToRefresh class, though I only get an hour here and there. I'll have something soon, and I'd love some feedback. Thanks a lot; this is my first contribution to GitHub, so I am still navigating my way around.
On May 3, 2012, at 4:22 PM, Sam Vermette wrote:
I will add this eventually. Note that it should be designed in a fashion similar to
addPullToRefreshWithActionHandler:
method. Something like:addInfiniteScrollingWithActionHandler:
. Feel free to implement it yourself and submit a pull request.
Reply to this email directly or view it on GitHub:
#4 (comment)
from svpulltorefresh.
I have it working now so that the user can drag past the last cell and trigger the load. I created a property in the SVPullToRefresh class that allows you to set either the section or row load limit. The SVPullToRefresh and the DragToLoad can be called with a single method - (void)addPullToRefreshWithActionHandler:andPerpetualLoadHandler:
. In the Demo project, the only additional work is to tell your tableViewDelegate that the number of rows or sections should be the load limit times the number of loaded portions, which is a readonly property managed by SVPullToRefresh.
This is one implementation style. The other would be to automatically load the next portion of content once you scroll past a certain point in the scrollView/tableView. I can work on that implementation, as well. Perhaps by adding a third addPullToRefresh... method similar to addPullToRefreshWithActionHandler:automaticallyLoadNewContent:(BOOL)shouldLoadNewContent
from svpulltorefresh.
I've renamed the perpetual load handler to -addPullToRefreshWithActionHandler:andDragToLoadHandler:
to let you drag past the bottom of the scroll view to load more content. I've also added a "lazy" handler called - (void)addPullToRefreshWithActionHandler:infiniteScrollActionHandler:
that will automatically fire the infiniteScrollingHandler once 80% of the scrollview's content is scrolled through. In SVPullToRefresh I have added a loadNextPortion method to SVPullToRefresh that will handle reloading your tableView or expanding your scrollView's contentSize automatically. Subsequently, you can leave this method call out (it is shown in the demo), and handle the loading action yourself.
from svpulltorefresh.
See my latest comment on pull request #10.
Will leave this issue open until someone else (or I) come up with a decent implementation of the "load more" functionality. Sorry if I sound rude, I'm just trying to keep SVPullToRefresh a high-quality component.
from svpulltorefresh.
I just added support for infinite scrolling. It might require a little more testing but seems to do the job pretty good so far. Will close the issue as the core functionality is there, but feel free to report bugs related to it though.
from svpulltorefresh.
Related Issues (20)
- Fork and continue this project to give maintenance HOT 4
- I think there's a bug need to fix HOT 2
- may a flaw in UI configure?
- is there alternative for Swift HOT 1
- Infinite Scrolling Issue HOT 1
- 虽然很无情, 但是还是不要用了 HOT 1
- Infinite Scroll Issue HOT 3
- SetTitle not work first pull HOT 2
- Infinite Scroll Issue & Table Hide HOT 1
- iOS10 - showsInfiniteScrolling = YES - Observers issue HOT 1
- 我这里一直有更新,issue可以提到这里 HOT 6
- For issues please go to my fork repo
- Why isn't this library ported to Swift?
- Hi guys please go to my forked repo to have new feature/bug fixed. HOT 4
- scrollOffsetThreshold needs consider originalBottomInset?
- State will be triggered all the time, and not to be loading
- addPullToRefresh for WKWebView
- Can I replace the image that is refreshed by the drop-down?
- Mobile Development
- SFRefresh, written with swift, fixed the KVO crash bug, support Lottie animation.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from svpulltorefresh.