-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Add/#42] CreateChallenge - 챌린지 생성 뷰컨트롤러 추가
- Loading branch information
1 parent
1eefece
commit aa2551e
Showing
7 changed files
with
253 additions
and
1 deletion.
There are no files selected for viewing
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
8 changes: 8 additions & 0 deletions
8
HMH_iOS/HMH_iOS/Presentation/CreateChallenge/ViewControllers/AppChoiceController.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,8 @@ | ||
// | ||
// AppChoiceController.swift | ||
// HMH_iOS | ||
// | ||
// Created by Seonwoo Kim on 1/10/24. | ||
// | ||
|
||
import Foundation |
71 changes: 71 additions & 0 deletions
71
...iOS/HMH_iOS/Presentation/CreateChallenge/ViewControllers/ApprovePermisionController.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,71 @@ | ||
// | ||
// ApprovePermisionController.swift | ||
// HMH_iOS | ||
// | ||
// Created by Seonwoo Kim on 1/10/24. | ||
// | ||
|
||
import UIKit | ||
|
||
import SnapKit | ||
import Then | ||
|
||
final class ApprovePermisionController: OnboardingBaseViewController { | ||
private let surveyView = SurveyView(buttonType: .solitary) | ||
|
||
override func viewDidLoad() { | ||
super.viewDidLoad() | ||
setUI() | ||
configureSurveyView() | ||
setDelegate() | ||
setTimeSurvey() | ||
} | ||
|
||
override func viewDidAppear(_ animated: Bool) { | ||
setUI() | ||
} | ||
|
||
private func setUI(){ | ||
setHierarchy() | ||
setConstraints() | ||
} | ||
|
||
private func setHierarchy() { | ||
view.addSubview(surveyView) | ||
} | ||
|
||
private func setConstraints() { | ||
surveyView.snp.makeConstraints { | ||
$0.top.equalTo(mainTitleLabel.snp.bottom).offset(94.adjustedHeight) | ||
$0.leading.trailing.equalTo(progressBar) | ||
} | ||
} | ||
|
||
private func setDelegate() { | ||
self.delegate = self | ||
} | ||
|
||
private func setTimeSurvey() { | ||
view.backgroundColor = .background | ||
step = 5 | ||
} | ||
|
||
private func configureSurveyView() { | ||
nextButtonText = StringLiteral.OnboardingButton.next | ||
nextButton.setButtonText(buttonTitle: nextButtonText) | ||
mainTitleText = StringLiteral.OnboardigMain.selectPeriod | ||
subTitleText = StringLiteral.OnboardigSub.selectPeriod | ||
surveyView.firstButton.setButtonText(buttonTitle: StringLiteral.PeriodSelect.firstSelect) | ||
surveyView.secondButton.setButtonText(buttonTitle: StringLiteral.PeriodSelect.secondSelect) | ||
surveyView.thirdButton.setButtonText(buttonTitle: StringLiteral.PeriodSelect.thirdSelect) | ||
surveyView.fourthButton.setButtonText(buttonTitle: StringLiteral.PeriodSelect.fourthSelect) | ||
} | ||
} | ||
|
||
extension ApprovePermisionController: NextViewPushDelegate { | ||
func didTapButton() { | ||
let nextViewController = SelectTotalTimeController() | ||
self.navigationController?.pushViewController(nextViewController, animated: false) | ||
} | ||
} | ||
|
70 changes: 70 additions & 0 deletions
70
HMH_iOS/HMH_iOS/Presentation/CreateChallenge/ViewControllers/SelectPeriodController.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,70 @@ | ||
// | ||
// SelectPeriodController.swift | ||
// HMH_iOS | ||
// | ||
// Created by Seonwoo Kim on 1/10/24. | ||
// | ||
|
||
import UIKit | ||
|
||
import SnapKit | ||
import Then | ||
|
||
final class SelectPeriodController: OnboardingBaseViewController { | ||
private let surveyView = SurveyView(buttonType: .solitary) | ||
|
||
override func viewDidLoad() { | ||
super.viewDidLoad() | ||
setUI() | ||
configureSurveyView() | ||
setDelegate() | ||
setTimeSurvey() | ||
} | ||
|
||
override func viewDidAppear(_ animated: Bool) { | ||
setUI() | ||
} | ||
|
||
private func setUI(){ | ||
setHierarchy() | ||
setConstraints() | ||
} | ||
|
||
private func setHierarchy() { | ||
view.addSubview(surveyView) | ||
} | ||
|
||
private func setConstraints() { | ||
surveyView.snp.makeConstraints { | ||
$0.top.equalTo(mainTitleLabel.snp.bottom).offset(94.adjustedHeight) | ||
$0.leading.trailing.equalTo(progressBar) | ||
} | ||
} | ||
|
||
private func setDelegate() { | ||
self.delegate = self | ||
} | ||
|
||
private func setTimeSurvey() { | ||
view.backgroundColor = .background | ||
step = 3 | ||
} | ||
|
||
private func configureSurveyView() { | ||
nextButtonText = StringLiteral.OnboardingButton.next | ||
nextButton.setButtonText(buttonTitle: nextButtonText) | ||
mainTitleText = StringLiteral.OnboardigMain.selectPeriod | ||
subTitleText = StringLiteral.OnboardigSub.selectPeriod | ||
surveyView.firstButton.setButtonText(buttonTitle: StringLiteral.PeriodSelect.firstSelect) | ||
surveyView.secondButton.setButtonText(buttonTitle: StringLiteral.PeriodSelect.secondSelect) | ||
surveyView.thirdButton.setButtonText(buttonTitle: StringLiteral.PeriodSelect.thirdSelect) | ||
surveyView.fourthButton.setButtonText(buttonTitle: StringLiteral.PeriodSelect.fourthSelect) | ||
} | ||
} | ||
|
||
extension SelectPeriodController: NextViewPushDelegate { | ||
func didTapButton() { | ||
let nextViewController = SelectTotalTimeController() | ||
self.navigationController?.pushViewController(nextViewController, animated: false) | ||
} | ||
} |
70 changes: 70 additions & 0 deletions
70
HMH_iOS/HMH_iOS/Presentation/CreateChallenge/ViewControllers/SelectTotalTimeController.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,70 @@ | ||
// | ||
// SelectTotalTimeController.swift | ||
// HMH_iOS | ||
// | ||
// Created by Seonwoo Kim on 1/10/24. | ||
// | ||
|
||
import UIKit | ||
|
||
import SnapKit | ||
import Then | ||
|
||
final class SelectTotalTimeController: OnboardingBaseViewController { | ||
private let surveyView = SurveyView(buttonType: .solitary) | ||
|
||
override func viewDidLoad() { | ||
super.viewDidLoad() | ||
setUI() | ||
configureSurveyView() | ||
setDelegate() | ||
setTimeSurvey() | ||
} | ||
|
||
override func viewDidAppear(_ animated: Bool) { | ||
setUI() | ||
} | ||
|
||
private func setUI(){ | ||
setHierarchy() | ||
setConstraints() | ||
} | ||
|
||
private func setHierarchy() { | ||
view.addSubview(surveyView) | ||
} | ||
|
||
private func setConstraints() { | ||
surveyView.snp.makeConstraints { | ||
$0.top.equalTo(mainTitleLabel.snp.bottom).offset(94.adjustedHeight) | ||
$0.leading.trailing.equalTo(progressBar) | ||
} | ||
} | ||
|
||
private func setDelegate() { | ||
self.delegate = self | ||
} | ||
|
||
private func setTimeSurvey() { | ||
view.backgroundColor = .background | ||
step = 4 | ||
} | ||
|
||
private func configureSurveyView() { | ||
nextButtonText = StringLiteral.OnboardingButton.next | ||
nextButton.setButtonText(buttonTitle: nextButtonText) | ||
mainTitleText = StringLiteral.OnboardigMain.selectPeriod | ||
subTitleText = StringLiteral.OnboardigSub.selectPeriod | ||
surveyView.firstButton.setButtonText(buttonTitle: StringLiteral.PeriodSelect.firstSelect) | ||
surveyView.secondButton.setButtonText(buttonTitle: StringLiteral.PeriodSelect.secondSelect) | ||
surveyView.thirdButton.setButtonText(buttonTitle: StringLiteral.PeriodSelect.thirdSelect) | ||
surveyView.fourthButton.setButtonText(buttonTitle: StringLiteral.PeriodSelect.fourthSelect) | ||
} | ||
} | ||
|
||
extension SelectTotalTimeController: NextViewPushDelegate { | ||
func didTapButton() { | ||
let nextViewController = ApprovePermisionController() | ||
self.navigationController?.pushViewController(nextViewController, animated: false) | ||
} | ||
} |
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