1234567891011121314151617181920212223242526272829303132 |
- //
- // RQADCell.m
- // jiaPei
- //
- // Created by 张嵘 on 2022/11/28.
- // Copyright © 2022 JCZ. All rights reserved.
- //
- #import "RQADCell.h"
- @interface RQADCell ()
- @property (weak, nonatomic) IBOutlet UIView *adView;
- @end
- @implementation RQADCell
- #pragma mark - PublicMethods
- + (instancetype)cellWithCollectionView:(UICollectionView *)collectionView forIndexPath:(NSIndexPath *)indexPath {
- static NSString *ID = @"RQADCell";
- [collectionView registerNib:[UINib nibWithNibName:ID bundle:nil] forCellWithReuseIdentifier:ID];
- RQADCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:ID forIndexPath:indexPath];
- if (!cell) cell = [self rq_viewFromXib];
- return cell;
- }
- - (void)awakeFromNib {
- [super awakeFromNib];
- self.adView.frame = CGRectMake(16.f, 0, RQ_SCREEN_WIDTH - 32.f, (RQ_SCREEN_WIDTH - 32.f) / (600 / 150.f));
- [RQ_AD_MANAGER loadAdWithAdType:RQADType_Banner_IN customView:self.adView controller:RQControllerHelper.currentViewController cycleSecound:RQ_COMMON_MANAGER.JSJP_APP_AD_CYCLE];
- }
- @end
|