Permalink
Browse files

PSCollectionView renamed to PSTCollectionView; updated examples

  • Loading branch information...
1 parent 8758a97 commit d9b66a34708f8053998c16585600aa2140eb8976 @steipete committed Sep 19, 2012
Showing with 812 additions and 821 deletions.
  1. +1 −1 Examples/Basic/AppDelegate.h
  2. +1 −1 Examples/Basic/AppDelegate.m
  3. +1 −1 Examples/Basic/Cell.h
  4. +1 −1 Examples/Basic/PSCollectionViewExample-Prefix.pch
  5. +72 −72 Examples/Basic/PSCollectionViewExample.xcodeproj/project.pbxproj
  6. +1 −1 Examples/Basic/ViewController.h
  7. +6 −6 Examples/Basic/ViewController.m
  8. +72 −72 Examples/CircleLayout/CircleLayout.xcodeproj/project.pbxproj
  9. +2 −3 Examples/CircleLayout/CircleLayout/Cell.h
  10. +3 −2 Examples/CircleLayout/CircleLayout/CircleLayout-Prefix.pch
  11. +1 −2 Examples/CircleLayout/CircleLayout/CircleLayout.h
  12. +2 −2 Examples/CircleLayout/CircleLayout/CircleLayout.m
  13. +2 −2 Examples/CircleLayout/CircleLayout/ViewController.h
  14. +1 −1 Examples/CircleLayout/CircleLayout/ViewController.m
  15. +72 −72 Examples/LineLayout/LineLayout.xcodeproj/project.pbxproj
  16. +1 −1 Examples/LineLayout/LineLayout/AppDelegate.m
  17. +2 −3 Examples/LineLayout/LineLayout/Cell.h
  18. +3 −2 Examples/LineLayout/LineLayout/LineLayout-Prefix.pch
  19. +1 −2 Examples/LineLayout/LineLayout/LineLayout.h
  20. +1 −3 Examples/LineLayout/LineLayout/ViewController.h
  21. +72 −72 Examples/PinchIt/PinchIt.xcodeproj/project.pbxproj
  22. +1 −3 Examples/PinchIt/PinchIt/Cell.h
  23. +1 −0 Examples/PinchIt/PinchIt/PinchIt-Prefix.pch
  24. +1 −2 Examples/PinchIt/PinchIt/PinchLayout.h
  25. +2 −2 Examples/PinchIt/PinchIt/PinchLayout.m
  26. +2 −2 Examples/PinchIt/PinchIt/ViewController.h
  27. +1 −1 Examples/PinchIt/PinchIt/ViewController.m
  28. +0 −21 PSCollectionView/PSCollectionViewController.h
  29. +5 −5 PSCollectionView.podspec → PSTCollectionView.podspec
  30. +55 −55 PSCollectionView/PSCollectionView.h → PSTCollectionView/PSTCollectionView.h
  31. +84 −84 PSCollectionView/PSCollectionView.m → PSTCollectionView/PSTCollectionView.m
  32. +11 −11 PSCollectionView/PSCollectionViewCell.h → PSTCollectionView/PSTCollectionViewCell.h
  33. +13 −13 PSCollectionView/PSCollectionViewCell.m → PSTCollectionView/PSTCollectionViewCell.m
  34. +4 −4 PSCollectionView/PSCollectionViewCommon.h → PSTCollectionView/PSTCollectionViewCommon.h
  35. +21 −0 PSTCollectionView/PSTCollectionViewController.h
  36. +11 −11 PSCollectionView/PSCollectionViewController.m → PSTCollectionView/PSTCollectionViewController.m
  37. +10 −10 PSCollectionView/PSCollectionViewData.h → PSTCollectionView/PSTCollectionViewData.h
  38. +9 −9 PSCollectionView/PSCollectionViewData.m → PSTCollectionView/PSTCollectionViewData.m
  39. +29 −29 PSCollectionView/PSCollectionViewFlowLayout.h → PSTCollectionView/PSTCollectionViewFlowLayout.h
  40. +35 −35 PSCollectionView/PSCollectionViewFlowLayout.m → PSTCollectionView/PSTCollectionViewFlowLayout.m
  41. +8 −8 PSCollectionView/PSCollectionViewItemKey.h → PSTCollectionView/PSTCollectionViewItemKey.h
  42. +19 −19 PSCollectionView/PSCollectionViewItemKey.m → PSTCollectionView/PSTCollectionViewItemKey.m
  43. +38 −38 PSCollectionView/PSCollectionViewLayout.h → PSTCollectionView/PSTCollectionViewLayout.h
  44. +35 −35 PSCollectionView/PSCollectionViewLayout.m → PSTCollectionView/PSTCollectionViewLayout.m
  45. +8 −8 PSCollectionView/PSGridLayoutInfo.h → PSTCollectionView/PSTGridLayoutInfo.h
  46. +12 −12 PSCollectionView/PSGridLayoutInfo.m → PSTCollectionView/PSTGridLayoutInfo.m
  47. +5 −5 PSCollectionView/PSGridLayoutItem.h → PSTCollectionView/PSTGridLayoutItem.h
  48. +3 −3 PSCollectionView/PSGridLayoutItem.m → PSTCollectionView/PSTGridLayoutItem.m
  49. +8 −8 PSCollectionView/PSGridLayoutRow.h → PSTCollectionView/PSTGridLayoutRow.h
  50. +15 −15 PSCollectionView/PSGridLayoutRow.m → PSTCollectionView/PSTGridLayoutRow.m
  51. +8 −8 PSCollectionView/PSGridLayoutSection.h → PSTCollectionView/PSTGridLayoutSection.h
  52. +16 −16 PSCollectionView/PSGridLayoutSection.m → PSTCollectionView/PSTGridLayoutSection.m
  53. +24 −27 README.md
@@ -6,7 +6,7 @@
//
#import <UIKit/UIKit.h>
-#import "PSCollectionView.h"
+#import "PSTCollectionView.h"
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@@ -7,7 +7,7 @@
#import "AppDelegate.h"
#import "ViewController.h"
-#import "PSCollectionViewFlowLayout.h"
+#import "PSTCollectionViewFlowLayout.h"
@interface AppDelegate ()
@property (strong, nonatomic) ViewController *viewController;
@@ -6,7 +6,7 @@
//
#import <UIKit/UIKit.h>
-#import "PSCollectionViewCell.h"
+#import "PSTCollectionViewCell.h"
@interface Cell : UICollectionViewCell
@@ -7,5 +7,5 @@
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
- #import "PSCollectionView.h"
+ #import "PSTCollectionView.h"
#endif
Oops, something went wrong.
@@ -6,7 +6,7 @@
//
#import <UIKit/UIKit.h>
-#import "PSCollectionViewController.h"
+#import "PSTCollectionViewController.h"
@interface ViewController : UICollectionViewController
@@ -17,32 +17,32 @@ - (void)viewDidLoad {
}
///////////////////////////////////////////////////////////////////////////////////////////
-#pragma mark - PSCollectionViewDataSource
+#pragma mark - PSTCollectionViewDataSource
- (NSInteger)collectionView:(UICollectionView *)view numberOfItemsInSection:(NSInteger)section {
return 63;
}
///////////////////////////////////////////////////////////////////////////////////////////
-#pragma mark - PSCollectionViewDelegate
+#pragma mark - PSTCollectionViewDelegate
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
Cell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"MY_CELL" forIndexPath:indexPath];
return cell;
}
///////////////////////////////////////////////////////////////////////////////////////////
-#pragma mark - PSCollectionViewDelegateFlowLayout
+#pragma mark - PSTCollectionViewDelegateFlowLayout
-- (CGSize)collectionView:(PSCollectionView *)collectionView layout:(PSCollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
+- (CGSize)collectionView:(PSTCollectionView *)collectionView layout:(PSTCollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
return CGSizeMake(200, 200);
}
-- (CGFloat)collectionView:(PSCollectionView *)collectionView layout:(PSCollectionViewLayout*)collectionViewLayout minimumInteritemSpacingForSectionAtIndex:(NSInteger)section {
+- (CGFloat)collectionView:(PSTCollectionView *)collectionView layout:(PSTCollectionViewLayout*)collectionViewLayout minimumInteritemSpacingForSectionAtIndex:(NSInteger)section {
return 10;
}
-- (CGFloat)collectionView:(PSCollectionView *)collectionView layout:(PSCollectionViewLayout*)collectionViewLayout minimumLineSpacingForSectionAtIndex:(NSInteger)section {
+- (CGFloat)collectionView:(PSTCollectionView *)collectionView layout:(PSTCollectionViewLayout*)collectionViewLayout minimumLineSpacingForSectionAtIndex:(NSInteger)section {
return 50;
}
Oops, something went wrong.
@@ -93,9 +93,8 @@
*/
#import <UIKit/UIKit.h>
-#import "PSCollectionView.h"
-#import "PSCollectionViewCell.h"
-@interface Cell : UICollectionViewCell
+
+@interface Cell : PSTCollectionViewCell
@property (strong, nonatomic) UILabel* label;
@@ -4,11 +4,12 @@
#import <Availability.h>
-#ifndef __IPHONE_4_0
-#warning "This project uses features only available in iOS SDK 4.0 and later."
+#ifndef __IPHONE_4_3
+#warning "This project uses features only available in iOS SDK 4.3 and later."
#endif
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
+ #import "PSTCollectionView.h"
#endif
@@ -93,9 +93,8 @@
*/
#import <UIKit/UIKit.h>
-#import "PSCollectionView.h"
-@interface CircleLayout : UICollectionViewLayout
+@interface CircleLayout : PSTCollectionViewLayout
@property (nonatomic, assign) CGPoint center;
@property (nonatomic, assign) CGFloat radius;
@@ -134,15 +134,15 @@ -(NSArray*)layoutAttributesForElementsInRect:(CGRect)rect
- (UICollectionViewLayoutAttributes *)initialLayoutAttributesForInsertedItemAtIndexPath:(NSIndexPath *)itemIndexPath
{
- UICollectionViewLayoutAttributes* attributes = [self layoutAttributesForItemAtIndexPath:itemIndexPath];
+ UICollectionViewLayoutAttributes* attributes = (UICollectionViewLayoutAttributes *)[self layoutAttributesForItemAtIndexPath:itemIndexPath];
attributes.alpha = 0.0;
attributes.center = CGPointMake(_center.x, _center.y);
return attributes;
}
- (UICollectionViewLayoutAttributes *)finalLayoutAttributesForDeletedItemAtIndexPath:(NSIndexPath *)itemIndexPath
{
- UICollectionViewLayoutAttributes* attributes = [self layoutAttributesForItemAtIndexPath:itemIndexPath];
+ UICollectionViewLayoutAttributes* attributes = (UICollectionViewLayoutAttributes *)[self layoutAttributesForItemAtIndexPath:itemIndexPath];
attributes.alpha = 0.0;
attributes.center = CGPointMake(_center.x, _center.y);
attributes.transform3D = CATransform3DMakeScale(0.1, 0.1, 1.0);
@@ -93,8 +93,8 @@
*/
#import <UIKit/UIKit.h>
-#import "PSCollectionViewController.h"
-@interface ViewController : UICollectionViewController
+
+@interface ViewController : PSTCollectionViewController
@property (nonatomic, assign) NSInteger cellCount;
@@ -115,7 +115,7 @@ - (NSInteger)collectionView:(UICollectionView *)view numberOfItemsInSection:(NSI
- (UICollectionViewCell *)collectionView:(UICollectionView *)cv cellForItemAtIndexPath:(NSIndexPath *)indexPath;
{
Cell *cell = [cv dequeueReusableCellWithReuseIdentifier:@"MY_CELL" forIndexPath:indexPath];
- return cell;
+ return (UICollectionViewCell *)cell;
}
- (void)handleTapGesture:(UITapGestureRecognizer *)sender {
Oops, something went wrong.

0 comments on commit d9b66a3

Please sign in to comment.