Commit f471abf5 authored by pete谢兆麟's avatar pete谢兆麟

点赞动画优化

parent d707ad35
...@@ -217,7 +217,7 @@ extension YHHomeCollectionViewCell { ...@@ -217,7 +217,7 @@ extension YHHomeCollectionViewCell {
animationView.loopMode = .playOnce animationView.loopMode = .playOnce
animationView.play {[weak self] completed in animationView.play {[weak self] completed in
guard let self = self else { return } guard let self = self else { return }
self.animationView.isHidden = true // self.animationView.isHidden = true
} }
viewModel.getLike(listModel.id, 1) {[weak self] success, error in viewModel.getLike(listModel.id, 1) {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
......
...@@ -53,7 +53,11 @@ class YHHomeWebBottomView: UIView { ...@@ -53,7 +53,11 @@ class YHHomeWebBottomView: UIView {
} }
} }
if animationView.isHidden {
likeButton.setContent(image, "\(likeCount)") likeButton.setContent(image, "\(likeCount)")
} else {
likeButton.setContent(UIImage(named: ""), "\(likeCount)")
}
} }
}//是否点赞 }//是否点赞
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment