diff --git a/Projects/Features/AuthFeature/Sources/IntroScene/VC/IntroViewController.swift b/Projects/Features/AuthFeature/Sources/IntroScene/VC/IntroViewController.swift index 588fb56b..1a9485a1 100644 --- a/Projects/Features/AuthFeature/Sources/IntroScene/VC/IntroViewController.swift +++ b/Projects/Features/AuthFeature/Sources/IntroScene/VC/IntroViewController.swift @@ -21,6 +21,12 @@ public class IntroViewController: BaseViewController, Stepper { private var introModel: IntroModel? + private let alertView1 = MGAlertOnlyTitleView(title: "구글 로그인은 준비중입니다!").then { + $0.titleLabel?.font = UIFont.Pretendard.labelMedium + $0.titleLabel?.textColor = .black + $0.backgroundColor = DSKitAsset.Colors.gray100.color + } + private var introImageView = MGProfileView( profileImage: MGProfileImage( type: .custom, @@ -106,7 +112,7 @@ public class IntroViewController: BaseViewController, Stepper { public override func bindViewModel() { super.bindViewModel() - + let input = IntroViewModel.Input( goolgeButtonTapped: googleButton.rx.tap.asDriver(), appleButtonTapped: appleButton.rx.tap.asDriver(), @@ -123,6 +129,13 @@ public class IntroViewController: BaseViewController, Stepper { owner.subTitle.changeText(text: owner.introModel?.subTitle) }) .disposed(by: disposeBag) + + output.showGoogleAlert + .withUnretained(self) + .subscribe(onNext: { owner, _ in + owner.alertView1.present(on: owner.view) + }) + .disposed(by: disposeBag) }) } } diff --git a/Projects/Features/AuthFeature/Sources/IntroScene/ViewModel/IntroViewModel.swift b/Projects/Features/AuthFeature/Sources/IntroScene/ViewModel/IntroViewModel.swift index 29db359c..6e623408 100644 --- a/Projects/Features/AuthFeature/Sources/IntroScene/ViewModel/IntroViewModel.swift +++ b/Projects/Features/AuthFeature/Sources/IntroScene/ViewModel/IntroViewModel.swift @@ -35,9 +35,11 @@ public class IntroViewModel: AuthViewModelType { public struct Output { var introDatas: Observable + var showGoogleAlert: Observable } private let introModelSubject = PublishSubject() + private let showGoogleAlertSubject = PublishSubject() public init(authUseCase: AuthUseCase) { self.useCase = authUseCase @@ -46,15 +48,17 @@ public class IntroViewModel: AuthViewModelType { public func transform(_ input: Input, action: (Output) -> Void) -> Output { - let output = Output(introDatas: introModelSubject.asObservable()) + let output = Output(introDatas: introModelSubject.asObservable(), showGoogleAlert: showGoogleAlertSubject.asObservable()) action(output) bindOutput(output: output) input.goolgeButtonTapped - .drive(onNext: { _ in - print("googleButtonTapp") + .asObservable() + .withUnretained(self) + .subscribe(onNext: { owner, _ in + owner.showGoogleAlertSubject.onNext(()) }) .disposed(by: disposeBag) diff --git a/Projects/Modules/DSKit/Sources/Components/MaeumGaGymButton/Auth/MG+AuthButton.swift b/Projects/Modules/DSKit/Sources/Components/MaeumGaGymButton/Auth/MG+AuthButton.swift index 93549a95..515cf922 100644 --- a/Projects/Modules/DSKit/Sources/Components/MaeumGaGymButton/Auth/MG+AuthButton.swift +++ b/Projects/Modules/DSKit/Sources/Components/MaeumGaGymButton/Auth/MG+AuthButton.swift @@ -13,7 +13,7 @@ open class MGAuthButton: BaseButton { $0.contentMode = .scaleAspectFit } - public let textLabel = MGLabel(font: UIFont.Pretendard.bodyMedium, + public let textLabel = MGLabel(font: UIFont.Pretendard.labelMedium, isCenter: true, numberOfLineCount: 1 ) @@ -53,7 +53,7 @@ private extension MGAuthButton { func setup(type: AuthLogoType, spacing: CGFloat?, radius: Double?) { - self.textLabel.text = type.logoTitle + self.textLabel.changeText(text: type.logoTitle) self.iconImageView.image = type.imageLogo self.backgroundColor = type.backgroundColor self.layer.cornerRadius = radius ?? 8