From 1255bf2255919d543301e42bb9be860235fa6259 Mon Sep 17 00:00:00 2001 From: kim-seonwoo Date: Thu, 11 Jan 2024 00:37:09 +0900 Subject: [PATCH 1/3] =?UTF-8?q?[Add/#49]=20Onboarding=20-=20SignInComplete?= =?UTF-8?q?ViewController=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HMH_iOS/HMH_iOS.xcodeproj/project.pbxproj | 4 + .../SignInCompleteViewController.swift | 89 +++++++++++++++++++ 2 files changed, 93 insertions(+) create mode 100644 HMH_iOS/HMH_iOS/Presentation/Onboarding/ViewControllers/SignInCompleteViewController.swift diff --git a/HMH_iOS/HMH_iOS.xcodeproj/project.pbxproj b/HMH_iOS/HMH_iOS.xcodeproj/project.pbxproj index 168e9f4..6fc1f6e 100644 --- a/HMH_iOS/HMH_iOS.xcodeproj/project.pbxproj +++ b/HMH_iOS/HMH_iOS.xcodeproj/project.pbxproj @@ -38,6 +38,7 @@ 0BC0EBD42B494459003EF5D4 /* OnboardingSwipeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0BC0EBD32B494459003EF5D4 /* OnboardingSwipeView.swift */; }; 0BD98DB92B4D671600E35188 /* SplashViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0BD98DB82B4D671600E35188 /* SplashViewController.swift */; }; 0BD98DBE2B4D6AB700E35188 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0BD98DBD2B4D6AB700E35188 /* LoginViewController.swift */; }; + 0BFD2FB42B4EE71900C6327F /* SignInCompleteViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0BFD2FB32B4EE71900C6327F /* SignInCompleteViewController.swift */; }; 17314F7F2B485E150089A551 /* CustomAlertButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17314F7E2B485E150089A551 /* CustomAlertButton.swift */; }; 17314F832B486BEC0089A551 /* AlertViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17314F822B486BEC0089A551 /* AlertViewController.swift */; }; 17314F852B497FDE0089A551 /* HMHLogoutAlert.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17314F842B497FDE0089A551 /* HMHLogoutAlert.swift */; }; @@ -190,6 +191,7 @@ 0BC0EBD32B494459003EF5D4 /* OnboardingSwipeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnboardingSwipeView.swift; sourceTree = ""; }; 0BD98DB82B4D671600E35188 /* SplashViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SplashViewController.swift; sourceTree = ""; }; 0BD98DBD2B4D6AB700E35188 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 0BFD2FB32B4EE71900C6327F /* SignInCompleteViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SignInCompleteViewController.swift; sourceTree = ""; }; 17314F7E2B485E150089A551 /* CustomAlertButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomAlertButton.swift; sourceTree = ""; }; 17314F822B486BEC0089A551 /* AlertViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertViewController.swift; sourceTree = ""; }; 17314F842B497FDE0089A551 /* HMHLogoutAlert.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HMHLogoutAlert.swift; sourceTree = ""; }; @@ -417,6 +419,7 @@ 0B78174D2B4BD96D0078E925 /* OnboardingBaseViewControllers.swift */, 0BA193B32B4D089C007E3F9C /* TimeSurveyViewController.swift */, 0BA193B52B4D08B7007E3F9C /* ProblemSurveyViewController.swift */, + 0BFD2FB32B4EE71900C6327F /* SignInCompleteViewController.swift */, ); path = ViewControllers; sourceTree = ""; @@ -1050,6 +1053,7 @@ 17314FAF2B4D3E1C0089A551 /* LogoutAndQuitFooterView.swift in Sources */, 0B78174E2B4BD96D0078E925 /* OnboardingBaseViewControllers.swift in Sources */, 0B8A89B12B369E4C00688BA6 /* HomeView.swift in Sources */, + 0BFD2FB42B4EE71900C6327F /* SignInCompleteViewController.swift in Sources */, 36A3D9B62B3EBBF7007EA272 /* Adjust+.swift in Sources */, 36A3D9BC2B3EBD2D007EA272 /* UIScreen+.swift in Sources */, 0B7817502B4BD9F10078E925 /* OnboardingButton.swift in Sources */, diff --git a/HMH_iOS/HMH_iOS/Presentation/Onboarding/ViewControllers/SignInCompleteViewController.swift b/HMH_iOS/HMH_iOS/Presentation/Onboarding/ViewControllers/SignInCompleteViewController.swift new file mode 100644 index 0000000..6daf4af --- /dev/null +++ b/HMH_iOS/HMH_iOS/Presentation/Onboarding/ViewControllers/SignInCompleteViewController.swift @@ -0,0 +1,89 @@ +// +// SignInSuccessViewController.swift +// HMH_iOS +// +// Created by Seonwoo Kim on 1/10/24. +// + +import UIKit + +import SnapKit +import Then + +final class SignInCompleteViewController: OnboardingBaseViewController { + private let SignInMainLabel = UILabel().then { + $0.textColor = .whiteText + $0.font = .iosTitle3Semibold22 + $0.text = StringLiteral.OnboardigMain.signInComplete + } + private let SignInSubLabel = UILabel().then { + $0.textColor = .gray2 + $0.font = .iosText6Medium14 + $0.text = StringLiteral.OnboardigSub.signInComplete + $0.setTextWithLineHeight(text: $0.text, lineHeight: 21) + } + + private let SignInImageView = UIImageView().then { + $0.image = ImageLiterals.myPage.icBadge + $0.contentMode = .scaleAspectFit + } + + override func viewDidLoad() { + super.viewDidLoad() + configureBaseView() + setDelegate() + setUI() + } + + private func setUI() { + setHierarchy() + setConstraints() + } + + private func setHierarchy() { + view.addSubviews(SignInMainLabel,SignInSubLabel,SignInImageView) + } + + private func setConstraints() { + SignInImageView.snp.makeConstraints { + $0.top.equalTo(navigationBar.snp.bottom).offset(126.adjustedHeight) + $0.size.equalTo(150.adjusted) + $0.centerX.equalToSuperview() + } + + SignInMainLabel.snp.makeConstraints { + $0.centerX.equalToSuperview() + $0.top.equalTo(SignInImageView.snp.bottom).offset(27.adjustedHeight) + } + + SignInSubLabel.snp.makeConstraints { + $0.centerX.equalToSuperview() + $0.top.equalTo(SignInMainLabel.snp.bottom).offset(8.adjustedHeight) + } + } + + private func setDelegate() { + self.delegate = self + } + + private func configureBaseView() { + view.backgroundColor = .background + progressBar.isHidden = true + nextButton.setButtonText(buttonTitle: StringLiteral.OnboardingButton.confirm) + nextButton.updateStatus(isEnabled: true) + } +} + +extension SignInCompleteViewController: NextViewPushDelegate { + func didTapButton() { + let nextViewController = TabBarController() + let navigationController = UINavigationController(rootViewController: nextViewController) + let sceneDelegate = UIApplication.shared.connectedScenes.first?.delegate as? SceneDelegate + guard let delegate = sceneDelegate else { + return + } + delegate.window?.rootViewController = navigationController + } +} + + From 9859c56d1166f2d59fb9f99b742046940bd564e2 Mon Sep 17 00:00:00 2001 From: kim-seonwoo Date: Thu, 11 Jan 2024 00:37:53 +0900 Subject: [PATCH 2/3] =?UTF-8?q?[Feat/#49]=20String=20-=20SignInComplete=20?= =?UTF-8?q?string=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HMH_iOS/HMH_iOS/Global/Literals/String/String.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/HMH_iOS/HMH_iOS/Global/Literals/String/String.swift b/HMH_iOS/HMH_iOS/Global/Literals/String/String.swift index 9f2bd7f..ff7ccba 100644 --- a/HMH_iOS/HMH_iOS/Global/Literals/String/String.swift +++ b/HMH_iOS/HMH_iOS/Global/Literals/String/String.swift @@ -79,6 +79,7 @@ enum StringLiteral { static let selectTotalTime = "총 목표 이용 시간을\n설정해 주세요" static let approvePermision = "스크린타임 권한 허용이 필요해요" static let appSelect = "중독에서 탈출하고 싶은\n앱을 선택해 주세요" + static let signInComplete = "회원가입 완료" } enum OnboardigSub { @@ -87,6 +88,7 @@ enum StringLiteral { static let selectTotalTime = "목표 이용 시간은 최대 6시간까지 설정할 수 있어요" static let approvePermision = "언제든지 설정에서 스크린타임 권한을\n변경할 수 있어요" static let appSelect = "목표 이용 시간이 지나면 앱이 잠겨요\n선택하고 싶은 앱은 언제든지 추가할 수 있어요" + static let signInComplete = "이제 하면함에서 블랙홀 탈출을 위한\n여정을 시작해 볼까요?" } enum TimeSurveySelect { From 90b6bdad8d20a9b15c383ec731ed9b5cc52b7a91 Mon Sep 17 00:00:00 2001 From: kim-seonwoo Date: Thu, 11 Jan 2024 03:19:45 +0900 Subject: [PATCH 3/3] =?UTF-8?q?[Fix/#49]=20SignIn=20-=20=EC=BD=94=EB=93=9C?= =?UTF-8?q?=EB=A6=AC=EB=B7=B0=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SignInCompleteViewController.swift | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/HMH_iOS/HMH_iOS/Presentation/Onboarding/ViewControllers/SignInCompleteViewController.swift b/HMH_iOS/HMH_iOS/Presentation/Onboarding/ViewControllers/SignInCompleteViewController.swift index 6daf4af..44cb594 100644 --- a/HMH_iOS/HMH_iOS/Presentation/Onboarding/ViewControllers/SignInCompleteViewController.swift +++ b/HMH_iOS/HMH_iOS/Presentation/Onboarding/ViewControllers/SignInCompleteViewController.swift @@ -11,19 +11,20 @@ import SnapKit import Then final class SignInCompleteViewController: OnboardingBaseViewController { - private let SignInMainLabel = UILabel().then { + + private let signInMainLabel = UILabel().then { $0.textColor = .whiteText $0.font = .iosTitle3Semibold22 $0.text = StringLiteral.OnboardigMain.signInComplete } - private let SignInSubLabel = UILabel().then { + private let signInSubLabel = UILabel().then { $0.textColor = .gray2 $0.font = .iosText6Medium14 $0.text = StringLiteral.OnboardigSub.signInComplete $0.setTextWithLineHeight(text: $0.text, lineHeight: 21) } - private let SignInImageView = UIImageView().then { + private let signInImageView = UIImageView().then { $0.image = ImageLiterals.myPage.icBadge $0.contentMode = .scaleAspectFit } @@ -41,24 +42,24 @@ final class SignInCompleteViewController: OnboardingBaseViewController { } private func setHierarchy() { - view.addSubviews(SignInMainLabel,SignInSubLabel,SignInImageView) + view.addSubviews(signInMainLabel,signInSubLabel,signInImageView) } private func setConstraints() { - SignInImageView.snp.makeConstraints { + signInImageView.snp.makeConstraints { $0.top.equalTo(navigationBar.snp.bottom).offset(126.adjustedHeight) $0.size.equalTo(150.adjusted) $0.centerX.equalToSuperview() } - SignInMainLabel.snp.makeConstraints { + signInMainLabel.snp.makeConstraints { $0.centerX.equalToSuperview() - $0.top.equalTo(SignInImageView.snp.bottom).offset(27.adjustedHeight) + $0.top.equalTo(signInImageView.snp.bottom).offset(27.adjustedHeight) } - SignInSubLabel.snp.makeConstraints { + signInSubLabel.snp.makeConstraints { $0.centerX.equalToSuperview() - $0.top.equalTo(SignInMainLabel.snp.bottom).offset(8.adjustedHeight) + $0.top.equalTo(signInMainLabel.snp.bottom).offset(8.adjustedHeight) } }