12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- //
- // YOUPAIMineInfoHeadCell.m
- // MSYOUPAI
- //
- // Created by admin on 2022/3/2.
- // Copyright © 2022 MS. All rights reserved.
- //
- #import "YOUPAIMineInfoHeadCell.h"
- #import "UIView+Category.h"
- @implementation YOUPAIMineInfoHeadCell
- -(UIImageView *)headImageView{
- if (_headImageView == nil){
- _headImageView = [UIImageView new];
- [_headImageView setContentMode:UIViewContentModeScaleAspectFill];
- [_headImageView ms_radius:18];
- }
- return _headImageView;
- }
- -(YOUPAIBubbleLabel *)bubbleLab{
- if (_bubbleLab == nil){
- _bubbleLab = [YOUPAIBubbleLabel new];
- _bubbleLab.text = @"上传本人头像+20钻石";
- }
- return _bubbleLab;
- }
- -(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
- if (self == [super initWithStyle:style reuseIdentifier:reuseIdentifier]){
- [self.contentView addSubview:self.headImageView];
- [self.contentView addSubview:self.bubbleLab];
- [self defualUI];
- [self makeLayout];
- }
- return self;
- }
- -(void)defualUI{
- self.titleLab.text = @"头像";
- }
- -(void)makeLayout{
- [super makeLayout];
- [_headImageView mas_makeConstraints:^(MASConstraintMaker *make) {
- make.right.mas_equalTo(self.rightArrow.mas_left).offset(-8);
- make.centerY.mas_equalTo(self.rightArrow);
- make.size.mas_equalTo(36);
- }];
- [_bubbleLab mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.mas_equalTo(self.titleLab.mas_right).offset(2);
- make.centerY.mas_equalTo(self.titleLab);
- }];
- }
- @end
|