Giter VIP home page Giter VIP logo

drcollectionviewtablelayout-ios's Introduction

DRCollectionViewTableLayout

UICollectionViewLayout for displaying 2D tables, similar to those in spreadsheets. Library contains layout class and DRCollectionViewTableLayoutManager that acts as a proxy and allows to configure collection view, and propagate it with data in easy way. For example implementation, checkout attached demo project.

Tested under iOS 7, should work on iOS 6 (check reported issues if you are planning to support iOS 6).

Demo project is configured to display a table with column and row headers. Each cell has randomly generated color. Labels in cells contains UICollectionView indexPath for given cell, as well as layout's column and row number. Labels in headers contains UICollectionView section number, and layout's column/row number.

DRCollectionViewTableLayout screenshot 1

DRCollectionViewTableLayout alows you to easily setup floating headers for columns as well as rows. Sticky headers behaviour is similar to UITableView headers.

DRCollectionViewTableLayout screenshot 2

Installation

You can install the library using CocoaPods. To do so, you will need to add one of the following lines to your Podfile:

For stable release (recommended):

pod 'DRCollectionViewTableLayout', '~> 1.0.5'

Which creates dependency for version >= 1.0.5 and < 1.1

For most recent or exact development version (not recommended on production):

pod 'DRCollectionViewTableLayout', :git => 'https://github.com/darrarski/DRCollectionViewTableLayout-iOS.git', :tag => 'VERSION_TAG'

Where VERSION_TAG you should put tag name for given version (ex. "1.0.5"). It is recommended to set version explicity instead of using most recent version, as backward compatibility is not warranted.

Usage

Public methods of the library are documented in-code. For detailed examples check out attached demo project.

License

Code in this project is available under the MIT license.

Credits

The library is using concepts from:

drcollectionviewtablelayout-ios's People

Contributors

darrarski avatar kevin-zqw 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

Watchers

 avatar  avatar  avatar

drcollectionviewtablelayout-ios's Issues

Crash on animated reload

The following causes a crash:

[self.collectionView performBatchUpdates:^{
    [self.collectionView reloadData];
} completion:^(BOOL finished) {}];

Here is the log:

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid update: invalid number of items in section 0. The number of items contained in an existing section after the update (8) must be equal to the number of items contained in that section before the update (6), plus or minus the number of items inserted or deleted from that section (0 inserted, 0 deleted) and plus or minus the number of items moved into or out of that section (0 moved in, 0 moved out).'

If I do not animate the reload and simply call

[self.collectionView reloadData];

then, there is no crash.

Problem reload data

Awesome framework nice work..!

collectionview.reload()

automatically re-arranging the cell when I was try to reload the collection view

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.