Commit 10b0adc11193e95168d6cc759da396e288f0c144
1 parent
96c61387
修改礼物Bug
Showing
1 changed file
with
11 additions
and
10 deletions
LiveVideoCloud/Classes/Sections/InteractionSections/Gift/GiftViews/GiftListView.m
| ... | ... | @@ -175,19 +175,20 @@ |
| 175 | 175 | } |
| 176 | 176 | |
| 177 | 177 | if (_curruntSelectIdx != 0 && _isSelectedGift == YES) {//选过 |
| 178 | -// for (UIView *view in self.scrollView.subviews) {//移除上一个bgView | |
| 179 | -// if (view.tag == _curruntSelectIdx) { | |
| 180 | -// for (UIView *bg in view.subviews) { | |
| 181 | -// if (bg.tag == view.tag + 100) { | |
| 182 | -// [bg removeFromSuperview]; | |
| 183 | -// break; | |
| 184 | -// } | |
| 185 | -// } | |
| 186 | -// } | |
| 187 | -// } | |
| 178 | + | |
| 188 | 179 | if (gesture.view.tag != _curruntSelectIdx) {//选的其他礼物 |
| 189 | 180 | //增加当前bgView |
| 190 | 181 | [self giftViewAddBgView:gesture.view]; |
| 182 | + for (UIView *view in self.scrollView.subviews) {//移除上一个bgView | |
| 183 | + if (view.tag == _curruntSelectIdx) { | |
| 184 | + for (UIView *bg in view.subviews) { | |
| 185 | + if (bg.tag == view.tag + 100) { | |
| 186 | + [bg removeFromSuperview]; | |
| 187 | + break; | |
| 188 | + } | |
| 189 | + } | |
| 190 | + } | |
| 191 | + } | |
| 191 | 192 | _isSelectedGift = YES; |
| 192 | 193 | }else{//选的当前礼物 ,根据是否选中做变化 |
| 193 | 194 | if (_isSelectedGift == YES) { | ... | ... |