RsearchCell.m 1.44 KB
Newer Older
陈俊俊's avatar
陈俊俊 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
//
//  RsearchCell.m
//  XFFruit
//
//  Created by 陈俊俊 on 15/11/17.
//  Copyright © 2015年 Xummer. All rights reserved.
//

#import "RsearchCell.h"
#define LeftMargin 10
@implementation RsearchCell

+ (CGFloat)cellHeight{
    return 50;
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    self =  [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self bulidLayout];
    }
    return self;
}

- (void)bulidLayout
{
    self.titleLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, 0, ScreenSize.width - LeftMargin*2, 44))];
    self.titleLabel.textAlignment= NSTextAlignmentLeft;
    self.titleLabel.textColor = ReportColor;
    self.titleLabel.text = @"2222";
    self.titleLabel.font = GXF_FIFTEENTEN_SIZE;
    
    self.lineLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, 44-1, ScreenSize.width - LeftMargin * 2, 1))];
35
    self.lineLabel.backgroundColor = GXF_LINE_COLOR;
陈俊俊's avatar
陈俊俊 committed
36 37 38 39
    [self.contentView addSubview:self.titleLabel];
    [self.contentView addSubview:self.lineLabel];
}

40
- (void)setvalueWithLowerOrgs:(LowerOrgs *)orgs{
陈俊俊's avatar
陈俊俊 committed
41
    self.titleLabel.text = [NSString stringWithFormat:@"%@【%@】",orgs.name,orgs.code];
42 43
}

陈俊俊's avatar
陈俊俊 committed
44 45 46 47 48 49 50 51 52 53 54
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end