titleLabelReusableView.m 800 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. //
  2. // titleLabelReusableView.m
  3. // 双子星云手机
  4. //
  5. // Created by xd h on 2024/5/13.
  6. //
  7. #import "titleLabelReusableView.h"
  8. @implementation titleLabelReusableView
  9. - (id)initWithFrame:(CGRect)frame
  10. {
  11. self = [super initWithFrame:frame];
  12. if (self)
  13. {
  14. [self drawAnyViewWithFrame:frame];
  15. }
  16. return self;
  17. }
  18. - (void)drawAnyViewWithFrame:(CGRect)frame
  19. {
  20. _titlelabel = [[UILabel alloc] init];
  21. _titlelabel.textColor = [UIColor blackColor];
  22. _titlelabel.font = [UIFont boldSystemFontOfSize:14.0];
  23. [self addSubview:_titlelabel];
  24. [_titlelabel mas_makeConstraints:^(MASConstraintMaker *make) {
  25. make.left.mas_equalTo(15);
  26. make.right.mas_equalTo(0);
  27. make.height.mas_equalTo(20);
  28. make.centerY.mas_equalTo(0);
  29. }];
  30. }
  31. @end