From a537f4d98dc984bc6a317f588d62b806c7f7f87a Mon Sep 17 00:00:00 2001 From: "rookie.w" Date: Sat, 16 Jan 2021 15:09:41 +0900 Subject: [PATCH 1/6] =?UTF-8?q?=F0=9F=92=84=20aboutTeamViewController=20?= =?UTF-8?q?=EC=8A=A4=ED=81=AC=EB=A1=A4=20=EC=B6=94=EA=B0=80,=20=EC=83=89,?= =?UTF-8?q?=20=EC=9C=84=EC=B9=98=20=EB=93=B1=20=EC=A1=B0=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AboutTeam/AboutTeamViewController.swift | 58 +++++++++++-------- 1 file changed, 35 insertions(+), 23 deletions(-) diff --git a/Dear-World/Dear-World/Source/Presentation/Scene/About/AboutTeam/AboutTeamViewController.swift b/Dear-World/Dear-World/Source/Presentation/Scene/About/AboutTeam/AboutTeamViewController.swift index 6a52963..65136ca 100644 --- a/Dear-World/Dear-World/Source/Presentation/Scene/About/AboutTeam/AboutTeamViewController.swift +++ b/Dear-World/Dear-World/Source/Presentation/Scene/About/AboutTeam/AboutTeamViewController.swift @@ -42,26 +42,36 @@ final class AboutTeamViewController: UIViewController, View { } // MARK: πŸŽ› Setup private func setupUI() { - self.view.backgroundColor = .breathingWhite - + + let scrollView: UIScrollView = UIScrollView().then { + $0.backgroundColor = .breathingWhite + } + self.view.addSubview(scrollView) + scrollView.snp.makeConstraints { + $0.top.bottom.leading.trailing.equalToSuperview() + } + scrollView.contentLayoutGuide.snp.makeConstraints { + $0.leading.trailing.equalTo(self.view) + } + let headerView: UIImageView = UIImageView().then { $0.image = UIImage(named: "about_top_img") } - self.view.addSubview(headerView) + scrollView.addSubview(headerView) headerView.snp.makeConstraints { $0.top.leading.trailing.equalToSuperview() $0.height.equalTo(UIScreen.main.bounds.width * 240.0 / 375.0) } - - self.view.addSubview(backButton) + + scrollView.addSubview(backButton) backButton.do { - $0.setBackgroundImage(UIImage(named: "backWhite"), for: .normal) + $0.setBackgroundImage(UIImage(named: "back"), for: .normal) } backButton.snp.makeConstraints { $0.leading.equalToSuperview().inset(20) - $0.top.equalTo(self.view.safeAreaLayoutGuide).inset(37) + $0.top.equalToSuperview().inset(22) } - + let teamGreetingTitleLabel: UILabel = UILabel().then { $0.text = "Hello, we are team OFU!" $0.font = .boldSystemFont(ofSize: 16) @@ -77,8 +87,8 @@ final class AboutTeamViewController: UIViewController, View { $0.textColor = .nightBlue $0.numberOfLines = 0 } - self.view.addSubview(teamGreetingTitleLabel) - self.view.addSubview(teamGreetingLabel) + scrollView.addSubview(teamGreetingTitleLabel) + scrollView.addSubview(teamGreetingLabel) teamGreetingTitleLabel.snp.makeConstraints { $0.leading.trailing.equalToSuperview().inset(20) $0.top.equalTo(headerView.snp.bottom).offset(30) @@ -87,19 +97,19 @@ final class AboutTeamViewController: UIViewController, View { $0.leading.trailing.equalToSuperview().inset(20) $0.top.equalTo(teamGreetingTitleLabel.snp.bottom).offset(10) } - + let crewsTitleLable: UILabel = UILabel().then { $0.text = "OFU CREWS" $0.textColor = .warmBlue $0.font = .boldSystemFont(ofSize: 16) } - self.view.addSubview(crewsTitleLable) + scrollView.addSubview(crewsTitleLable) crewsTitleLable.snp.makeConstraints { $0.top.equalTo(teamGreetingLabel.snp.bottom).offset(50) $0.leading.trailing.equalToSuperview().inset(20) } - - self.view.addSubview(crewsCollectionView) + + scrollView.addSubview(crewsCollectionView) crewsCollectionView.do { $0.register(CrewCollectionViewCell.self, forCellWithReuseIdentifier: "CrewCollectionViewCell") $0.backgroundColor = .breathingWhite @@ -111,20 +121,21 @@ final class AboutTeamViewController: UIViewController, View { $0.leading.trailing.equalToSuperview().inset(20) $0.height.equalTo(440) } - + let footerView: UIView = UIView().then { - $0.backgroundColor = .livelyBlue + $0.backgroundColor = .nightBlue } - self.view.addSubview(footerView) + scrollView.addSubview(footerView) footerView.snp.makeConstraints { $0.leading.trailing.equalToSuperview() - $0.height.equalTo(144) - $0.top.equalTo(crewsCollectionView.snp.bottom).offset(100) +// $0.height.equalTo(144) + $0.top.equalTo(crewsCollectionView.snp.bottom).offset(20) + $0.bottom.equalToSuperview() } - + footerView.addSubview(moreButton) moreButton.do { - $0.backgroundColor = .illuminatingYellow + $0.backgroundColor = .livelyBlue $0.setTitle("More about OFU CREW", for: .normal) $0.titleLabel?.font = .systemFont(ofSize: 14) $0.layer.cornerRadius = 10 @@ -132,10 +143,11 @@ final class AboutTeamViewController: UIViewController, View { } moreButton.snp.makeConstraints { $0.top.equalToSuperview().inset(15) + $0.bottom.equalToSuperview().inset(82) $0.leading.trailing.equalToSuperview().inset(20) - $0.height.equalTo(48) + $0.height.equalTo(47) } - + let copyrightLabel: UILabel = UILabel().then { $0.text = "β“’ OFU 2021. Made in Korea" $0.font = .systemFont(ofSize: 14) From c4bce4f2341a5cb4484e07b5a67a3a12fd25219a Mon Sep 17 00:00:00 2001 From: "rookie.w" Date: Sun, 17 Jan 2021 18:40:24 +0900 Subject: [PATCH 2/6] =?UTF-8?q?=F0=9F=90=9B=20About=20=ED=99=94=EB=A9=B4?= =?UTF-8?q?=20=EB=84=A4=EB=B9=84=EA=B2=8C=EC=9D=B4=EC=85=98=EB=B0=94=20?= =?UTF-8?q?=EC=82=AC=EB=9D=BC=EC=A7=80=EB=8A=94=20=EB=B2=84=EA=B7=B8=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Scene/About/AboutTeam/AboutTeamViewController.swift | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Dear-World/Dear-World/Source/Presentation/Scene/About/AboutTeam/AboutTeamViewController.swift b/Dear-World/Dear-World/Source/Presentation/Scene/About/AboutTeam/AboutTeamViewController.swift index 65136ca..9b43524 100644 --- a/Dear-World/Dear-World/Source/Presentation/Scene/About/AboutTeam/AboutTeamViewController.swift +++ b/Dear-World/Dear-World/Source/Presentation/Scene/About/AboutTeam/AboutTeamViewController.swift @@ -37,18 +37,22 @@ final class AboutTeamViewController: UIViewController, View { override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) - self.navigationController?.navigationBar.isHidden = true } + override func viewWillDisappear(_ animated: Bool) { + super.viewWillDisappear(animated) + self.navigationController?.navigationBar.isHidden = false + } // MARK: πŸŽ› Setup private func setupUI() { let scrollView: UIScrollView = UIScrollView().then { $0.backgroundColor = .breathingWhite + $0.contentInsetAdjustmentBehavior = .never } self.view.addSubview(scrollView) scrollView.snp.makeConstraints { - $0.top.bottom.leading.trailing.equalToSuperview() + $0.top.bottom.leading.trailing.equalTo(self.view) } scrollView.contentLayoutGuide.snp.makeConstraints { $0.leading.trailing.equalTo(self.view) From 5da11fe40e8b3a7795a9e15c60aa62315baa01eb Mon Sep 17 00:00:00 2001 From: "rookie.w" Date: Sun, 17 Jan 2021 18:40:51 +0900 Subject: [PATCH 3/6] =?UTF-8?q?=F0=9F=90=9B=20AboutTeamViewController=20Sa?= =?UTF-8?q?feArea=EB=A5=BC=20=EC=8A=A4=ED=81=AC=EB=A1=A4=EB=B7=B0=EA=B0=80?= =?UTF-8?q?=20=ED=8F=AC=ED=95=A8=ED=95=98=EC=A7=80=20=EC=95=8A=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Scene/About/AboutTeam/AboutTeamViewController.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dear-World/Dear-World/Source/Presentation/Scene/About/AboutTeam/AboutTeamViewController.swift b/Dear-World/Dear-World/Source/Presentation/Scene/About/AboutTeam/AboutTeamViewController.swift index 9b43524..f442f09 100644 --- a/Dear-World/Dear-World/Source/Presentation/Scene/About/AboutTeam/AboutTeamViewController.swift +++ b/Dear-World/Dear-World/Source/Presentation/Scene/About/AboutTeam/AboutTeamViewController.swift @@ -73,7 +73,7 @@ final class AboutTeamViewController: UIViewController, View { } backButton.snp.makeConstraints { $0.leading.equalToSuperview().inset(20) - $0.top.equalToSuperview().inset(22) + $0.top.equalToSuperview().inset(66) } let teamGreetingTitleLabel: UILabel = UILabel().then { @@ -175,7 +175,7 @@ final class AboutTeamViewController: UIViewController, View { reactor.state.distinctUntilChanged(\.$isWillDismiss) .filter { $0.isWillDismiss } .subscribe(onNext: { [weak self] _ in - self?.dismiss(animated: true, completion: nil) + self?.navigationController?.popViewController(animated: true) }) .disposed(by: disposeBag) From 6b4b66eeb0f8146deefb4e34293c3a4abff8c9c8 Mon Sep 17 00:00:00 2001 From: "rookie.w" Date: Sun, 17 Jan 2021 20:11:21 +0900 Subject: [PATCH 4/6] =?UTF-8?q?=F0=9F=94=A8=20=EB=A3=A8=ED=8A=B8=EB=B7=B0?= =?UTF-8?q?=EB=A5=BC=20NavigationController=EB=A1=9C=20=EB=B3=80=EA=B2=BD.?= =?UTF-8?q?=20About=ED=99=94=EB=A9=B4=20NavigationView=EB=A5=BC=20?= =?UTF-8?q?=ED=86=B5=ED=95=B4=20=EC=9E=90=EC=97=B0=EC=8A=A4=EB=9F=BD?= =?UTF-8?q?=EA=B2=8C=20=ED=99=94=EB=A9=B4=EC=A0=84=ED=99=98=ED=95=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Dear-World/Source/Core/AppDelegate.swift | 4 +- .../AboutTeam/AboutTeamViewController.swift | 13 +---- .../Scene/About/AboutViewController.swift | 56 +++++++++++++------ .../CheeringMapViewController.swift | 9 +-- .../Discover/DiscoverViewController.swift | 8 +-- 5 files changed, 49 insertions(+), 41 deletions(-) diff --git a/Dear-World/Dear-World/Source/Core/AppDelegate.swift b/Dear-World/Dear-World/Source/Core/AppDelegate.swift index a730ef0..306f0e3 100644 --- a/Dear-World/Dear-World/Source/Core/AppDelegate.swift +++ b/Dear-World/Dear-World/Source/Core/AppDelegate.swift @@ -30,7 +30,9 @@ final class AppDelegate: UIResponder, UIApplicationDelegate { private func setupInitialScene() { let mainWindow: UIWindow = UIWindow() window = mainWindow - mainWindow.rootViewController = MainTabBarController() + mainWindow.rootViewController = UINavigationController(rootViewController: MainTabBarController()).then { + $0.navigationBar.isHidden = true + } mainWindow.makeKeyAndVisible() } } diff --git a/Dear-World/Dear-World/Source/Presentation/Scene/About/AboutTeam/AboutTeamViewController.swift b/Dear-World/Dear-World/Source/Presentation/Scene/About/AboutTeam/AboutTeamViewController.swift index f442f09..ab0e19d 100644 --- a/Dear-World/Dear-World/Source/Presentation/Scene/About/AboutTeam/AboutTeamViewController.swift +++ b/Dear-World/Dear-World/Source/Presentation/Scene/About/AboutTeam/AboutTeamViewController.swift @@ -34,15 +34,6 @@ final class AboutTeamViewController: UIViewController, View { required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } - - override func viewWillAppear(_ animated: Bool) { - super.viewWillAppear(animated) - self.navigationController?.navigationBar.isHidden = true - } - override func viewWillDisappear(_ animated: Bool) { - super.viewWillDisappear(animated) - self.navigationController?.navigationBar.isHidden = false - } // MARK: πŸŽ› Setup private func setupUI() { @@ -73,7 +64,9 @@ final class AboutTeamViewController: UIViewController, View { } backButton.snp.makeConstraints { $0.leading.equalToSuperview().inset(20) - $0.top.equalToSuperview().inset(66) + $0.width.equalTo(10) + $0.height.equalTo(16) + $0.top.equalToSuperview().inset(UIApplication.shared.windows[0].safeAreaInsets.top + 17) } let teamGreetingTitleLabel: UILabel = UILabel().then { diff --git a/Dear-World/Dear-World/Source/Presentation/Scene/About/AboutViewController.swift b/Dear-World/Dear-World/Source/Presentation/Scene/About/AboutViewController.swift index 86fb663..41602d6 100644 --- a/Dear-World/Dear-World/Source/Presentation/Scene/About/AboutViewController.swift +++ b/Dear-World/Dear-World/Source/Presentation/Scene/About/AboutViewController.swift @@ -21,12 +21,8 @@ final class AboutViewController: UIViewController, View { private let noticeBadge: NoticeBadge = NoticeBadge() private let versionInfoView: UIView = UIView() private let versionLabel: UILabel = UILabel() - private let backButton: UIBarButtonItem = UIBarButtonItem( - image: UIImage(named: "back")!, - style: .plain, - target: nil, - action: nil - ) + private let backButton: UIButton = UIButton() + var disposeBag: DisposeBag = DisposeBag() // MARK: 🏁 Initialize @@ -41,18 +37,41 @@ final class AboutViewController: UIViewController, View { setupUI() } - - override func viewDidAppear(_ animated: Bool) { - super.viewDidAppear(animated) - self.navigationController?.navigationBar.isHidden = false - } - // MARK: πŸŽ› Setup private func setupUI() { - view.backgroundColor = .breathingWhite - backButton.tintColor = .warmBlue - navigationItem.leftBarButtonItem = backButton - navigationItem.title = "About" + view.do { + $0.backgroundColor = .breathingWhite + } + + let navigationView = UIView().then { + $0.backgroundColor = .breathingWhite + } + view.addSubview(navigationView) + navigationView.snp.makeConstraints { + $0.top.leading.trailing.equalTo(view.safeAreaLayoutGuide) + $0.height.equalTo(50) + } + + let naviTitle = UILabel().then { + $0.textColor = .warmBlue + $0.font = .boldSystemFont(ofSize: 18) + $0.text = "More" + } + navigationView.addSubview(naviTitle) + naviTitle.snp.makeConstraints { + $0.center.equalToSuperview() + } + + backButton.do { + $0.setImage(UIImage(named: "back"), for: .normal) + } + navigationView.addSubview(backButton) + backButton.snp.makeConstraints { + $0.leading.equalToSuperview().inset(20) + $0.centerY.equalToSuperview() + $0.width.equalTo(10) + $0.height.equalTo(16) + } view.addSubview(stackView) stackView.do { @@ -64,7 +83,8 @@ final class AboutViewController: UIViewController, View { $0.addArrangedSubview(versionInfoView) } stackView.snp.makeConstraints { - $0.top.leading.trailing.equalTo(self.view.safeAreaLayoutGuide).inset(20) + $0.top.equalTo(navigationView.snp.bottom).offset(10) + $0.leading.trailing.equalTo(self.view.safeAreaLayoutGuide).inset(20) } let crewInfoTitleLabel: UILabel = UILabel().then { @@ -273,7 +293,7 @@ final class AboutViewController: UIViewController, View { .map { $0.willDismiss } .filter { $0 } .subscribe(onNext: { [weak self] _ in - self?.dismiss(animated: true, completion: nil) + self?.navigationController?.popViewController(animated: true) }) .disposed(by: disposeBag) diff --git a/Dear-World/Dear-World/Source/Presentation/Scene/Cheering Map/CheeringMapViewController.swift b/Dear-World/Dear-World/Source/Presentation/Scene/Cheering Map/CheeringMapViewController.swift index bb79dfe..31c763d 100644 --- a/Dear-World/Dear-World/Source/Presentation/Scene/Cheering Map/CheeringMapViewController.swift +++ b/Dear-World/Dear-World/Source/Presentation/Scene/Cheering Map/CheeringMapViewController.swift @@ -77,15 +77,12 @@ final class CheeringMapViewController: UIViewController, ReactorKit.View { reactor.state .distinctUntilChanged(\.$isPresentAboutPage) .map { $0.isPresentAboutPage } - .filter { $0 } + .filter{ $0 } .subscribe(onNext: { [weak self] _ in - let viewController = AboutViewController().then { + let aboutViewController = AboutViewController().then { $0.reactor = AboutReactor() } - let naviController = UINavigationController(rootViewController: viewController).then { - $0.modalPresentationStyle = .fullScreen - } - self?.present(naviController, animated: false, completion: nil) + self?.navigationController?.pushViewController(aboutViewController, animated: true) }) .disposed(by: self.disposeBag) diff --git a/Dear-World/Dear-World/Source/Presentation/Scene/Discover/DiscoverViewController.swift b/Dear-World/Dear-World/Source/Presentation/Scene/Discover/DiscoverViewController.swift index 3fd9223..9823eb5 100644 --- a/Dear-World/Dear-World/Source/Presentation/Scene/Discover/DiscoverViewController.swift +++ b/Dear-World/Dear-World/Source/Presentation/Scene/Discover/DiscoverViewController.swift @@ -31,7 +31,6 @@ final class DiscoverViewController: UIViewController, View { private let messageEmptyView: UIStackView = UIStackView() var disposeBag: DisposeBag = DisposeBag() - override func viewDidLoad() { super.viewDidLoad() @@ -214,13 +213,10 @@ final class DiscoverViewController: UIViewController, View { .map { $0.isPresentAboutPage } .filter { $0 } .subscribe(onNext: { [weak self] _ in - let viewController = AboutViewController().then { + let aboutViewController = AboutViewController().then { $0.reactor = AboutReactor() } - let naviController = UINavigationController(rootViewController: viewController).then { - $0.modalPresentationStyle = .fullScreen - } - self?.present(naviController, animated: false, completion: nil) + self?.navigationController?.pushViewController(aboutViewController, animated: true) }) .disposed(by: self.disposeBag) From be21660c0c4e836040fcaa0d63f7c62e3c913e37 Mon Sep 17 00:00:00 2001 From: "rookie.w" Date: Sun, 17 Jan 2021 19:53:23 +0900 Subject: [PATCH 5/6] =?UTF-8?q?=F0=9F=92=84=20AboutTeamViewController?= =?UTF-8?q?=EC=97=90=20BodyView=20=EC=B6=94=EA=B0=80.=20=EC=8A=A4=ED=81=AC?= =?UTF-8?q?=EB=A1=A4=EB=B7=B0=20=EC=83=81=ED=95=98=EB=8B=A8=20=EC=83=89=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AboutTeam/AboutTeamViewController.swift | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/Dear-World/Dear-World/Source/Presentation/Scene/About/AboutTeam/AboutTeamViewController.swift b/Dear-World/Dear-World/Source/Presentation/Scene/About/AboutTeam/AboutTeamViewController.swift index ab0e19d..b1e7452 100644 --- a/Dear-World/Dear-World/Source/Presentation/Scene/About/AboutTeam/AboutTeamViewController.swift +++ b/Dear-World/Dear-World/Source/Presentation/Scene/About/AboutTeam/AboutTeamViewController.swift @@ -36,9 +36,8 @@ final class AboutTeamViewController: UIViewController, View { } // MARK: πŸŽ› Setup private func setupUI() { - let scrollView: UIScrollView = UIScrollView().then { - $0.backgroundColor = .breathingWhite + $0.backgroundColor = .nightBlue $0.contentInsetAdjustmentBehavior = .never } self.view.addSubview(scrollView) @@ -68,6 +67,14 @@ final class AboutTeamViewController: UIViewController, View { $0.height.equalTo(16) $0.top.equalToSuperview().inset(UIApplication.shared.windows[0].safeAreaInsets.top + 17) } + let bodyView = UIView().then { + $0.backgroundColor = .breathingWhite + } + scrollView.addSubview(bodyView) + bodyView.snp.makeConstraints { + $0.top.equalTo(headerView.snp.bottom) + $0.leading.trailing.equalToSuperview() + } let teamGreetingTitleLabel: UILabel = UILabel().then { $0.text = "Hello, we are team OFU!" @@ -84,11 +91,11 @@ final class AboutTeamViewController: UIViewController, View { $0.textColor = .nightBlue $0.numberOfLines = 0 } - scrollView.addSubview(teamGreetingTitleLabel) - scrollView.addSubview(teamGreetingLabel) + bodyView.addSubview(teamGreetingTitleLabel) + bodyView.addSubview(teamGreetingLabel) teamGreetingTitleLabel.snp.makeConstraints { $0.leading.trailing.equalToSuperview().inset(20) - $0.top.equalTo(headerView.snp.bottom).offset(30) + $0.top.equalToSuperview().inset(30) } teamGreetingLabel.snp.makeConstraints { $0.leading.trailing.equalToSuperview().inset(20) @@ -100,13 +107,13 @@ final class AboutTeamViewController: UIViewController, View { $0.textColor = .warmBlue $0.font = .boldSystemFont(ofSize: 16) } - scrollView.addSubview(crewsTitleLable) + bodyView.addSubview(crewsTitleLable) crewsTitleLable.snp.makeConstraints { $0.top.equalTo(teamGreetingLabel.snp.bottom).offset(50) $0.leading.trailing.equalToSuperview().inset(20) } - scrollView.addSubview(crewsCollectionView) + bodyView.addSubview(crewsCollectionView) crewsCollectionView.do { $0.register(CrewCollectionViewCell.self, forCellWithReuseIdentifier: "CrewCollectionViewCell") $0.backgroundColor = .breathingWhite @@ -117,6 +124,7 @@ final class AboutTeamViewController: UIViewController, View { $0.top.equalTo(crewsTitleLable.snp.bottom).offset(20) $0.leading.trailing.equalToSuperview().inset(20) $0.height.equalTo(440) + $0.bottom.equalToSuperview().inset(20) } let footerView: UIView = UIView().then { @@ -125,8 +133,7 @@ final class AboutTeamViewController: UIViewController, View { scrollView.addSubview(footerView) footerView.snp.makeConstraints { $0.leading.trailing.equalToSuperview() -// $0.height.equalTo(144) - $0.top.equalTo(crewsCollectionView.snp.bottom).offset(20) + $0.top.equalTo(bodyView.snp.bottom) $0.bottom.equalToSuperview() } From 5e79ffdf441480b383e47321868e1a2e4fe3cd88 Mon Sep 17 00:00:00 2001 From: "rookie.w" Date: Sun, 17 Jan 2021 20:41:40 +0900 Subject: [PATCH 6/6] =?UTF-8?q?=F0=9F=92=84=20=ED=95=98=ED=8A=B8=20?= =?UTF-8?q?=EB=A1=9C=ED=8B=B0=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dear-World/Dear-World.xcodeproj/project.pbxproj | 8 ++++---- Dear-World/Dear-World/Resource/heart_fill.json | 1 - .../Scene/Discover/Cell/MessageTableViewCell.swift | 13 ++++++------- 3 files changed, 10 insertions(+), 12 deletions(-) delete mode 100644 Dear-World/Dear-World/Resource/heart_fill.json diff --git a/Dear-World/Dear-World.xcodeproj/project.pbxproj b/Dear-World/Dear-World.xcodeproj/project.pbxproj index 9c9bbb8..d1b0ea6 100644 --- a/Dear-World/Dear-World.xcodeproj/project.pbxproj +++ b/Dear-World/Dear-World.xcodeproj/project.pbxproj @@ -11,6 +11,7 @@ 121BDB44259735200062B15A /* UIColor+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 121BDB43259735200062B15A /* UIColor+.swift */; }; 121BDB592597652A0062B15A /* MessageTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 121BDB582597652A0062B15A /* MessageTableViewCell.swift */; }; 121BDB672597982F0062B15A /* DiscoverReactor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 121BDB662597982F0062B15A /* DiscoverReactor.swift */; }; + 122D6E2825B4571200F9D249 /* heart.json in Resources */ = {isa = PBXBuildFile; fileRef = 122D6E2725B4571200F9D249 /* heart.json */; }; 1263E09725A1C87400E3F121 /* Message.API.Countries.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1263E09625A1C87400E3F121 /* Message.API.Countries.swift */; }; 1263E09C25A1C8DD00E3F121 /* Message.Model.Countries.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1263E09B25A1C8DD00E3F121 /* Message.Model.Countries.swift */; }; 1263E0CF25A1F5ED00E3F121 /* Message.Model.MessageCount.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1263E0CE25A1F5ED00E3F121 /* Message.Model.MessageCount.swift */; }; @@ -73,7 +74,6 @@ 39965E7A25ABDF8100069860 /* ItemBottomReactor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39965E7925ABDF8100069860 /* ItemBottomReactor.swift */; }; 39965E8825ABE32400069860 /* BottomSheetItemHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39965E8725ABE32400069860 /* BottomSheetItemHeaderView.swift */; }; 39965E8D25ACA87A00069860 /* BottomSheetItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39965E8C25ACA87A00069860 /* BottomSheetItem.swift */; }; - 39965F2525B2E20A00069860 /* heart_fill.json in Resources */ = {isa = PBXBuildFile; fileRef = 39965F2425B2E20900069860 /* heart_fill.json */; }; 39965F3325B308B000069860 /* UIApplication+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39965F3225B308B000069860 /* UIApplication+.swift */; }; 39C832282597651F00236DDF /* RxRelay in Frameworks */ = {isa = PBXBuildFile; productRef = 39C832272597651F00236DDF /* RxRelay */; }; 39C8322A2597651F00236DDF /* RxSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 39C832292597651F00236DDF /* RxSwift */; }; @@ -120,6 +120,7 @@ 121BDB43259735200062B15A /* UIColor+.swift */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.swift; path = "UIColor+.swift"; sourceTree = ""; tabWidth = 2; }; 121BDB582597652A0062B15A /* MessageTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageTableViewCell.swift; sourceTree = ""; }; 121BDB662597982F0062B15A /* DiscoverReactor.swift */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.swift; path = DiscoverReactor.swift; sourceTree = ""; tabWidth = 2; }; + 122D6E2725B4571200F9D249 /* heart.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = heart.json; path = ../../../../Downloads/heart.json; sourceTree = ""; }; 1263E09625A1C87400E3F121 /* Message.API.Countries.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Message.API.Countries.swift; sourceTree = ""; }; 1263E09B25A1C8DD00E3F121 /* Message.Model.Countries.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Message.Model.Countries.swift; sourceTree = ""; }; 1263E0CE25A1F5ED00E3F121 /* Message.Model.MessageCount.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Message.Model.MessageCount.swift; sourceTree = ""; }; @@ -174,7 +175,6 @@ 39965E7925ABDF8100069860 /* ItemBottomReactor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ItemBottomReactor.swift; sourceTree = ""; }; 39965E8725ABE32400069860 /* BottomSheetItemHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BottomSheetItemHeaderView.swift; sourceTree = ""; }; 39965E8C25ACA87A00069860 /* BottomSheetItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BottomSheetItem.swift; sourceTree = ""; }; - 39965F2425B2E20900069860 /* heart_fill.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = heart_fill.json; sourceTree = ""; }; 39965F3225B308B000069860 /* UIApplication+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIApplication+.swift"; sourceTree = ""; }; 39E9F7CF25A1738F00BC2CC2 /* AboutReactor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AboutReactor.swift; sourceTree = ""; }; 39E9F7DA25A1BBED00BC2CC2 /* PixelWorldMapView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PixelWorldMapView.swift; sourceTree = ""; }; @@ -385,7 +385,7 @@ 395825AE25948E66007325AB /* Resource */ = { isa = PBXGroup; children = ( - 39965F2425B2E20900069860 /* heart_fill.json */, + 122D6E2725B4571200F9D249 /* heart.json */, 39658F9F259ADE770050D180 /* splash_1x.json */, 395825B625948EE4007325AB /* Colors.xcassets */, 3958258325948E43007325AB /* Assets.xcassets */, @@ -765,7 +765,7 @@ 39518C7725A8FA2400F777D1 /* GoogleService-Info.plist in Resources */, 395825B725948EE4007325AB /* Colors.xcassets in Resources */, 3958258425948E43007325AB /* Assets.xcassets in Resources */, - 39965F2525B2E20A00069860 /* heart_fill.json in Resources */, + 122D6E2825B4571200F9D249 /* heart.json in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Dear-World/Dear-World/Resource/heart_fill.json b/Dear-World/Dear-World/Resource/heart_fill.json deleted file mode 100644 index e25d26b..0000000 --- a/Dear-World/Dear-World/Resource/heart_fill.json +++ /dev/null @@ -1 +0,0 @@ -{"v":"5.7.4","fr":29.9700012207031,"ip":0,"op":60.0000024438501,"w":200,"h":200,"nm":"","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":2,"ty":4,"nm":"λͺ¨μ–‘ λ ˆμ΄μ–΄ 5","sr":1,"ks":{"o":{"a":1,"k":[{"t":8,"s":[0],"h":1},{"t":16,"s":[100],"h":1},{"t":27.0000010997325,"s":[0],"h":1}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[91.5,100,0],"ix":2,"l":2},"a":{"a":0,"k":[-5.937,1.587,0],"ix":1,"l":2},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":8,"s":[110,110,100]},{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":16,"s":[126,126,100]},{"t":27.0000010997325,"s":[138,138,100]}],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[8.426,8.426],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"타원 패슀 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.050980392157,0.796078431373,0.737254901961,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"μ„  1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.051799332862,0.794515931373,0.736900658701,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"μΉ  1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-24.287,-58.287],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667],"y":[1,1]},"o":{"x":[0.333,0.333],"y":[0,0]},"t":8,"s":[18,18]},{"i":{"x":[0.667,0.667],"y":[1,1]},"o":{"x":[0.333,0.333],"y":[0,0]},"t":14,"s":[54,54]},{"t":19.0000007738859,"s":[12,12]}],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"λ³€ν˜•"}],"nm":"타원 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"rp","c":{"a":0,"k":9,"ix":1},"o":{"a":0,"k":0,"ix":2},"m":1,"ix":2,"tr":{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":41,"ix":4},"so":{"a":0,"k":100,"ix":5},"eo":{"a":0,"k":100,"ix":6},"nm":"λ³€ν˜•"},"nm":"반볡 1","mn":"ADBE Vector Filter - Repeater","hd":false}],"ip":1.00000004073083,"op":61.0000024845809,"st":1.00000004073083,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"λͺ¨μ–‘ λ ˆμ΄μ–΄ 4","sr":1,"ks":{"o":{"a":1,"k":[{"t":7,"s":[0],"h":1},{"t":11,"s":[100],"h":1},{"t":20.0000008146167,"s":[0],"h":1}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[91.5,100,0],"ix":2,"l":2},"a":{"a":0,"k":[-5.937,1.587,0],"ix":1,"l":2},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":7,"s":[110,110,100]},{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":11,"s":[111,111,100]},{"t":20.0000008146167,"s":[128,128,100]}],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[8.426,8.426],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"타원 패슀 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.980392156863,0.21568627451,0.4,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"μ„  1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.980392156863,0.21568627451,0.4,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"μΉ  1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-24.287,-58.287],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667],"y":[1,1]},"o":{"x":[0.333,0.333],"y":[0,0]},"t":7,"s":[18,18]},{"i":{"x":[0.667,0.667],"y":[1,1]},"o":{"x":[0.333,0.333],"y":[0,0]},"t":11,"s":[80,80]},{"t":16.0000006516934,"s":[12,12]}],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"λ³€ν˜•"}],"nm":"타원 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"rp","c":{"a":0,"k":9,"ix":1},"o":{"a":0,"k":0,"ix":2},"m":1,"ix":2,"tr":{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":40,"ix":4},"so":{"a":0,"k":100,"ix":5},"eo":{"a":0,"k":100,"ix":6},"nm":"λ³€ν˜•"},"nm":"반볡 1","mn":"ADBE Vector Filter - Repeater","hd":false}],"ip":1.00000004073083,"op":61.0000024845809,"st":1.00000004073083,"bm":0},{"ddd":0,"ind":7,"ty":4,"nm":"heart","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[100.5,100.75,0],"ix":2,"l":2},"a":{"a":0,"k":[51,43,0],"ix":1,"l":2},"s":{"a":1,"k":[{"i":{"x":[0.833,0.833,0.833],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":0,"s":[100,100,100]},{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":5,"s":[60,60,100]},{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":12,"s":[100,100,100]},{"i":{"x":[0.833,0.833,0.833],"y":[1,1,1]},"o":{"x":[0.167,0.167,0.167],"y":[0,0,0]},"t":17,"s":[80,80,100]},{"i":{"x":[0.571,0.571,0.571],"y":[1,1,1]},"o":{"x":[0.174,0.174,0.174],"y":[0,0,0]},"t":23,"s":[100,100,100]},{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.399,0.399,0.399],"y":[0,0,0]},"t":30,"s":[100,100,100]},{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":38,"s":[130,130,100]},{"i":{"x":[0.833,0.833,0.833],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":45,"s":[80,80,100]},{"t":55.0000022401959,"s":[100,100,100]}],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[5.491,5.707],[7.198,0],[5.087,-8.058],[9.076,0],[5.215,-5.417],[-0.307,-8.035],[-1.964,-1.007],[-0.266,0],[-0.243,0.126],[-11.932,9.608],[-0.47,12.312]],"o":[[-5.215,-5.417],[-9.074,0],[-5.085,-8.058],[-7.198,0],[-5.491,5.707],[1.11,29.108],[0.243,0.126],[0.266,0],[0.488,-0.25],[16.237,-13.073],[0.307,-8.035]],"v":[[41.819,-33.758],[22.568,-42.159],[0,-29.21],[-22.568,-42.159],[-41.819,-33.758],[-49.978,-12.135],[-0.778,41.972],[0,42.159],[0.778,41.972],[24.801,26.122],[49.978,-12.135]],"c":true},"ix":2},"nm":"패슀 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[0.838999986649,0.866999983788,0.98400002718,1]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":5,"s":[0.838999968884,0.866999966491,0.984000052658,1]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":12,"s":[0.980392158031,0.215686276555,0.40000000596,1]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":30,"s":[0.980392158031,0.215686276555,0.40000000596,1]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":38,"s":[0.839215695858,0.866666674614,0.984313726425,1]},{"t":45.0000018328876,"s":[0.839215695858,0.866666674614,0.984313726425,1]}],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"μΉ  1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[51,42.604],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"λ³€ν˜•"}],"nm":"κ·Έλ£Ή 1","np":4,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":120.0000048877,"st":0,"bm":0}],"markers":[]} \ No newline at end of file diff --git a/Dear-World/Dear-World/Source/Presentation/Scene/Discover/Cell/MessageTableViewCell.swift b/Dear-World/Dear-World/Source/Presentation/Scene/Discover/Cell/MessageTableViewCell.swift index 21b8ad9..c33584b 100644 --- a/Dear-World/Dear-World/Source/Presentation/Scene/Discover/Cell/MessageTableViewCell.swift +++ b/Dear-World/Dear-World/Source/Presentation/Scene/Discover/Cell/MessageTableViewCell.swift @@ -12,13 +12,12 @@ import UIKit final class MessageTableViewCell: UITableViewCell { private enum HeartProgress: CGFloat { - case likeDefault = 30 case unlikeDefault = 1 - case likeTouchEnd = 15 - case unlikeTouchEnd = 60 + case likeTouchEnd = 30 + case unlikeTouchEnd = 90 func percent() -> CGFloat { - self.rawValue / 60 + self.rawValue / 90 } } @@ -30,7 +29,7 @@ final class MessageTableViewCell: UITableViewCell { let countryFlagImageView: UIImageView = UIImageView() let detailTextView: UITextView = UITextView() let shareButton: UIButton = UIButton() - let likeView: AnimationView = AnimationView(animation: Animation.named("heart_fill")) + let likeView: AnimationView = AnimationView(animation: Animation.named("heart")) let likeCountLabel: UILabel = UILabel() var likeCount: Int = 0 { didSet { @@ -39,7 +38,7 @@ final class MessageTableViewCell: UITableViewCell { } var isLike: Bool = false { didSet { - self.likeView.currentProgress = isLike ? HeartProgress.likeDefault.percent() : HeartProgress.unlikeDefault.percent() + self.likeView.currentProgress = isLike ? HeartProgress.likeTouchEnd.percent() : HeartProgress.unlikeDefault.percent() self.likeCountLabel.textColor = isLike ? .loveRed : .grayWhite } } @@ -208,7 +207,7 @@ final class MessageTableViewCell: UITableViewCell { } likeView.play( // TODO : 각 상황에 λŒ€ν•œ 값듀을 enum으둜 μ •μ˜ν• κ²ƒ - fromProgress: isLike ? HeartProgress.unlikeDefault.percent() : HeartProgress.likeDefault.percent(), + fromProgress: isLike ? HeartProgress.unlikeDefault.percent() : HeartProgress.likeTouchEnd.percent(), toProgress: isLike ? HeartProgress.likeTouchEnd.percent() : HeartProgress.unlikeTouchEnd.percent()) { completed in if completed && isLike{ self?.likeCount += 1