Commit 843fe315 authored by Steven杜宇's avatar Steven杜宇

// 匹配动画

parent 959025f4
......@@ -34,6 +34,7 @@ class YHPeopleViewController: YHBaseViewController {
lazy var headLottieView: LottieAnimationView = {
let view = LottieAnimationView(name: "people_head")
view.loopMode = .loop
return view
}()
......@@ -92,6 +93,7 @@ class YHPeopleViewController: YHBaseViewController {
self.view.addSubview(launchLottieView)
self.view.addSubview(rotateLottieView)
self.view.addSubview(headLottieView)
self.headLottieView.play()
launchLottieView.snp.makeConstraints { make in
make.width.height.equalTo(KScreenWidth)
......@@ -147,23 +149,17 @@ class YHPeopleViewController: YHBaseViewController {
@objc func didMatchBtnClicked() {
if true {
self.headLottieView.loopMode = .playOnce
self.headLottieView.play {
self.headLottieView.isHidden = true
self.launchLottieView.loopMode = .playOnce
self.launchLottieView.play {
[weak self] completed in
guard let self = self else { return }
self.headLottieView.isHidden = true
self.launchLottieView.loopMode = .playOnce
self.launchLottieView.play {
[weak self] completed in
guard let self = self else { return }
self.launchLottieView.isHidden = true
self.rotateLottieView.isHidden = false
self.rotateLottieView.loopMode = .playOnce
self.rotateLottieView.play { completed in
let vc = YHMatchPeopleViewController()
self.navigationController?.pushViewController(vc)
}
self.launchLottieView.isHidden = true
self.rotateLottieView.isHidden = false
self.rotateLottieView.loopMode = .playOnce
self.rotateLottieView.play { completed in
let vc = YHMatchPeopleViewController()
self.navigationController?.pushViewController(vc)
}
}
return
......@@ -172,17 +168,9 @@ class YHPeopleViewController: YHBaseViewController {
let view = YHPeopleSuccessView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: KScreenHeight))
let window = UIApplication.shared.yhKeyWindow()
window?.addSubview(view)
//
// let view = YHNameCardInfoView.createCardView()
// view.show()
// let vc = YHMyGoodFriendsVC()
// self.navigationController?.pushViewController(vc)
}
func resetAnimation() {
self.headLottieView.stop()
self.launchLottieView.stop()
self.rotateLottieView.stop()
self.headLottieView.isHidden = false
......
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