Giter VIP home page Giter VIP logo

collectionview's People

Contributors

jkocherhans avatar wcbyrne 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

collectionview's Issues

Refactor ResultsController for better testability and reusability

The results controller protocol enforces some methods that are useful in some cases but because the existing types of controllers have different requirements, this protocol doesn't provide much.

Furthermore, with the controllers being generics, they must have alternatives to the protocol methods (currently _object(at:)) to make use of those generic types.

Possible solutions:

  • Dont't have a shared protocol (it does help consolidate the delegate, but doesn't provide much)
  • Simplify the protocol to the core functions (i.e. numberOfSections, numberOfObjects(in:))

The other goal here is to break out the different controller processing aspects to make them easily reused by different types of controllers. For example, something similar to the ManagedResultsController could serve well as a base for the others to build upon.

Change selection delegates to use Set<IndexPath> to report all changes.

Right now the CollectionViewDelegate functions related to item selection all report a single indexPath. If you select multiple it will report one (usually the last) indexPath that was selected or deselected.

The alternative would be to report all of the index paths in a set (or array) to give you greater control over how to react to the change.

@objc optional func collectionView(_ collectionView: CollectionView, didSelectItemAt indexPath: IndexPath)
Would become
@objc optional func collectionView(_ collectionView: CollectionView, didSelectItemsAt indexPath: Set<IndexPath>)

Cells can sometimes move to the incorrect position

This is definitely cause by a flaw in the moving logic.

The cell manipulation logic and editing sessions could certainly be improved. It started for a simple use case but was then extended without implementing the proper algorithms (also, not sure what the proper ones are but I'm assuming they exist).

Here is an example form Lingo.

2017-08-11 14_18_31

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.