YOUPAILZWithdrawBtn.m 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. //
  2. // YOUPAILZWithdrawBtn.m
  3. // MSYOUPAI
  4. //
  5. // Created by CY on 2022/3/2.
  6. // Copyright © 2022 MS. All rights reserved.
  7. //
  8. #import "YOUPAILZWithdrawBtn.h"
  9. @interface YOUPAILZWithdrawBtn ()
  10. @end
  11. @implementation YOUPAILZWithdrawBtn
  12. - (instancetype)init{
  13. if (self = [super init]) {
  14. [self youpaifinitUI];
  15. }
  16. return self;
  17. }
  18. - (void)setSelected:(BOOL)selected{
  19. if(_selected != selected){
  20. _selected = selected;
  21. if(_selected){
  22. }
  23. }
  24. }
  25. - (void)youpaifinitUI{
  26. self.layer.cornerRadius = 6.0f;
  27. self.clipsToBounds = YES;
  28. self.layer.borderColor = LZF5F4F7Color.CGColor;
  29. self.layer.borderWidth = 1.0f;
  30. UILabel *youpaipMoneyL = [[UILabel alloc] init];
  31. youpaipMoneyL.font = LCFont(12.0f);
  32. youpaipMoneyL.textColor = LZ273145Color;
  33. youpaipMoneyL.textAlignment = NSTextAlignmentCenter;
  34. [self addSubview:youpaipMoneyL];
  35. self.youpaipMoneyL = youpaipMoneyL;
  36. [youpaipMoneyL mas_makeConstraints:^(MASConstraintMaker *make) {
  37. // make.left.top.bottom.right.offset(0);
  38. make.centerX.equalTo(self);
  39. make.bottom.equalTo(self.mas_centerY);
  40. make.height.mas_equalTo(WHScreenEqualWidth(22));
  41. }];
  42. [self addSubview:self.detailLab];
  43. [self.detailLab mas_makeConstraints:^(MASConstraintMaker *make) {
  44. make.centerX.equalTo(self);
  45. make.top.equalTo(self.mas_centerY).offset(5);
  46. make.height.mas_equalTo(WHScreenEqualWidth(17));
  47. }];
  48. UIView *youpaipquickV = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 44.0f, 16.0f)];
  49. youpaipquickV.hidden = YES;
  50. youpaipquickV.backgroundColor = LZFE66A4Color;
  51. [self addSubview:youpaipquickV];
  52. [LCTools clipCorner:UIRectCornerTopRight|UIRectCornerBottomRight View:youpaipquickV size:CGSizeMake(8.0f, 8.0f)];
  53. self.youpaipquickV = youpaipquickV;
  54. [youpaipquickV mas_makeConstraints:^(MASConstraintMaker *make) {
  55. make.left.top.offset(0.0f);
  56. make.size.mas_offset(CGSizeMake(44.0f, 16.0f));
  57. }];
  58. UILabel *youpaipquickL = [[UILabel alloc] init];
  59. youpaipquickL.font = LCFont(10.0f);
  60. youpaipquickL.textColor = [UIColor whiteColor];
  61. youpaipquickL.textAlignment = NSTextAlignmentCenter;
  62. youpaipquickL.text = @"秒到账";
  63. [youpaipquickV addSubview:youpaipquickL];
  64. [youpaipquickL mas_makeConstraints:^(MASConstraintMaker *make) {
  65. make.left.top.bottom.right.offset(0);
  66. }];
  67. UIImageView *youpaipSelectedImgV = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"vqu_images_withdraw_select"]];
  68. youpaipSelectedImgV.hidden = YES;
  69. [self addSubview:youpaipSelectedImgV];
  70. self.youpaipSelectedImgV = youpaipSelectedImgV;
  71. [youpaipSelectedImgV mas_makeConstraints:^(MASConstraintMaker *make) {
  72. make.right.bottom.offset(0.0f);
  73. make.size.mas_offset(CGSizeMake(27.0f, 27.0f));
  74. }];
  75. [self addSubview:self.action];
  76. [self.action mas_makeConstraints:^(MASConstraintMaker *make) {
  77. make.edges.equalTo(self);
  78. }];
  79. }
  80. - (UILabel *)detailLab{
  81. if(!_detailLab){
  82. _detailLab = [[UILabel alloc] init];
  83. [_detailLab setFont:[UIFont systemFontOfSize:WHScreenEqualWidth(12)]];
  84. [_detailLab setTextColor:[UIColor colorWithWhite:0 alpha:0.5f]];
  85. [_detailLab setText:@"10400金币"];
  86. }
  87. return _detailLab;
  88. }
  89. - (UIControl *)action{
  90. if(!_action){
  91. _action = [[UIControl alloc] init];
  92. }
  93. return _action;
  94. }
  95. @end