Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Horizontal Layout & Storyboard Support #8

Merged
merged 4 commits into from
Feb 13, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion README.md
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
UICollectionView-Spring-Demo
============================

A demonstration of UICollectionView and UIKit Dynamics. Uses tiling in order to maintain high-performance even with ten thousand cells.

## Demo
![Animation](http://f.cl.ly/items/161u2F0U383G0f0c3h3j/animation.gif)

## Usage
To use this in your project, just add the `TLSpringFlowLayout` classes. Then create a UICollectionView (either with code or in a Storyboard). Set the UICollectionView's Flow Layout object to `TLSpringFlowLayout`.

## Extra Goodies
If you setup your collection with code, you can set the `scrollResistanceFactor` property. This property increases the *bounciness* of the collection items as they scroll.

You can also retrieve the `dynamicAnimator` property (read-only) if necessary.

## License
MIT License. Copyright (c) 2013 Teehan+Lax. See the LICENSE file for more information.

Created by Teehan+Lax. Updated by Sam Spencer on February 8, 2014.
8 changes: 8 additions & 0 deletions UICollectionView-Spring-Demo.xcodeproj/project.pbxproj
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
5E141AD717A9AC32007C6139 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5E141AD617A9AC32007C6139 /* Images.xcassets */; };
5E141AFA17A9AC9C007C6139 /* TLViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E141AF917A9AC9C007C6139 /* TLViewController.m */; };
5E141AFD17A9ACD2007C6139 /* TLSpringFlowLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E141AFC17A9ACD2007C6139 /* TLSpringFlowLayout.m */; };
9938B77D18A6D93500E5BC73 /* Storyboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9938B77C18A6D93500E5BC73 /* Storyboard.storyboard */; };
9944AA2818AB11FE00BAFCFC /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9944AA2718AB11FE00BAFCFC /* QuartzCore.framework */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand All @@ -38,13 +40,16 @@
5E141AF917A9AC9C007C6139 /* TLViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TLViewController.m; sourceTree = "<group>"; };
5E141AFB17A9ACD2007C6139 /* TLSpringFlowLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TLSpringFlowLayout.h; sourceTree = "<group>"; };
5E141AFC17A9ACD2007C6139 /* TLSpringFlowLayout.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TLSpringFlowLayout.m; sourceTree = "<group>"; };
9938B77C18A6D93500E5BC73 /* Storyboard.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Storyboard.storyboard; sourceTree = "<group>"; };
9944AA2718AB11FE00BAFCFC /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
5E141ABE17A9AC32007C6139 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
9944AA2818AB11FE00BAFCFC /* QuartzCore.framework in Frameworks */,
5E141AC717A9AC32007C6139 /* CoreGraphics.framework in Frameworks */,
5E141AC917A9AC32007C6139 /* UIKit.framework in Frameworks */,
5E141AC517A9AC32007C6139 /* Foundation.framework in Frameworks */,
Expand Down Expand Up @@ -75,6 +80,7 @@
5E141AC317A9AC32007C6139 /* Frameworks */ = {
isa = PBXGroup;
children = (
9944AA2718AB11FE00BAFCFC /* QuartzCore.framework */,
5E141AC417A9AC32007C6139 /* Foundation.framework */,
5E141AC617A9AC32007C6139 /* CoreGraphics.framework */,
5E141AC817A9AC32007C6139 /* UIKit.framework */,
Expand All @@ -90,6 +96,7 @@
5E141AD417A9AC32007C6139 /* TLAppDelegate.m */,
5E141AF817A9AC9C007C6139 /* TLViewController.h */,
5E141AF917A9AC9C007C6139 /* TLViewController.m */,
9938B77C18A6D93500E5BC73 /* Storyboard.storyboard */,
5E141AFB17A9ACD2007C6139 /* TLSpringFlowLayout.h */,
5E141AFC17A9ACD2007C6139 /* TLSpringFlowLayout.m */,
5E141AD617A9AC32007C6139 /* Images.xcassets */,
Expand Down Expand Up @@ -181,6 +188,7 @@
files = (
5E141ACF17A9AC32007C6139 /* InfoPlist.strings in Resources */,
5E141AD717A9AC32007C6139 /* Images.xcassets in Resources */,
9938B77D18A6D93500E5BC73 /* Storyboard.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
Empty file.
Empty file.
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 6 additions & 3 deletions UICollectionView-Spring-Demo/Images.xcassets/AppIcon.appiconset/Contents.json
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "29x29",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "2x"
}
],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "[email protected]"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "[email protected]"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading