1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- //
- // FKInviteTableCell.m
- // FirstLink
- //
- // Created by jack on 16/5/28.
- // Copyright © 2016年 FirstLink. All rights reserved.
- //
- #import "FKInviteTableCell.h"
- @implementation FKInviteTableCell
- - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
- if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]){
- [self addAllSubviews];
- self.selectionStyle = UITableViewCellSelectionStyleNone;
- self.backgroundColor = [UIColor clearColor];
- self.backgroundView = nil;
- }
- return self;
- }
- - (void)addAllSubviews{
-
- [self.contentView addSubview:self.imgView];
- [self.contentView addSubview:self.nameLabel];
- [self.contentView addSubview:self.titleLabel];
-
- [self.imgView mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.equalTo(self.contentView).offset(10);
- make.centerY.equalTo(self.contentView);
- make.width.height.mas_equalTo(33);
- }];
-
- [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.equalTo(self.imgView.mas_right).offset(10);
- make.centerY.equalTo(self.imgView);
- }];
- [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
- make.right.equalTo(self.contentView).offset(- 15);
- make.centerY.equalTo(self.imgView);
- }];
- }
- #pragma mark - property
- - (AvatarImageView *)imgView{
- if (_imgView == nil) {
- _imgView = [[AvatarImageView alloc]initWithFrame:CGRectMake(0, 0, 33, 33) boardWidth:0 boardColor:nil];
- }
- return _imgView;
- }
- - (UILabel *)nameLabel{
- if (_nameLabel == nil) {
- _nameLabel = [[UILabel alloc]init];
- _nameLabel.font = [UIFont systemFontOfSize:13];
- _nameLabel.textColor = UIColorFromRGB(0x333333);
- }
- return _nameLabel;
- }
- - (UILabel *)titleLabel{
- if (_titleLabel == nil) {
- _titleLabel = [[UILabel alloc]init];
- _titleLabel.font = [UIFont systemFontOfSize:13];
- _titleLabel.textColor = UIColorFromRGB(0x333333);
- }
- return _titleLabel;
- }
- @end
|