diff --git a/Source/IGListKit/IGListAdapter.m b/Source/IGListKit/IGListAdapter.m index dd4a565e0..fedb02dea 100644 --- a/Source/IGListKit/IGListAdapter.m +++ b/Source/IGListKit/IGListAdapter.m @@ -987,6 +987,10 @@ - (CGSize)containerSize { return self.collectionView.bounds.size; } +- (UITraitCollection *_Nullable)traitCollection { + return self.collectionView.traitCollection; +} + - (UIEdgeInsets)containerInset { return self.collectionView.contentInset; } diff --git a/Source/IGListKit/IGListCollectionContext.h b/Source/IGListKit/IGListCollectionContext.h index af3a69bbf..86569768b 100644 --- a/Source/IGListKit/IGListCollectionContext.h +++ b/Source/IGListKit/IGListCollectionContext.h @@ -26,6 +26,8 @@ NS_ASSUME_NONNULL_BEGIN NS_SWIFT_NAME(ListCollectionContext) @protocol IGListCollectionContext +@property (nonatomic, nullable, readonly) UITraitCollection *traitCollection; + /** The size of the collection view. You can use this for sizing cells. */