Commit 808ed382 authored by Steven杜宇's avatar Steven杜宇

// 匹配动画优化

parent 25d01332
......@@ -35,6 +35,8 @@ class YHMatchUserViewController: YHBaseViewController {
return btn
}()
var isBottomBtnEnabled = true
lazy var headLottieView: LottieAnimationView = {
let view = LottieAnimationView(name: "people_head")
view.loopMode = .loop
......@@ -226,6 +228,12 @@ extension YHMatchUserViewController: JXSegmentedListContainerViewListDelegate {
extension YHMatchUserViewController: YHMatchProtocol {
func startMatchUsers() {
if !self.isBottomBtnEnabled {
return
}
self.isBottomBtnEnabled = false
self.headLottieView.isHidden = true
self.launchLottieView.isHidden = false
self.launchLottieView.loopMode = .playOnce
......@@ -236,7 +244,9 @@ extension YHMatchUserViewController: YHMatchProtocol {
self.rotateLottieView.isHidden = false
self.rotateLottieView.loopMode = .loop
self.rotateLottieView.play()
self.requestMatchUserList()
DispatchQueue.global().asyncAfter(deadline: .now()+2.0, execute: {
self.requestMatchUserList()
})
}
}
}
......@@ -245,7 +255,7 @@ extension YHMatchUserViewController {
func requestMatchUserList() {
self.viewModel.getMatchUserlist {
success, error in
self.isBottomBtnEnabled = true
if success, self.viewModel.matchUserArr.count > 0 {
let vc = YHMatchResultListViewController()
vc.delegate = self
......
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