RQADCell.m 925 B

1234567891011121314151617181920212223242526272829303132
  1. //
  2. // RQADCell.m
  3. // jiaPei
  4. //
  5. // Created by 张嵘 on 2022/11/28.
  6. // Copyright © 2022 JCZ. All rights reserved.
  7. // 9065222084687421
  8. #import "RQADCell.h"
  9. @interface RQADCell ()
  10. @property (weak, nonatomic) IBOutlet UIView *adView;
  11. @property (nonatomic, readwrite, strong) NSArray *expressAdViews;
  12. @end
  13. @implementation RQADCell
  14. #pragma mark - PublicMethods
  15. + (instancetype)cellWithCollectionView:(UICollectionView *)collectionView forIndexPath:(NSIndexPath *)indexPath {
  16. static NSString *ID = @"RQADCell";
  17. [collectionView registerNib:[UINib nibWithNibName:ID bundle:nil] forCellWithReuseIdentifier:ID];
  18. RQADCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:ID forIndexPath:indexPath];
  19. if (!cell) cell = [self rq_viewFromXib];
  20. return cell;
  21. }
  22. - (void)awakeFromNib {
  23. [super awakeFromNib];
  24. [RQ_AD_MODULE loadAdWithAdType:GromoreAdTypeNative customView:self.adView];
  25. }
  26. @end