From d8036b362342442223e1ecc844bcafcbe5986b8b Mon Sep 17 00:00:00 2001 From: yeonsu Date: Wed, 20 Mar 2024 22:28:50 +0900 Subject: [PATCH 1/2] =?UTF-8?q?[Fix]=20#168=20-=20=EB=A1=9C=EB=94=A9?= =?UTF-8?q?=EB=B7=B0=20=EB=A9=94=EC=84=B8=EC=A7=80=201=EA=B0=9C=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DontBe-iOS/DontBe-iOS/Global/Literals/StringLiterals.swift | 1 - .../DontBe-iOS/Presentation/Helpers/DontBeLoadingView.swift | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/DontBe-iOS/DontBe-iOS/Global/Literals/StringLiterals.swift b/DontBe-iOS/DontBe-iOS/Global/Literals/StringLiterals.swift index 5fe10adb..9afe2f44 100644 --- a/DontBe-iOS/DontBe-iOS/Global/Literals/StringLiterals.swift +++ b/DontBe-iOS/DontBe-iOS/Global/Literals/StringLiterals.swift @@ -170,7 +170,6 @@ enum StringLiterals { enum Loading { static let loadingMessageTitle = "알고 계셨나요?" - static let loadingMessage1 = "온라인 상에서도 비속어를\n사용하지 않은 사람들이\n실제 행복지수가 더 높다고 해요." static let loadingMessage2 = "Don’t be는 그저 온화한 커뮤니티가 아닌\n온화하면서도 재밌을 수 있는 커뮤니티를 지향해요." static let loadingMessage3 = "Don’t be의 온화함을 해치는 글이 보인다면\n직접 투명도 기능을 눌러보세요!" static let loadingMessage4 = "Don’t be 팀은 온화한 커뮤니티를 만들기 위해\n저희부터 온화한 팀이 되고자 노력하고 있어요." diff --git a/DontBe-iOS/DontBe-iOS/Presentation/Helpers/DontBeLoadingView.swift b/DontBe-iOS/DontBe-iOS/Presentation/Helpers/DontBeLoadingView.swift index 75c406c1..8b05bc43 100644 --- a/DontBe-iOS/DontBe-iOS/Presentation/Helpers/DontBeLoadingView.swift +++ b/DontBe-iOS/DontBe-iOS/Presentation/Helpers/DontBeLoadingView.swift @@ -12,8 +12,7 @@ import Lottie final class DontBeLoadingView: UIView { private var loadingText: String = "" - private var loadingTexts = [StringLiterals.Loading.loadingMessage1, - StringLiterals.Loading.loadingMessage2, + private var loadingTexts = [StringLiterals.Loading.loadingMessage2, StringLiterals.Loading.loadingMessage3, StringLiterals.Loading.loadingMessage4, StringLiterals.Loading.loadingMessage5, From 5a0764035015598937cfc18a729631be16cbe9df Mon Sep 17 00:00:00 2001 From: yeonsu Date: Wed, 20 Mar 2024 23:07:37 +0900 Subject: [PATCH 2/2] =?UTF-8?q?[Fix]=20#168=20-=20=EB=8B=A4=EB=A5=B8=20?= =?UTF-8?q?=ED=83=AD=EC=97=90=EC=84=9C=20=EA=B8=80=EC=93=B0=EA=B8=B0?= =?UTF-8?q?=ED=83=AD=EC=9C=BC=EB=A1=9C=20=EC=9D=B4=EB=8F=99=20=EC=8B=9C=20?= =?UTF-8?q?=EB=A1=9C=EB=94=A9=EB=B7=B0=20=EB=9C=A8=EB=8A=94=20=EC=9D=B4?= =?UTF-8?q?=EC=8A=88=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TabBar/DontBeTabBarController.swift | 33 +++++++++++++------ 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/DontBe-iOS/DontBe-iOS/Presentation/TabBar/DontBeTabBarController.swift b/DontBe-iOS/DontBe-iOS/Presentation/TabBar/DontBeTabBarController.swift index 1239b3b1..3871e8ce 100644 --- a/DontBe-iOS/DontBe-iOS/Presentation/TabBar/DontBeTabBarController.swift +++ b/DontBe-iOS/DontBe-iOS/Presentation/TabBar/DontBeTabBarController.swift @@ -148,20 +148,27 @@ final class DontBeTabBarController: UITabBarController { extension DontBeTabBarController: UITabBarControllerDelegate { func tabBarController(_ tabBarController: UITabBarController, didSelect viewController: UIViewController) { - if selectedIndex == 1 { - self.selectedIndex = 0 - } - if selectedIndex == 2 { self.tabBar.items?[2].image = ImageLiterals.TabBar.icnNotificationRead } - if beforeIndex == 2 && self.selectedIndex == 0 { - showLoadingView() + if beforeIndex == 2 { + if self.selectedIndex == 0 { + showLoadingView() + print("여기는 \(self.selectedIndex)") + } + } + + if beforeIndex == 3 { + if self.selectedIndex == 0 { + showLoadingView() + print("여기는 \(self.selectedIndex)") + } } - if beforeIndex == 3 && self.selectedIndex == 0 { - showLoadingView() + if selectedIndex == 1 { + self.selectedIndex = 0 + hideLoadingView() } if let selectedViewController = tabBarController.selectedViewController { @@ -215,8 +222,14 @@ extension DontBeTabBarController { loadingView.show() DispatchQueue.main.asyncAfter(deadline: .now() + 1.4) { - loadingView.hide { - } + loadingView.hide() } } + + private func hideLoadingView() { + let loadingView = DontBeLoadingView() + DispatchQueue.main.async { + loadingView.hide() + } + } }