YOUPAILZLiveMemberButton.m 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. //
  2. // YOUPAILZLiveMemberButton.m
  3. // VQU
  4. //
  5. // Created by CY on 2021/7/23.
  6. // Copyright © 2021 leo. All rights reserved.
  7. //
  8. #import "YOUPAILZLiveMemberButton.h"
  9. @implementation YOUPAILZLiveMemberButton
  10. - (instancetype)init{
  11. if (self = [super init]) {
  12. [self youpaifinitUI];
  13. }
  14. return self;
  15. }
  16. - (void)youpaifinitUI{
  17. UIImageView *imgV = [[UIImageView alloc] init];
  18. imgV.layer.cornerRadius = 14.5f;
  19. imgV.clipsToBounds = YES;
  20. imgV.contentMode = UIViewContentModeScaleAspectFill;
  21. [self addSubview:imgV];
  22. self.imgV = imgV;
  23. [imgV mas_makeConstraints:^(MASConstraintMaker *make) {
  24. make.top.offset(0.0f);
  25. make.centerY.equalTo(self);
  26. make.size.mas_offset(CGSizeMake(29.0f, 29.0f));
  27. }];
  28. UIButton *youpaipcountBtn = [UIButton buttonWithType:UIButtonTypeCustom];
  29. youpaipcountBtn.titleLabel.font = LCFont(7.0f);
  30. youpaipcountBtn.userInteractionEnabled = NO;
  31. [self addSubview:youpaipcountBtn];
  32. self.youpaipcountBtn = youpaipcountBtn;
  33. [youpaipcountBtn mas_makeConstraints:^(MASConstraintMaker *make) {
  34. make.bottom.offset(0.0f);
  35. make.centerX.equalTo(self);
  36. make.size.mas_offset(CGSizeMake(28.0f, 12.0f));
  37. }];
  38. }
  39. @end