| | |
| | | |
| | | @interface MusicPlayCell() |
| | | { |
| | | |
| | | |
| | | } |
| | | |
| | | @property (nonatomic, strong) GloriaLabel * NumberLabel; |
| | | @property (nonatomic, strong) GloriaLabel * musicNameLabel; |
| | | @property (nonatomic, strong) GloriaLabel * LevelsNameLabel; |
| | | @property (nonatomic, strong) UIButton * personalLikeBtn; |
| | | @property (nonatomic, strong) UIButton * userPlayBtn; |
| | | @end |
| | |
| | | @implementation MusicPlayCell |
| | | |
| | | /* |
| | | // Only override drawRect: if you perform custom drawing. |
| | | // An empty implementation adversely affects performance during animation. |
| | | - (void)drawRect:(CGRect)rect { |
| | | // Drawing code |
| | | } |
| | | */ |
| | | // Only override drawRect: if you perform custom drawing. |
| | | // An empty implementation adversely affects performance during animation. |
| | | - (void)drawRect:(CGRect)rect { |
| | | // Drawing code |
| | | } |
| | | */ |
| | | |
| | | - (void)layoutSubviews |
| | | { |
| | |
| | | |
| | | self.NumberLabel.frame = CGRectMake(20, 10, 40, 30); |
| | | |
| | | self.musicNameLabel.frame = CGRectMake(20+40, 10, SCREEN_WIDTH/2, 30); |
| | | |
| | | self.musicNameLabel.frame = CGRectMake(20+40, 25, SCREEN_WIDTH/2, 20); |
| | | self.LevelsNameLabel.frame = CGRectMake(20+40, 5, SCREEN_WIDTH/2, 20); |
| | | |
| | | self.personalLikeBtn.frame = CGRectMake(SCREEN_WIDTH-20-15, 17, 15, 15); |
| | | self.userPlayBtn.frame = CGRectMake(SCREEN_WIDTH-20-15-50-15, 17, 15, 15); |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | - (GloriaLabel *) LevelsNameLabel |
| | | { |
| | | if(!_LevelsNameLabel) |
| | | { |
| | | _LevelsNameLabel = [[GloriaLabel alloc] initWithFrame:CGRectMake(10+50+10+80, 28,150, 14)]; |
| | | _LevelsNameLabel.font = [UIFont systemFontOfSize:16]; |
| | | _LevelsNameLabel.textAlignment = UITextAlignmentLeft; |
| | | _LevelsNameLabel.textColor = kUIColorFromRGB(0x595959); |
| | | [self.contentView addSubview:_LevelsNameLabel]; |
| | | } |
| | | |
| | | return _LevelsNameLabel; |
| | | } |
| | | |
| | | - (GloriaLabel *) NumberLabel |
| | | { |
| | | if(!_NumberLabel) |
| | |
| | | _musicNameLabel = [[GloriaLabel alloc] initWithFrame:CGRectMake(10+50+10+80, 28,150, 14)]; |
| | | _musicNameLabel.font = [UIFont systemFontOfSize:16]; |
| | | _musicNameLabel.textAlignment = UITextAlignmentLeft; |
| | | _musicNameLabel.textColor = kUIColorFromRGB(0x595959); |
| | | _musicNameLabel.textColor = kUIColorFromRGB(0xc4c4c4); |
| | | [self.contentView addSubview:_musicNameLabel]; |
| | | } |
| | | |
| | | return _musicNameLabel; |
| | | } |
| | | |
| | | - (void)setItemView:(HotelAccount*)model |
| | | - (void)setItemView:(MusicModel*)model |
| | | { |
| | | self.model = model; |
| | | |
| | | //icon_musicset |
| | | [self.userPlayBtn setBackgroundImage:[UIImage imageNamed: model.playStatus == 1 ?@"icon_play":@"icon_start" ] forState:UIControlStateNormal]; |
| | | [self.personalLikeBtn setBackgroundImage:[UIImage imageNamed: model.setStatus == 1 ?@"icon_like":@"icon_unlike" ] forState:UIControlStateNormal]; |
| | | [self.personalLikeBtn setBackgroundImage:[UIImage imageNamed: @"icon_voiceset"] forState:UIControlStateNormal]; |
| | | [self.NumberLabel setText:model.xuhaoIndex]; |
| | | [self.musicNameLabel setText:@"天天爱蚌埠麻将"]; |
| | | [self.musicNameLabel setText:model.musicName]; |
| | | [self.LevelsNameLabel setText:model.username]; |
| | | |
| | | } |
| | | |
| | | - (void)setItemView:(MusicModel *) model setName:(NSString*)name |
| | | { |
| | | self.model = model; |
| | | //icon_musicset |
| | | [self.userPlayBtn setBackgroundImage:[UIImage imageNamed: model.playStatus == 1 ?@"icon_play":@"icon_start" ] forState:UIControlStateNormal]; |
| | | [self.personalLikeBtn setBackgroundImage:[UIImage imageNamed: name] forState:UIControlStateNormal]; |
| | | [self.NumberLabel setText:model.xuhaoIndex]; |
| | | [self.musicNameLabel setText:model.musicName]; |
| | | [self.LevelsNameLabel setText:model.username]; |
| | | } |
| | | @end |
| | | |