首页 > 代码库 > 1111111

1111111

<style>p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #1d9421 } p.p2 { margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; min-height: 21.0px } p.p3 { margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo } p.p4 { margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #3d1d81 } p.p5 { margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #c32275 } p.p6 { margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px "PingFang SC"; color: #22961c } p.p7 { margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px "PingFang SC"; color: #1d9421 } p.p8 { margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #703daa } p.p9 { margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo; color: #539aa4 } span.s1 { } span.s2 { font: 18.0px "PingFang SC" } span.s3 { color: #c32275 } span.s4 { color: #000000 } span.s5 { color: #703daa } span.s6 { color: #6122ae } span.s7 { color: #3d1d81 } span.s8 { font: 18.0px Menlo } span.s9 { color: #78492a } span.s10 { color: #0435ff } span.s11 { color: #539aa4 }</style>

//

// + (instancetype)cellWithTableView:(UITableView *)tableView

//{

//    static NSString *identifier = @"status";

//        // 1.缓存中取

//    WaitFollowCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier];

//    // 2.创建

//        if (cell == nil) {

//                 cell = [[WaitFollowCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];

//            }

//        return cell;

//     }

 

- (void)awakeFromNib {

    [super awakeFromNib];

    // Initialization code

  

}

 

 

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{

    self=[super initWithStyle:style reuseIdentifier:reuseIdentifier];

    if (self) {

        

//            self.nameLabel=[[UILabel alloc]initWithFrame:CGRectMake(10,15,80,24)];

//            self.nameLabel.textAlignment=NSTextAlignmentLeft;

//            self.nameLabel.font=[UIFont systemFontOfSize:18];

//            [self.contentView addSubview:self.nameLabel];

//            

//            _headImageview = [[UIImageView alloc]initWithFrame:CGRectMake(14, 7, 54, 54)];

//            _headImageview.backgroundColor = [UIColor redColor];

//            _headImageview.layer.masksToBounds = YES;

//            _headImageview.layer.cornerRadius = 27;

//            [self.contentView addSubview:_headImageview];

//        

//            _nameLabel = [[UILabel alloc]initWithFrame:CGRectMake(CGRectGetMaxX(_headImageview.frame)+10, 26, SCREEN_WIDTH-165, 20)];

//            _nameLabel.backgroundColor = [UIColor purpleColor];

//            _nameLabel.font = [UIFont systemFontOfSize:16.0];

//            [self.contentView addSubview:_nameLabel];

//        

//            _revokeLabel = [[UILabel alloc]initWithFrame:CGRectMake(SCREEN_WIDTH-84, 12, 70, 20)];

//            _revokeLabel.centerY = _nameLabel.centerY;

//            _revokeLabel.backgroundColor = [UIColor lightGrayColor];

//            _revokeLabel.font = [UIFont systemFontOfSize:14.0];

//            [self.contentView addSubview:_revokeLabel];

        

            

        

    }

    

    return self;

}

 

 

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {

    [super setSelected:selected animated:animated];

    //???2016

//    self.backgroundColor = [UIColor yellowColor];

//    _headImageview = [[UIImageView alloc]initWithFrame:CGRectMake(14, 7, 54, 54)];

//    _headImageview.backgroundColor = [UIColor redColor];

//    _headImageview.layer.masksToBounds = YES;

//    _headImageview.layer.cornerRadius = 27;

//    [self.contentView addSubview:_headImageview];

//    

//    _nameLabel = [[UILabel alloc]initWithFrame:CGRectMake(CGRectGetMaxX(_headImageview.frame)+10, 26, SCREEN_WIDTH-165, 20)];

//    _nameLabel.backgroundColor = [UIColor purpleColor];

//    _nameLabel.font = [UIFont systemFontOfSize:16.0];

//    [self.contentView addSubview:_nameLabel];

//    

//    _revokeLabel = [[UILabel alloc]initWithFrame:CGRectMake(SCREEN_WIDTH-84, 12, 70, 20)];

//    _revokeLabel.centerY = _nameLabel.centerY;

//    _revokeLabel.backgroundColor = [UIColor lightGrayColor];

//    _revokeLabel.font = [UIFont systemFontOfSize:14.0];

//    [self.contentView addSubview:_revokeLabel];

    

}

 

 

//- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier

//{

//    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];

//    if (self) {

//        self.backgroundColor = [UIColor yellowColor];

//        _headImageview = [[UIImageView alloc]init];

//        _headImageview.backgroundColor = [UIColor redColor];

//        [self.contentView addSubview:_headImageview];

//        

//        _nameLabel = [[UILabel alloc]init];

//        _nameLabel.backgroundColor = [UIColor purpleColor];

//        [self.contentView addSubview:_nameLabel];

//        

//        _revokeLabel = [[UILabel alloc]init];

//        _revokeLabel.backgroundColor = [UIColor lightGrayColor];

//        [self.contentView addSubview:_revokeLabel];

//        

//    }

//    return self;

//}

//

////当父容器的frame发生改变时,会调用该方法,常常用来设置子控件的fram

//-(void)layoutSubviews{

//    

//    //这里一定要先调用父类的方法,否则你会很痛苦T_T

//    [super layoutSubviews];

//    

//    _headImageview.frame = CGRectMake(14, 7, 54, 54);

//    _headImageview.layer.masksToBounds = YES;

//    _headImageview.layer.cornerRadius = 27;

//    

//    _nameLabel.frame = CGRectMake(CGRectGetMaxX(_headImageview.frame)+10, 26, SCREEN_WIDTH-165, 20);

//    _nameLabel.font = [UIFont systemFontOfSize:16.0];

//    

//    _revokeLabel.frame = CGRectMake(SCREEN_WIDTH-84, 12, 70, 20);

//    _revokeLabel.centerY = _nameLabel.centerY;

//    _revokeLabel.font = [UIFont systemFontOfSize:14.0];

//

//}

 

 

- (id)initWithFrame:(CGRect)frame

{

    self = [super initWithFrame:frame];

    if (self) {

        self.backgroundColor = RGB(239, 239, 239);//[UIColor blueColor];

        _headImageview = [[UIImageView alloc]initWithFrame:CGRectMake(14, 7, 54, 54)];

        _headImageview.backgroundColor = [UIColor redColor];

        _headImageview.layer.masksToBounds = YES;

        _headImageview.layer.cornerRadius = 27;

        [self.contentView addSubview:_headImageview];

        

        _nameLabel = [[UILabel alloc]initWithFrame:CGRectMake(CGRectGetMaxX(_headImageview.frame)+10, 26, SCREEN_WIDTH-165, 20)];

        _nameLabel.backgroundColor = [UIColor purpleColor];

        _nameLabel.font = [UIFont systemFontOfSize:16.0];

        [self.contentView addSubview:_nameLabel];

        

        _revokeLabel = [[UILabel alloc]initWithFrame:CGRectMake(SCREEN_WIDTH-84, 12, 70, 20)];

        _revokeLabel.centerY = _nameLabel.centerY;

        _revokeLabel.backgroundColor = [UIColor lightGrayColor];

        _revokeLabel.font = [UIFont systemFontOfSize:14.0];

        [self.contentView addSubview:_revokeLabel];

    }

    return self;

}

1111111