Skip to content

Commit

Permalink
Fixed conflicts when pulling in upstream/master
Browse files Browse the repository at this point in the history
  • Loading branch information
Sherlock committed Oct 30, 2016
2 parents 0eacfd7 + 9e8ad96 commit 120244e
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 22 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ You can find [the docs here](https://instagram.github.io/IGListKit). Documentati

## Contributing

Please see the [CONTRIBUTING](CONTRIBUTING.md) file for how to help out. At Instagram we sync the open source version of `IGListKit` almost daily, so we're always testing the latest changes. But that requires all changes be thoroughly tested follow our style guide.
Please see the [CONTRIBUTING](.github/CONTRIBUTING.md) file for how to help out. At Instagram we sync the open source version of `IGListKit` almost daily, so we're always testing the latest changes. But that requires all changes be thoroughly tested follow our style guide.

## License

Expand Down
21 changes: 0 additions & 21 deletions Source/IGListCollectionView.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,11 @@

#import "IGListCollectionView.h"

@interface IGListCollectionView ()

@property (nonatomic, assign, readonly) BOOL requiresManualWillDisplay;
@property (nonatomic, strong) NSSet *ig_visibleIndexPaths;

@end

@implementation IGListCollectionView

- (void)commonInit {
self.backgroundColor = [UIColor whiteColor];
self.alwaysBounceVertical = YES;

// iOS 6 and 7 do not support -collectionView:willDisplayCell:forItemAtIndexPath: so we do it ourselves
_requiresManualWillDisplay = [[[UIDevice currentDevice] systemVersion] floatValue] < 8.0;
}

- (instancetype)initWithFrame:(CGRect)frame collectionViewLayout:(UICollectionViewLayout *)layout {
Expand All @@ -49,17 +39,6 @@ - (void)layoutSubviews {
[UIView performWithoutAnimation:^{
[super layoutSubviews];
}];

if (self.requiresManualWillDisplay && [self.delegate respondsToSelector:@selector(collectionView:willDisplayCell:forItemAtIndexPath:)]) {
NSArray *indexPaths = [self indexPathsForVisibleItems];
for (NSIndexPath *path in indexPaths) {
if (![self.ig_visibleIndexPaths containsObject:path]) {
UICollectionViewCell *cell = [self cellForItemAtIndexPath:path];
[self.delegate collectionView:self willDisplayCell:cell forItemAtIndexPath:path];
}
}
self.ig_visibleIndexPaths = [NSSet setWithArray:indexPaths];
}
}

@end

0 comments on commit 120244e

Please sign in to comment.