Skip to content

Commit

Permalink
Fix compile issue on iOS6
Browse files Browse the repository at this point in the history
  • Loading branch information
steipete committed Mar 21, 2013
1 parent 5bfc45f commit 7b25ab1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 3 additions & 0 deletions PSTCollectionView/NSIndexPath+PSTCollectionViewAdditions.h
Expand Up @@ -7,6 +7,7 @@

#import <UIKit/UIKit.h>

#if __IPHONE_OS_VERSION_MIN_REQUIRED < 60000

@interface NSIndexPath (PSTCollectionViewAdditions)

Expand All @@ -15,3 +16,5 @@
- (NSInteger)item;

@end

#endif
7 changes: 3 additions & 4 deletions PSTCollectionView/NSIndexPath+PSTCollectionViewAdditions.m
Expand Up @@ -7,11 +7,10 @@

#import "NSIndexPath+PSTCollectionViewAdditions.h"

#if __IPHONE_OS_VERSION_MIN_REQUIRED < 60000

@implementation NSIndexPath (PSTCollectionViewAdditions)

#if __IPHONE_OS_VERSION_MIN_REQUIRED < 60000

// Simple NSIndexPath addition to allow using "item" instead of "row".
+ (NSIndexPath *)indexPathForItem:(NSInteger)item inSection:(NSInteger)section {
return [NSIndexPath indexPathForRow:item inSection:section];
Expand All @@ -21,6 +20,6 @@ - (NSInteger)item {
return self.row;
}

#endif

@end

#endif

0 comments on commit 7b25ab1

Please sign in to comment.