Giter Site home page Giter Site logo

valdyr / pstcollectionview Goto Github PK

View Code? Open in Web Editor NEW

This project forked from steipete/pstcollectionview

0.0 1.0 0.0 19.23 MB

Open Source, 100% API compatible replacement of UICollectionView for iOS4.3+

Home Page: http://petersteinberger.com

License: MIT License

Objective-C 99.88% Ruby 0.12%

pstcollectionview's Introduction

PSTCollectionView

Open Source, 100% API compatible replacement of UICollectionView for iOS4.3+

You want to use UICollectionView, but still need to support older versions of iOS? Then you're gonna love this project. Originally I wrote it for PSPDFKit, my iOS PDF framework that supports text selection and annotations, but this project seemed way too useful for others to keep it for myself :)

If you want to have PSTCollectionView on iOS4.3/5.x and UICollectionView on iOS6, use PSUICollectionView (basically add PS on any UICollectionView class to get auto-support for older iOS versions)* If you always want to use PSTCollectionView, use PSTCollectionView as class names. (replace the UI with PST)

Current State

Most features work, including the flow layout with fixed or dynamic cell sizes and supplementary views. If you're not doing something fancy, it should just work. PSTCollectionView is also internally designed very closesly to UICollectionView and thus a great study if you're wondering how UICollectionView works. See HowTo for helpful details.

How can I help?

The best way is if you're already using UICollectionView somewhere. Add PSTCollectionView and try it on iOS4/5. Check if everything works, fix bugs until the result matches 1:1 with iOS6. You can also just pick an issue fron the Issue Tracker and start working there.

Or start playing around with one of the WWDC examples and try to make them work with PSTCollectionView. Most of them already do, but just not as perfect.

You could also write a Pintrest-style layout manager. Can't be that hard.

Animations

Thanks to Sergey Gavrilyuk (@octogavrix), animations are supported. It's not perfect yet (see LineExample), but it's a great start.

ARC

PSTCollectionView works with Xcode 4.5.2+ and ARC.

Dependencies

PSTCollectionView needs the QuartzCore.framework.

Interoperability

Another goal (at least super useful for debugging) is interoperability between UI/PS classes:

UICollectionViewFlowLayout *flowLayout = [UICollectionViewFlowLayout new];
PSTCollectionView *collectionView = [PSTCollectionView alloc] initWithFrame:self.view.bounds collectionViewLayout:(PSTCollectionViewFlowLayout *)flowLayout];

(*) Note that for some methods we can't use the _ underscore variants or we risk to get a false-positive on private API use. I've added some runtime hacks to dynamcially add block forwarders for those cases (mainly for UI/PST interoperability)

Creator

Peter Steinberger (@steipete) and lots of others! See Contributors for a graph. Thanks everyone!

License

PSTCollectionView is available under the MIT license. See the LICENSE file for more info.

pstcollectionview's People

Contributors

aburgel avatar advantis avatar alexanderedge avatar beaugbolle avatar carmandrew avatar christopher-a avatar connorhu avatar cysp avatar emeitch avatar gavrix avatar gcerquant avatar goonzoid avatar imageoptimiser avatar inamiy avatar joelcarranza avatar ksuther avatar lluuaapp avatar loganmoseley avatar lono175 avatar orta avatar ptescher avatar sibljon avatar steipete avatar streeter avatar taiyangc avatar tibr avatar toco avatar ttsubota avatar tyrone-sudeium avatar vdone215 avatar

Watchers

 avatar

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.