zoukankan      html  css  js  c++  java
  • 1111111

    //

    // + (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;

    }

  • 相关阅读:
    IsIconic() OnPaint里的用途
    中值滤波
    一个小学生题库生成器
    音视频同步
    [转]字符编码笔记:ASCII,Unicode和UTF8
    项目中常见bug及解决方法
    TSQL基础chp10可编程对象学习笔记[上]
    使用UdpAppender时出现了“使用了与请求协议不兼容的地址”的解决办法
    .net gridview 任意单击某行跳转到新的页面,并且新页面的参数来自于与gridview中的不可见字段
    数组去重的四种方法
  • 原文地址:https://www.cnblogs.com/gzz2016/p/6070328.html
Copyright © 2011-2022 走看看