diff --git a/Projects/Feature/CreateAgency/Demo/Sources/SceneDelegate.swift b/Projects/Feature/CreateAgency/Demo/Sources/SceneDelegate.swift index 08b5b5f..0398668 100644 --- a/Projects/Feature/CreateAgency/Demo/Sources/SceneDelegate.swift +++ b/Projects/Feature/CreateAgency/Demo/Sources/SceneDelegate.swift @@ -12,7 +12,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { let networkManager = NetworkManager() let localStorage = LocalStorage() - window?.rootViewController = UINavigationController(rootViewController: InputUniversityInfoFactory(networkManager: networkManager, localStorage: localStorage).make(coordinator: nil, agencyName: "", agencyType: .inSchoolClub)) + window?.rootViewController = UINavigationController(rootViewController: InputAgencyInfoFactory(networkManager: networkManager, localStorage: localStorage).make(coordinator: nil, universityType: .unknown)) window?.makeKeyAndVisible() } diff --git a/Projects/Feature/CreateAgency/Sources/Scene/InputAgencyInfo/InputAgencyInfoReactor.swift b/Projects/Feature/CreateAgency/Sources/Scene/InputAgencyInfo/InputAgencyInfoReactor.swift index 16f7280..d7dfecf 100644 --- a/Projects/Feature/CreateAgency/Sources/Scene/InputAgencyInfo/InputAgencyInfoReactor.swift +++ b/Projects/Feature/CreateAgency/Sources/Scene/InputAgencyInfo/InputAgencyInfoReactor.swift @@ -121,9 +121,9 @@ public final class InputAgencyInfoReactor: Reactor { extension InputAgencyInfoReactor { func parsingAgencyType(with selectedIndex: Int) -> AgencyType? { switch selectedIndex { - case 0: .inSchoolClub - case 1: .studentCouncil - case 2: .general + case 0: .general + case 1: .inSchoolClub + case 2: .studentCouncil default: nil } } diff --git a/Projects/Feature/CreateAgency/Sources/Scene/InputAgencyInfo/InputAgencyInfoVC.swift b/Projects/Feature/CreateAgency/Sources/Scene/InputAgencyInfo/InputAgencyInfoVC.swift index 5f20b21..cd3c87e 100644 --- a/Projects/Feature/CreateAgency/Sources/Scene/InputAgencyInfo/InputAgencyInfoVC.swift +++ b/Projects/Feature/CreateAgency/Sources/Scene/InputAgencyInfo/InputAgencyInfoVC.swift @@ -48,7 +48,7 @@ public final class InputAgencyInfoVC: BaseVC, View { }() private let agencySegmentControl: MMSegmentControl = { - let v = MMSegmentControl(titles: ["동아리", "학생회", "기타모임"], type: .round) + let v = MMSegmentControl(titles: [ "기타모임", "동아리", "학생회"], type: .round) v.selectedIndex = 0 return v }() @@ -105,8 +105,8 @@ public final class InputAgencyInfoVC: BaseVC, View { keybordShowCreateButtonConstraints = [ registerButton.heightAnchor.constraint(equalToConstant: 56), registerButton.bottomAnchor.constraint(equalTo: view.keyboardLayoutGuide.topAnchor), - registerButton.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor, constant: 3), - registerButton.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor, constant: -3) + registerButton.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor, constant: 12), + registerButton.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor, constant: -12) ] NSLayoutConstraint.activate(keybordHideCreateButtonConstraints) @@ -159,7 +159,7 @@ public final class InputAgencyInfoVC: BaseVC, View { } .disposed(by: disposeBag) - view.rx.tapGesture + rootContainer.rx.tapGesture .bind { $0.endEditing(true) } .disposed(by: disposeBag) @@ -197,8 +197,8 @@ public final class InputAgencyInfoVC: BaseVC, View { .filter { $0 == .none} .observe(on: MainScheduler.instance) .bind(with: self) { owner, _ in - owner.agencySegmentControl.selectedIndex = 2 - owner.agencySegmentControl.disableButtons(with: 0,1) + owner.agencySegmentControl.selectedIndex = 0 + owner.agencySegmentControl.disableButtons(with: 1,2) owner.agencySegmentControl.flex.layout() } .disposed(by: disposeBag) @@ -243,5 +243,12 @@ public final class InputAgencyInfoVC: BaseVC, View { reactor.pulse(\.$isLoading) .bind(to: rx.isLoading) .disposed(by: disposeBag) + + reactor.pulse(\.$agencyType) + .map { $0 == .general ? "등록하기" : "다음으로" } + .bind(with: self) { owner, title in + owner.registerButton.setTitle(to: title) + } + .disposed(by: disposeBag) } }