单军华
2018-03-29 89d748b77b478905732e60f0b4c5807c274b6565
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//
//  HotelCell.m
//  istanbul
//
//  Created by WindShan on 2017/6/16.
//  Copyright © 2017年 WindShan. All rights reserved.
//
 
#import "RoomCell.h"
#import "GloriaLabel.h"
 
@interface RoomCell()
{
    
}
@property (nonatomic, strong)     GloriaLabel * roomName;
 
@end
 
@implementation RoomCell
 
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
 
- (void)layoutSubviews
{
    [super layoutSubviews];
    
    self.roomName.frame = CGRectMake(20, 15, SCREEN_WIDTH-40, 30);
 
}
 
 
- (GloriaLabel *) roomName
{
    if(!_roomName)
    {
        _roomName = [[GloriaLabel alloc] initWithFrame:CGRectMake(10+50+10+80, 28,150, 14)];
        _roomName.font = [UIFont systemFontOfSize:16];
        _roomName.textAlignment = UITextAlignmentLeft;
        _roomName.textColor = kUIColorFromRGB(0x5a5a5a);
        [self.contentView addSubview:_roomName];
    }
    
    return _roomName;
}
 
- (void)setItemView:(NSString*)hotelName
{
    //self.contentView.backgroundColor = [UIColor blueColor];
    [self.roomName setText:hotelName];
}
 
@end