From f99cf1d5cc50407394501853be06cb39f38a092c Mon Sep 17 00:00:00 2001 From: 单军华 <WindShan@danjunhuas-MacBook-Pro.local> Date: Wed, 28 Mar 2018 14:09:19 +0800 Subject: [PATCH] 界面更换与适配调整 --- pregnancy_guard/BaseProject/Views/Cell/MusicPlayCell.m | 16 +++++++++++----- 1 files changed, 11 insertions(+), 5 deletions(-) diff --git a/pregnancy_guard/BaseProject/Views/Cell/MusicPlayCell.m b/pregnancy_guard/BaseProject/Views/Cell/MusicPlayCell.m index c3f4375..46bc282 100644 --- a/pregnancy_guard/BaseProject/Views/Cell/MusicPlayCell.m +++ b/pregnancy_guard/BaseProject/Views/Cell/MusicPlayCell.m @@ -36,7 +36,8 @@ [super layoutSubviews]; self.NumberLabel.frame = CGRectMake(20, 10, 40, 30); - self.musicNameLabel.frame = CGRectMake(20, 40, SCREEN_WIDTH/2, 30); + + self.musicNameLabel.frame = CGRectMake(20+40, 10, SCREEN_WIDTH/2, 30); self.personalLikeBtn.frame = CGRectMake(SCREEN_WIDTH-20-15, 17, 15, 15); self.userPlayBtn.frame = CGRectMake(SCREEN_WIDTH-20-15-50-15, 17, 15, 15); @@ -60,7 +61,8 @@ { if ( _delegate && [_delegate respondsToSelector:@selector(musicPlaySection:)]) { - self.model.cmd = 2; + self.model.playStatus = (self.model.playStatus == 1 ? 2:1); + self.model.cmd = 1; [_delegate musicPlaySection:self.model]; } } @@ -83,7 +85,8 @@ { if ( _delegate && [_delegate respondsToSelector:@selector(musicPlaySection:)]) { - self.model.cmd = 1; + self.model.setStatus = (self.model.setStatus == 1 ? 2:1); + self.model.cmd = 2; [_delegate musicPlaySection:self.model]; } } @@ -119,8 +122,11 @@ - (void)setItemView:(HotelAccount*)model { self.model = model; - [self.NumberLabel setText:model.hotel_id.name]; - [self.musicNameLabel setText:model.username]; + + [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.NumberLabel setText:model.xuhaoIndex]; + [self.musicNameLabel setText:@"���������������������"]; } @end -- Gitblit v1.8.0