• Stars
    star
    2,546
  • Rank 17,365 (Top 0.4 %)
  • Language
    Objective-C
  • License
    MIT License
  • Created almost 12 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

PSTCollectionView

UPDATE: I'm no longer using PSTCollectionView in any project. This purely exists to keep old projects alive and for historical reasons.

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 closely 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 Pinterest-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/PST 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.

More Repositories

1

Aspects

Delightful, simple library for aspect oriented programming in Objective-C and Swift.
Objective-C
8,383
star
2

PSStackedView

open source implementation of Twitter/iPad stacked ui - done right.
Objective-C
1,970
star
3

AFDownloadRequestOperation

A progressive download operation for AFNetworking.
Objective-C
1,051
star
4

InterposeKit

A modern library to swizzle elegantly in Swift.
Swift
962
star
5

PSPDFTextView

A subclass of UITextView that fixes the most glaring problems from iOS 7 and 7.1.
Objective-C
877
star
6

PSTAlertController

API similar to UIAlertController, backwards compatible to iOS 7. Will use the new shiny API when you run iOS 8.
Objective-C
737
star
7

PSPushPopPressView

Zoom, Rotate, Drag – everything at the same time. A view-container for direct manipulation, inspired by Our Choice from Push Pop Press.
Objective-C
611
star
8

PSFoundation

Categories and helper classes for iOS projects.
Objective-C
570
star
9

PSTDelegateProxy

A simple proxy that forwards optional methods to delegates - less boilerplate in your code!
Objective-C
256
star
10

PSYouTubeExtractor

Display YouTube URLs in a MPMoviePlayerController
Objective-C
191
star
11

PSMenuItem

A block based UIMenuItem subclass.
Objective-C
179
star
12

PSPDFKit-Demo

A drop-in-ready framework that helps in almost every aspect of PDF-rendering on iOS.
Objective-C
178
star
13

UIKitDebugging

A set of files that enables various debug flags in UIKit
Objective-C
178
star
14

PSiOSAppTemplate

iOS Application Template with JSON-Parsing, AutoUpdating, CrashReporter+Sender, Statistics, custom Logging, Localization and all those little things already set up, ready for you to make awesome stuff!
Objective-C
174
star
15

PSAlertView

Modern block-based wrappers for UIAlertView and UIActionSheet.
Objective-C
129
star
16

PSStoreButton

UIButton that is styled like iPhone's AppStore-Button. No Images used!
Objective-C
91
star
17

PSTCenteredScrollView

Shows off different ways to center content in a UIScrollView.
Objective-C
79
star
18

NSLogger-CocoaLumberjack-connector

65
star
19

xcode-theme-solarized-modded

Heavily modded theme based on the Solarized style: http://ethanschoonover.com/solarized/
49
star
20

iOS6-Runtime-Headers

6.0 (GM)
Objective-C
47
star
21

speaking

Upcoming and past speaking engagements for Peter Steinberger (@steipete).
47
star
22

OSLogTest

Test app for OSLog
Swift
45
star
23

PSBackgroundCurtain

Fades the App to black/semi-black when in Background. Fully animated.
44
star
24

PSTFoundationBenchmark

Foundation Collection Classes Benchmarks
Objective-C
37
star
25

SwiftUITouchHandling

Testing touch handling from embedded SwiftUI views
Swift
28
star
26

stackoverflowerizer

always redirect to stackoverflow from pages that just copy the content, like efreedom
JavaScript
15
star
27

steipete.com

Personal Website of Peter Steinberger.
SCSS
13
star
28

dotfiles

my dot files for bash, git, rails and co
Shell
4
star