diff --git a/momoIOS.xcodeproj/project.pbxproj b/momoIOS.xcodeproj/project.pbxproj index 8c748c6..aec014b 100644 --- a/momoIOS.xcodeproj/project.pbxproj +++ b/momoIOS.xcodeproj/project.pbxproj @@ -10,6 +10,7 @@ BF0408632987B3AA00F1129B /* LoginController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF0408622987B3AA00F1129B /* LoginController.swift */; }; BF04086B2987E34800F1129B /* AuthCommonConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF04086A2987E34800F1129B /* AuthCommonConstants.swift */; }; BF04086D2987E38C00F1129B /* RegistrationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF04086C2987E38C00F1129B /* RegistrationController.swift */; }; + BF04086F2987E70200F1129B /* CheckSecurityCodeController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF04086E2987E70200F1129B /* CheckSecurityCodeController.swift */; }; E83238E92984FDDA00DC83C2 /* RxSwift in Frameworks */ = {isa = PBXBuildFile; productRef = E83238E82984FDDA00DC83C2 /* RxSwift */; }; E83238EC2984FE0800DC83C2 /* Toast in Frameworks */ = {isa = PBXBuildFile; productRef = E83238EB2984FE0800DC83C2 /* Toast */; }; E83238EF2984FE3200DC83C2 /* Alamofire in Frameworks */ = {isa = PBXBuildFile; productRef = E83238EE2984FE3200DC83C2 /* Alamofire */; }; @@ -27,6 +28,7 @@ BF0408622987B3AA00F1129B /* LoginController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoginController.swift; sourceTree = ""; }; BF04086A2987E34800F1129B /* AuthCommonConstants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthCommonConstants.swift; sourceTree = ""; }; BF04086C2987E38C00F1129B /* RegistrationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RegistrationController.swift; sourceTree = ""; }; + BF04086E2987E70200F1129B /* CheckSecurityCodeController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CheckSecurityCodeController.swift; sourceTree = ""; }; E83238F0298506A000DC83C2 /* MainViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainViewController.swift; sourceTree = ""; }; E8D5C3ED2984FC23003D1AD0 /* momoIOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = momoIOS.app; sourceTree = BUILT_PRODUCTS_DIR; }; E8D5C3F02984FC23003D1AD0 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; @@ -67,6 +69,7 @@ BF0408622987B3AA00F1129B /* LoginController.swift */, BF04086C2987E38C00F1129B /* RegistrationController.swift */, BF04086A2987E34800F1129B /* AuthCommonConstants.swift */, + BF04086E2987E70200F1129B /* CheckSecurityCodeController.swift */, ); path = Controller; sourceTree = ""; @@ -211,6 +214,7 @@ BF04086D2987E38C00F1129B /* RegistrationController.swift in Sources */, E8D5C3F52984FC23003D1AD0 /* ViewController.swift in Sources */, E8D5C3F12984FC23003D1AD0 /* AppDelegate.swift in Sources */, + BF04086F2987E70200F1129B /* CheckSecurityCodeController.swift in Sources */, E8D5C3F32984FC23003D1AD0 /* SceneDelegate.swift in Sources */, E83238F1298506A000DC83C2 /* MainViewController.swift in Sources */, BF0408632987B3AA00F1129B /* LoginController.swift in Sources */, diff --git a/momoIOS/Authentication/Controller/CheckSecurityCodeController.swift b/momoIOS/Authentication/Controller/CheckSecurityCodeController.swift new file mode 100644 index 0000000..9ba681e --- /dev/null +++ b/momoIOS/Authentication/Controller/CheckSecurityCodeController.swift @@ -0,0 +1,71 @@ +// +// CheckSecurityCodeController.swift +// momoIOS +// +// Created by 문다 on 2023/01/30. +// + +import UIKit + +class CheckSecurityCodeController: UIViewController { + // MARK: - Properties + private let guidePhrase: UILabel = { + let phrase = UILabel() + phrase.text = "보안코드를\n입력해주세요." + phrase.font = UIFont.systemFont(ofSize: 40, weight: .regular) + phrase.numberOfLines = 0 + return phrase + }() + + private let codeField: UITextField = { + let field = UITextField() + field.font = UIFont.systemFont(ofSize: 40) + field.textAlignment = .center + return field + }() + + private let borderView: UIView = { + let border = UIView() + border.backgroundColor = .black + return border + }() + + private let completeButton: UIButton = { + return actionButton(title: "가입완료!") + }() + + // MARK: - Lifecyle + override func viewDidLoad() { + super.viewDidLoad() + view.backgroundColor = .white + configureUI() + } + + // MARK: - Helpers + func configureUI() { + view.addSubview(guidePhrase) + guidePhrase.snp.makeConstraints { make in + make.top.equalTo(view.safeAreaLayoutGuide).offset(50) + make.left.equalToSuperview().offset(20) + } + + view.addSubview(codeField) + codeField.snp.makeConstraints { make in + make.top.equalTo(guidePhrase.snp.bottom).offset(130) + make.left.right.equalToSuperview().inset(20) + } + + view.addSubview(borderView) + borderView.snp.makeConstraints { make in + make.top.equalTo(codeField.snp.bottom).offset(8) + make.left.right.equalToSuperview().inset(20) + make.height.equalTo(0.75) + } + + view.addSubview(completeButton) + completeButton.snp.makeConstraints { make in + make.top.equalTo(borderView.snp.bottom).offset(40) + make.left.right.equalToSuperview().inset(20) + } + } +} diff --git a/momoIOS/Authentication/Controller/RegistrationController.swift b/momoIOS/Authentication/Controller/RegistrationController.swift index 3618ae7..d8c51f0 100644 --- a/momoIOS/Authentication/Controller/RegistrationController.swift +++ b/momoIOS/Authentication/Controller/RegistrationController.swift @@ -31,20 +31,24 @@ class RegistrationController: UIViewController { return pushAnotherViewButton(subtitle: "이미 가입했다면?", title: "로그인하기") }() - - // MARK: - Lifecycles override func viewDidLoad() { super.viewDidLoad() view.backgroundColor = .white configureUI() + registrationButton.addTarget(self, action: #selector(handleRegistration), for: .touchUpInside) pushLoginViewButton.addTarget(self, action: #selector(handlePushLoginView), for: .touchUpInside) pushHelpLogin.addTarget(self, action: #selector(handlePushHelpLogin), for: .touchUpInside) } // MARK: - Selectors + @objc func handleRegistration() { + let controller = CheckSecurityCodeController() + navigationController?.pushViewController(controller, animated: true) + } + @objc func handlePushLoginView() { }