Skip to content

Commit

Permalink
[Chore] 폴더링 및 코드 일부 수정 #8
Browse files Browse the repository at this point in the history
  • Loading branch information
meltsplit committed Apr 27, 2023
1 parent 332c4ec commit 4f5cc4b
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion SOPTving/SOPTving/Application/SceneDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {

guard let windowScene = (scene as? UIWindowScene) else { return }
window = UIWindow(windowScene: windowScene)
window?.rootViewController = MainVC()
window?.rootViewController = OnboardingVC()
window?.makeKeyAndVisible()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ final class AuthTextField : UITextField {
case hideButton
}

private var textFieldType: TextFieldType = .id
private var textFieldType: TextFieldType

//MARK: - UI Components

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ final class OnboardingVC: UIViewController {

//MARK: - Properties


//MARK: - UI Components

private let onboardingImageView: UIImageView = {
Expand All @@ -33,7 +34,7 @@ final class OnboardingVC: UIViewController {


//MARK: - Life Cycle

override func viewDidLoad() {
super.viewDidLoad()

Expand All @@ -54,10 +55,7 @@ extension OnboardingVC {

@objc
private func startButtonDidTap() {
// let signInSelectVC = SignInSelectVC()
// present(signInSelectVC, animated: true)

let signInVC = SignInVC()
let signInVC = SignInVC(viewModel: DefaultSignInViewModel())
present(signInVC, animated: true)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ final class SignInVC: UIViewController {

//MARK: - Properties

private let viewModel: SignInViewModel

//MARK: - UI Components

private lazy var backButton = UIButton().then {
Expand Down Expand Up @@ -58,6 +60,11 @@ final class SignInVC: UIViewController {

//MARK: - Life Cycle

init(viewModel: SignInViewModel) {
self.viewModel = viewModel
super.init(nibName: nil, bundle: nil)
}

override func viewDidLoad() {
super.viewDidLoad()

Expand All @@ -69,6 +76,9 @@ final class SignInVC: UIViewController {
updateSignInButtonUI()
}

required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}

//MARK: - Methods
Expand Down Expand Up @@ -114,7 +124,6 @@ extension SignInVC {
@objc
private func signInButtonDidTap() {
let mainVC = MainVC()
//guard let name = idTextField.text else { return }
UIApplication.shared.changeRootViewController(mainVC)
}
}
Expand Down
3 changes: 3 additions & 0 deletions SOPTving/SOPTving/Utility/Extension/UIApplication+.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@ extension UIApplication {
let firstWindow = windowScenes?.windows.filter { $0.isKeyWindow }.first
firstWindow?.rootViewController = viewController
firstWindow?.makeKeyAndVisible()

UIView.transition(with: firstWindow!,
duration: 0.5,
options: .transitionCrossDissolve,
animations: nil)
}


}

0 comments on commit 4f5cc4b

Please sign in to comment.