Giter Club home page Giter Club logo

Comments (6)

samvermette avatar samvermette commented on July 25, 2024

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.

jmstone617 avatar jmstone617 commented on July 25, 2024

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.

jmstone617 avatar jmstone617 commented on July 25, 2024

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.

jmstone617 avatar jmstone617 commented on July 25, 2024

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.

samvermette avatar samvermette commented on July 25, 2024

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.

samvermette avatar samvermette commented on July 25, 2024

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)

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.