Commit d3666cbd authored by Steven杜宇's avatar Steven杜宇

// 匹配动画

parent 3156bed0
......@@ -32,6 +32,9 @@
0435FA832BA2DEB100024EAE /* YHCardButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0435FA822BA2DEB100024EAE /* YHCardButton.swift */; };
043B0A352C1190C6008A9BBA /* YHSelectFileSheetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 043B0A342C1190C6008A9BBA /* YHSelectFileSheetView.swift */; };
043BA8752C241B38006EF02D /* YHAddFriendCardCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 043BA8742C241B38006EF02D /* YHAddFriendCardCell.swift */; };
043BA8892C244129006EF02D /* people_head.json in Resources */ = {isa = PBXBuildFile; fileRef = 043BA8882C244129006EF02D /* people_head.json */; };
043BA88B2C244146006EF02D /* people_launch.json in Resources */ = {isa = PBXBuildFile; fileRef = 043BA88A2C244146006EF02D /* people_launch.json */; };
043BA88D2C24416A006EF02D /* people_rotate.json in Resources */ = {isa = PBXBuildFile; fileRef = 043BA88C2C24416A006EF02D /* people_rotate.json */; };
043D2C8A2C0EEF3F00172438 /* YHOrderSearchViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 043D2C892C0EEF3F00172438 /* YHOrderSearchViewController.swift */; };
043D2C8C2C0F037B00172438 /* YHServiceOrderSearchViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 043D2C8B2C0F037B00172438 /* YHServiceOrderSearchViewModel.swift */; };
044378A42BFC848C001F95AE /* loginBkg.mov in Resources */ = {isa = PBXBuildFile; fileRef = 044378A32BFC848C001F95AE /* loginBkg.mov */; };
......@@ -572,6 +575,9 @@
0435FA822BA2DEB100024EAE /* YHCardButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCardButton.swift; sourceTree = "<group>"; };
043B0A342C1190C6008A9BBA /* YHSelectFileSheetView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSelectFileSheetView.swift; sourceTree = "<group>"; };
043BA8742C241B38006EF02D /* YHAddFriendCardCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAddFriendCardCell.swift; sourceTree = "<group>"; };
043BA8882C244129006EF02D /* people_head.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = people_head.json; sourceTree = "<group>"; };
043BA88A2C244146006EF02D /* people_launch.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = people_launch.json; sourceTree = "<group>"; };
043BA88C2C24416A006EF02D /* people_rotate.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = people_rotate.json; sourceTree = "<group>"; };
043D2C892C0EEF3F00172438 /* YHOrderSearchViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHOrderSearchViewController.swift; sourceTree = "<group>"; };
043D2C8B2C0F037B00172438 /* YHServiceOrderSearchViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHServiceOrderSearchViewModel.swift; sourceTree = "<group>"; };
044378A32BFC848C001F95AE /* loginBkg.mov */ = {isa = PBXFileReference; lastKnownFileType = video.quicktime; path = loginBkg.mov; sourceTree = "<group>"; };
......@@ -1180,6 +1186,30 @@
path = Model;
sourceTree = "<group>";
};
043BA8762C243477006EF02D /* people_head */ = {
isa = PBXGroup;
children = (
043BA8882C244129006EF02D /* people_head.json */,
);
path = people_head;
sourceTree = "<group>";
};
043BA87C2C2435D4006EF02D /* people_launch */ = {
isa = PBXGroup;
children = (
043BA88A2C244146006EF02D /* people_launch.json */,
);
path = people_launch;
sourceTree = "<group>";
};
043BA8822C24360C006EF02D /* people_rotate */ = {
isa = PBXGroup;
children = (
043BA88C2C24416A006EF02D /* people_rotate.json */,
);
path = people_rotate;
sourceTree = "<group>";
};
0445E6AC2BE9CF53003C52F9 /* VersionUpload(版本更新) */ = {
isa = PBXGroup;
children = (
......@@ -2792,6 +2822,9 @@
A5DF3D4A2BF9A304003D5F03 /* jsons */ = {
isa = PBXGroup;
children = (
043BA8822C24360C006EF02D /* people_rotate */,
043BA87C2C2435D4006EF02D /* people_launch */,
043BA8762C243477006EF02D /* people_head */,
A5EE41FB2C216C78005BBA5D /* radar */,
04EA2E6D2BF74FA200AE80B0 /* shipin.json */,
04EA2E6F2BF74FA200AE80B0 /* zixun.json */,
......@@ -2946,6 +2979,9 @@
A5EE42022C216C78005BBA5D /* img_2.jpg in Resources */,
04EA2E702BF74FA200AE80B0 /* shipin.json in Resources */,
044378A42BFC848C001F95AE /* loginBkg.mov in Resources */,
043BA8892C244129006EF02D /* people_head.json in Resources */,
043BA88B2C244146006EF02D /* people_launch.json in Resources */,
043BA88D2C24416A006EF02D /* people_rotate.json in Resources */,
047619ED2BA9B9C900F45358 /* area.plist in Resources */,
A5EE42002C216C78005BBA5D /* img_1.png in Resources */,
048FA0342BFDDFF400AD3BA9 /* submit_page_scroll.gif in Resources */,
......
......@@ -8,6 +8,7 @@
import UIKit
import JXSegmentedView
import Lottie
class YHPeopleViewController: YHBaseViewController {
......@@ -31,6 +32,22 @@ class YHPeopleViewController: YHBaseViewController {
return btn
}()
lazy var headLottieView: LottieAnimationView = {
let view = LottieAnimationView(name: "people_head")
return view
}()
lazy var launchLottieView: LottieAnimationView = {
let view = LottieAnimationView(name: "people_launch")
return view
}()
lazy var rotateLottieView: LottieAnimationView = {
let view = LottieAnimationView(name: "people_rotate")
view.isHidden = true
return view
}()
lazy var bottomLabel:UILabel = {
let label = UILabel()
label.textAlignment = .center
......@@ -43,6 +60,7 @@ class YHPeopleViewController: YHBaseViewController {
lazy var firstImageView: UIImageView = {
let imageView = UIImageView()
imageView.image = UIImage(named: "people_first_bg_image")
imageView.isHidden = true
return imageView
}()
......@@ -53,6 +71,11 @@ class YHPeopleViewController: YHBaseViewController {
createUI()
}
override func viewDidDisappear(_ animated: Bool) {
super.viewDidDisappear(animated)
resetAnimation()
}
func createUI() {
let wingLeftImgV = UIImageView(image: UIImage(named: "people_match_wing_left"))
......@@ -65,6 +88,25 @@ class YHPeopleViewController: YHBaseViewController {
self.view.addSubview(firstImageView)
self.view.addSubview(self.bottomBtn)
self.view.addSubview(self.bottomLabel)
self.view.addSubview(launchLottieView)
self.view.addSubview(rotateLottieView)
self.view.addSubview(headLottieView)
launchLottieView.snp.makeConstraints { make in
make.width.height.equalTo(KScreenWidth)
make.centerX.equalToSuperview()
make.top.equalTo(204-48-k_Height_statusBar())
}
headLottieView.snp.makeConstraints { make in
make.width.height.equalTo(KScreenWidth)
make.center.equalTo(launchLottieView)
}
rotateLottieView.snp.makeConstraints { make in
make.width.height.equalTo(KScreenWidth)
make.center.equalTo(launchLottieView)
}
firstImageView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.height.equalTo(547)
......@@ -103,11 +145,34 @@ class YHPeopleViewController: YHBaseViewController {
}
@objc func didMatchBtnClicked() {
if true {
self.headLottieView.loopMode = .playOnce
self.headLottieView.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)
}
}
}
return
}
let view = YHPeopleSuccessView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: KScreenHeight))
let window = UIApplication.shared.yhKeyWindow()
window?.addSubview(view)
// let vc = YHMatchPeopleViewController()
// self.navigationController?.pushViewController(vc)
//
// let view = YHNameCardInfoView.createCardView()
// view.show()
......@@ -115,6 +180,15 @@ class YHPeopleViewController: YHBaseViewController {
// let vc = YHMyGoodFriendsVC()
// self.navigationController?.pushViewController(vc)
}
func resetAnimation() {
self.headLottieView.stop()
self.launchLottieView.stop()
self.rotateLottieView.stop()
self.headLottieView.isHidden = false
self.launchLottieView.isHidden = false
self.rotateLottieView.isHidden = true
}
}
extension YHPeopleViewController: JXSegmentedListContainerViewListDelegate {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
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