소스 검색

fix:点击同一个item 标题重影问题

huzhiqiang 3 년 전
부모
커밋
3cfc783dbd
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      BFFramework/Classes/Stuckpoint/Controller/PQStuckPointMusicContentController.swift

+ 3 - 1
BFFramework/Classes/Stuckpoint/Controller/PQStuckPointMusicContentController.swift

@@ -262,7 +262,9 @@ extension PQStuckPointMusicContentController: UICollectionViewDelegate, UICollec
             } else if contentType != .catagery {
                 (itemList[indexPath.item] as? PQVoiceModel)?.isPlaying = !((itemList[indexPath.item] as? PQVoiceModel)?.isPlaying ?? false)
                 (itemList[indexPath.item] as? PQVoiceModel)?.isSelected = true
-                collectionView.reloadItems(at: [indexPath])
+                let cell = collectionView.cellForItem(at: indexPath) as? PQStuckPointMusicContentCell
+                cell?.bgmData = itemList[indexPath.item]
+//                collectionView.reloadItems(at: [indexPath])
             }
         }
         if contentType == .catagery {