From 89d748b77b478905732e60f0b4c5807c274b6565 Mon Sep 17 00:00:00 2001
From: 单军华 <WindShan@danjunhuas-MacBook-Pro.local>
Date: Thu, 29 Mar 2018 16:33:57 +0800
Subject: [PATCH] 功能优化。广告UI 设计

---
 pregnancy_guard/BaseProject/Views/Cell/MusicPlayCell.m |   17 +++++++++++------
 1 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/pregnancy_guard/BaseProject/Views/Cell/MusicPlayCell.m b/pregnancy_guard/BaseProject/Views/Cell/MusicPlayCell.m
index c3f4375..942b78c 100644
--- a/pregnancy_guard/BaseProject/Views/Cell/MusicPlayCell.m
+++ b/pregnancy_guard/BaseProject/Views/Cell/MusicPlayCell.m
@@ -8,7 +8,6 @@
 
 #import "MusicPlayCell.h"
 #import "GloriaLabel.h"
-#import "UpdateHotelAccountPage.h"
 
 @interface MusicPlayCell()
 {
@@ -36,7 +35,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 +60,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 +84,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 +121,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