Giter Site home page Giter Site logo

mralek / awpagedarray Goto Github PK

View Code? Open in Web Editor NEW
332.0 332.0 32.0 448 KB

A data structure for easier pagination. NSProxy subclass which acts as an NSArray for easier paging mechanisms in UITableViews and UICollectionViews.

License: MIT License

Objective-C 98.05% Ruby 1.95%

awpagedarray's People

Contributors

honood avatar mralek avatar readmecritic avatar yakubbaev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

awpagedarray's Issues

Misworded comments in DataViewProvider.h

The comment pertaining to the dataObjects array, which now reads...:

/**
 * The array returned will be a proxy object containing
 * NSNull values for data objects not yet loaded. As data
 * loads, the proxy updates automatically to include
 * the newly loaded objects.
 *
 * @see shouldLoadAutomatically
 */

...should instead read:

/**
* Each element in the array will contain an abstract data object (by proxy)
*  as a placeholder for the requested, concrete data object via proxy.
*  When the client requests any of the resources contained in a 
*  data object, the proxy will create a concrete instance of the
*  data object, with which the array will replace the NSNull stored in
*  the corresponding element.
*
* @see shouldLoadAutomatically
**/

...or, something like it, anyway. The proxy design pattern (and design patterns overall) were (and, to a large extent, still are) new to me; perfectly worded explanations are key to newbie success :)

What if the count can only be retrieved with a network call?

Thanks for putting AWPagedArray together. It's pretty cool. My use case is to fetch data from a Parse backend, for which I don't know the count when I present the interface.

At present AWPagedArray pretty much requires a fixed count to be available when the view loads, because it's a parameter of the initialiser -initWithCount:objectsPerPage:.

What about the cases where the count is not known until display?

Swift support

As of now, this class doesn't work in Swift. Either I'll try to update the Objective-C code to work as is or I'll create an entire new collection type for paged arrays directly in Swift.

Initial Page

Hi and thank you for all this beautiful piece of code!
It would be nice to have an option to set the initial page because right now if you set it to 0 the setObjects: forPage: method, won't register the page.

Usage isn't clear enough IMHO

Hello,
First of all, i appreciate all your work it's fantastic, and admire people like you who share their knowledge with the world.

I'm trying to implement your AWPagedArray, and i'm confused how to do it, since you've putted a usage example here in GitHub, but i feel it lacks a bit of information. I also downloaded the demo project, and over there i have some barriers about how to approach to it, and use it in my project.
Again i say, it could a problem for my side that i don't understand it, if you think it can be more explanatory and more easy approach, it would love that.

Thanks, and best of luck

Support for dynamic sizing

When using paging data sources which don't have a fixed size, like a news feed, AWPagedArray should be able to dynamically increase its size as pages load.

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.