// // 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