GromoreDemoAdCallbackCell.m 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. //
  2. // GromoreDemoAdCallbackCell.m
  3. // Ads-Mediation-CN-demo
  4. //
  5. // Created by heyinyin on 2022/2/8.
  6. //
  7. #import "GromoreDemoAdCallbackCell.h"
  8. @interface GromoreDemoAdCallbackCell ()
  9. @property (nonatomic, strong) UILabel *callbackLable;
  10. @end
  11. @implementation GromoreDemoAdCallbackCell
  12. - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
  13. if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
  14. [self initView];
  15. self.selectionStyle = UITableViewCellSelectionStyleNone;
  16. }
  17. return self;
  18. }
  19. - (void)initView {
  20. _callbackLable = [[UILabel alloc] init];
  21. _callbackLable.textColor = RQ_MAIN_COLOR;
  22. _callbackLable.font = RQRegularFont(12);
  23. [self.contentView addSubview:_callbackLable];
  24. }
  25. - (void)setCallbackRecord:(NSString *)record {
  26. _callbackLable.text = record;
  27. }
  28. - (void)layoutSubviews {
  29. [super layoutSubviews];
  30. CGRect frame = self.contentView.bounds;
  31. frame.origin = CGPointMake(15, 10);
  32. frame.size = CGSizeMake(frame.size.width - 15 * 2, frame.size.height - 10 * 2);
  33. _callbackLable.frame = frame;
  34. }
  35. @end