Skip to content

Commit

Permalink
✅[CHORE] : #139 코드 정리, 중복삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
comeheredart committed Oct 9, 2021
1 parent 1983ace commit 3602608
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 21 deletions.
19 changes: 3 additions & 16 deletions ChaRo-iOS/ChaRo-iOS/Source/Views/VCs/SignScene/JoinVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -86,29 +86,23 @@ class JoinVC: UIViewController {

private func configureClosure() {
emailView.nextButton.nextPageClosure = {
if self.emailView.DuplicateCheck && self.emailView.ValidateCheck {
self.showView(number: 2)
self.moveCar(toPage: 2)
}
}

emailView.stickyNextButton.nextPageClosure = {
if self.emailView.DuplicateCheck && self.emailView.ValidateCheck {
self.showView(number: 2)
self.moveCar(toPage: 2)
}
}

passwordView.nextButton.nextPageClosure = {
if self.passwordView.passwordInputView.isFirstPassed && self.passwordView.passwordInputView.isSecondPassed {
self.showView(number: 3)
self.moveCar(toPage: 3)
}
}

passwordView.stickyNextButton.nextPageClosure = {
if self.passwordView.passwordInputView.isFirstPassed && self.passwordView.passwordInputView.isSecondPassed {
self.showView(number: 3)
self.moveCar(toPage: 3)
}
}

profileView.nextButton.nextPageClosure = {
Expand All @@ -117,14 +111,12 @@ class JoinVC: UIViewController {
}

profileView.stickyNextButton.nextPageClosure = {
if self.profileView.isNicknamePassed {
self.showView(number: 4)
self.moveCar(toPage: 4)
}
}

contractView.nextButton.nextPageClosure = {

//회원가입 요청
let userEmail = self.emailView.emailInputView.inputTextField?.text
let password = self.passwordView.passwordInputView.secondTextField.text
let nickname = self.profileView.nicknameView.inputTextField?.text
Expand All @@ -139,13 +131,8 @@ class JoinVC: UIViewController {
marketingPush: marketingPush,
marketingEmail: marketingEmail,
image: (image ?? UIImage(named: "icProfile"))!)


}

contractView.stickyNextButton.nextPageClosure = {
self.navigationController?.popViewController(animated: true)
}
}

//MARK: - Custom 함수
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ class JoinContractView: UIView {
var agreeEmailButton = JoinAgreeButton(isBig: false)

let nextButton = NextButton(isSticky: false, isTheLast: true)
let stickyNextButton = NextButton(isSticky: true, isTheLast: true)


//MARK: - Life Cycle
Expand All @@ -53,16 +52,12 @@ class JoinContractView: UIView {

private func makeButtonBlue() {
self.nextButton.backgroundColor = .mainBlue
self.stickyNextButton.backgroundColor = .mainBlue
nextButton.isEnabled = true
stickyNextButton.isEnabled = true
}

private func makeButtonsGray() {
nextButton.backgroundColor = .gray30
stickyNextButton.backgroundColor = .gray30
nextButton.isEnabled = false
stickyNextButton.isEnabled = false
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,15 @@ class JoinEmailView: UIView, UITextFieldDelegate {
private func makeButtonsBlue() {
nextButton.backgroundColor = .mainBlue
stickyNextButton.backgroundColor = .mainBlue
nextButton.isEnabled = true
stickyNextButton.isEnabled = true
}

private func makeButtonsGray() {
nextButton.backgroundColor = .gray30
stickyNextButton.backgroundColor = .gray30
nextButton.isEnabled = false
stickyNextButton.isEnabled = false
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,15 @@ class JoinPasswordView: UIView {
private func makeButtonsBlue() {
nextButton.backgroundColor = .mainBlue
stickyNextButton.backgroundColor = .mainBlue
nextButton.isEnabled = true
stickyNextButton.isEnabled = true
}

private func makeButtonsGray() {
nextButton.backgroundColor = .gray30
stickyNextButton.backgroundColor = .gray30
nextButton.isEnabled = false
stickyNextButton.isEnabled = false
}

}

0 comments on commit 3602608

Please sign in to comment.