AlbumCounterLabel.m 811 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. //
  2. // AlbumCounterLabel.m
  3. // LenzCameraNativeModuleForRN
  4. //
  5. // Created by 王昭威 on 2023/1/23.
  6. //
  7. #import "AlbumCounterLabel.h"
  8. @implementation AlbumCounterLabel
  9. - (CGSize)intrinsicContentSize{
  10. return CGSizeMake([super intrinsicContentSize].width + 25, [super intrinsicContentSize].height + 7);
  11. }
  12. - (void)awakeFromNib{
  13. [super awakeFromNib];
  14. }
  15. - (void)layoutSubviews{
  16. [super layoutSubviews];
  17. self.layer.cornerRadius = CGRectGetHeight(self.frame) * 0.5;
  18. self.clipsToBounds = YES;
  19. }
  20. - (void)drawTextInRect:(CGRect)rect{
  21. [super drawTextInRect:CGRectInset(rect, 10, 2.5)];
  22. }
  23. /*
  24. // Only override drawRect: if you perform custom drawing.
  25. // An empty implementation adversely affects performance during animation.
  26. - (void)drawRect:(CGRect)rect {
  27. // Drawing code
  28. }
  29. */
  30. @end