dkahgld

XHCollectionReusableView.m 666B

1234567891011121314151617181920212223
  1. //
  2. // XHCollectionReusableView.m
  3. // YouHuiProject
  4. //
  5. // Created by 小花 on 2018/8/28.
  6. // Copyright © 2018年 kuxuan. All rights reserved.
  7. //
  8. #import "XHCollectionReusableView.h"
  9. #import "XHCollectionViewLayoutAttributes.h"
  10. @implementation XHCollectionReusableView
  11. - (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes {
  12. [super applyLayoutAttributes:layoutAttributes];
  13. if ([layoutAttributes isKindOfClass:[XHCollectionViewLayoutAttributes class]]) {
  14. XHCollectionViewLayoutAttributes *attr = (XHCollectionViewLayoutAttributes *)layoutAttributes;
  15. self.backgroundColor = attr.backgroundColor;
  16. }
  17. }
  18. @end