-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
358 additions
and
27 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+13.3 KB
(100%)
CMC/Resources/Assets.xcassets/Splash.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-30.6 KB
(96%)
CMC/Resources/Assets.xcassets/Splash.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions
23
CMC/Resources/Assets.xcassets/SplashLogo.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "Group 38564.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"filename" : "Group [email protected]", | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"filename" : "Group [email protected]", | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+47.4 KB
CMC/Resources/Assets.xcassets/SplashLogo.imageset/Group [email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+71 KB
CMC/Resources/Assets.xcassets/SplashLogo.imageset/Group [email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions
23
CMC/Resources/Assets.xcassets/SplashTitle.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "SplashTitle.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
95 changes: 95 additions & 0 deletions
95
CMC/Sources/Presenter/Auth/Coordinators/AuthCoordinator.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
// | ||
// AuthCoordinator.swift | ||
// CMC | ||
// | ||
// Created by Siri on 10/25/23. | ||
// Copyright © 2023 com.centralMakeusChallenge. All rights reserved. | ||
// | ||
|
||
import RxCocoa | ||
import RxSwift | ||
import UIKit | ||
|
||
class AuthCoordinator: CoordinatorType { | ||
// MARK: - Navigation DEPTH 1 - | ||
enum AuthCoordinatorChild{ | ||
case main | ||
case emailSignUp | ||
case emailSignIn | ||
/// SignIn이 AuthHome의 역할 | ||
} | ||
|
||
// MARK: - Need To Initializing | ||
var disposeBag: DisposeBag | ||
var navigationController: UINavigationController | ||
|
||
// MARK: - Don't Need To Initializing | ||
var childCoordinators: [CoordinatorType] = [] | ||
var delegate: CoordinatorDelegate? | ||
var userActionState: PublishRelay<AuthCoordinatorChild> = PublishRelay() | ||
/// init에서만 호출하고, stream을 유지하기위해 BehaviorSubject 사용 | ||
|
||
init( | ||
navigationController: UINavigationController | ||
){ | ||
self.navigationController = navigationController | ||
self.disposeBag = DisposeBag() | ||
self.setState() | ||
} | ||
|
||
func setState() { | ||
self.userActionState | ||
.subscribe(onNext: { [weak self] state in | ||
guard let self = self else {return} | ||
switch state{ | ||
case .main: | ||
let mainAuthViewController = MainAuthViewController( | ||
viewModel: MainAuthViewModel( | ||
coordinator: self | ||
) | ||
) | ||
if self.navigationController.viewControllers.contains(where: {$0 is MainAuthViewController}) { | ||
self.navigationController.popViewController(animated: true) | ||
}else { | ||
self.pushViewController(viewController: mainAuthViewController) | ||
} | ||
case .emailSignUp: | ||
CMCToastManager.shared.addToast(message: "🍎 여기는 아직이지롱~ 😀") | ||
// let emailSignUpViewController = EmailSignUpViewController( | ||
// viewModel: EmailSignUpViewModel( | ||
// coordinator: self, | ||
// userSignUpUsecase: DefaultUserSignUpUsecase( | ||
// userRepository: DefaultUserRepository() | ||
// ) | ||
// ) | ||
// ) | ||
// if self.navigationController.viewControllers.contains(where: {$0 is EmailSignUpViewController}) { | ||
// self.navigationController.popViewController(animated: true) | ||
// }else { | ||
// self.pushViewController(viewController: emailSignUpViewController) | ||
// } | ||
case .emailSignIn: | ||
CMCToastManager.shared.addToast(message: "🍎 여기도 아직이지롱~ 😀") | ||
// let emailSignInViewController = EmailSignInViewController( | ||
// viewModel: EmailSignInViewModel( | ||
// coordinator: self, | ||
// userEmailSignInUsecase: DefaultUserEmailSignInUsecase( | ||
// userRepository: DefaultUserRepository() | ||
// ) | ||
// ) | ||
// ) | ||
// if self.navigationController.viewControllers.contains(where: {$0 is EmailSignInViewController}) { | ||
// self.navigationController.popViewController(animated: true) | ||
// }else { | ||
// self.pushViewController(viewController: emailSignInViewController) | ||
// } | ||
} | ||
|
||
}).disposed(by: disposeBag) | ||
} | ||
|
||
func start() { | ||
self.userActionState.accept(.main) | ||
} | ||
|
||
} |
119 changes: 119 additions & 0 deletions
119
CMC/Sources/Presenter/Auth/MainAuthViewController.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
// | ||
// MainAuthViewController.swift | ||
// CMC | ||
// | ||
// Created by Siri on 10/25/23. | ||
// Copyright © 2023 com.centralMakeusChallenge. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
import RxCocoa | ||
import RxSwift | ||
|
||
import DesignSystem | ||
import SnapKit | ||
|
||
import UIKit | ||
|
||
class MainAuthViewController: BaseViewController { | ||
|
||
// MARK: - UI | ||
|
||
private lazy var backgroundImageView: UIImageView = { | ||
let imageView = UIImageView() | ||
imageView.image = CMCAsset.splash.image | ||
return imageView | ||
}() | ||
|
||
private lazy var mainTitle: UIImageView = { | ||
let label = UIImageView() | ||
label.image = CMCAsset.splashTitle.image | ||
return label | ||
}() | ||
|
||
private lazy var mainLogo: UIImageView = { | ||
let imageView = UIImageView() | ||
imageView.image = CMCAsset.splashLogo.image | ||
return imageView | ||
}() | ||
|
||
private lazy var signInButton: CMCButton = { | ||
let button = CMCButton( | ||
isRound: false, | ||
type: .login(.inactive), | ||
title: "로그인" | ||
) | ||
return button | ||
}() | ||
|
||
private lazy var signUpButton: CMCButton = { | ||
let button = CMCButton( | ||
isRound: false, | ||
type: .login(.clear), | ||
title: "회원가입" | ||
) | ||
return button | ||
}() | ||
|
||
// MARK: - Properties | ||
private let viewModel: MainAuthViewModel | ||
|
||
// MARK: - Initializers | ||
init( | ||
viewModel: MainAuthViewModel | ||
) { | ||
self.viewModel = viewModel | ||
super.init() | ||
} | ||
|
||
// MARK: - LifeCycle | ||
override func viewDidLoad() { | ||
super.viewDidLoad() | ||
} | ||
|
||
// MARK: - Methods | ||
|
||
override func setAddSubView() { | ||
self.view.addSubview(backgroundImageView) | ||
backgroundImageView.addSubview(mainTitle) | ||
backgroundImageView.addSubview(mainLogo) | ||
backgroundImageView.addSubview(signInButton) | ||
backgroundImageView.addSubview(signUpButton) | ||
} | ||
|
||
override func setConstraint() { | ||
backgroundImageView.snp.makeConstraints { make in | ||
make.edges.equalToSuperview() | ||
} | ||
|
||
mainTitle.snp.makeConstraints { make in | ||
make.leading.equalToSuperview().offset(44) | ||
make.trailing.equalToSuperview().offset(-44) | ||
make.top.equalToSuperview().offset(180) | ||
} | ||
|
||
mainLogo.snp.makeConstraints { make in | ||
make.centerX.equalToSuperview() | ||
make.top.equalTo(mainTitle.snp.bottom).offset(60) | ||
make.width.height.equalTo(108) | ||
} | ||
|
||
signInButton.snp.makeConstraints { make in | ||
make.leading.equalToSuperview().offset(24) | ||
make.trailing.equalToSuperview().offset(-24) | ||
make.height.equalTo(56) | ||
make.top.equalTo(mainLogo.snp.bottom).offset(84) | ||
} | ||
|
||
signUpButton.snp.makeConstraints { make in | ||
make.leading.trailing.equalTo(signInButton) | ||
make.height.equalTo(56) | ||
make.top.equalTo(signInButton.snp.bottom).offset(28) | ||
} | ||
|
||
} | ||
|
||
override func bind() { | ||
} | ||
} |
Oops, something went wrong.