Skip to content

Commit

Permalink
Fix for issue #294 - Support for UIAppearance in IGListCollectionView…
Browse files Browse the repository at this point in the history
Summary:
Updated IGListCollectionView:initWithFrame:collectionViewLayout constructor to support UIAppearance for the backgroundColor property.

Fixes #294

- [x] All tests pass. Demo project builds and runs.
- [x] I added tests, an experiment, or detailed why my change isn't tested.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes #298

Differential Revision: D4292394

Pulled By: rnystrom

fbshipit-source-id: a7c4f0e516728b684993f2651eadcc25001de783
  • Loading branch information
jeffbailey authored and Facebook Github Bot committed Dec 7, 2016
1 parent 4c4fdec commit 8091663
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Source/IGListCollectionView.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ @implementation IGListCollectionView

- (instancetype)initWithFrame:(CGRect)frame collectionViewLayout:(UICollectionViewLayout *)layout {
if (self = [super initWithFrame:frame collectionViewLayout:layout]) {
self.backgroundColor = [UIColor whiteColor];

UIColor *backgroundAppearanceColor = (UIColor *) [[[self class] appearance] backgroundColor];
if (!backgroundAppearanceColor) {
self.backgroundColor = [UIColor whiteColor];
}

self.alwaysBounceVertical = YES;
}
return self;
Expand Down

0 comments on commit 8091663

Please sign in to comment.