Skip to content

Commit

Permalink
Merge pull request #260 from TeamChaRo/feature/249_Edit_UI
Browse files Browse the repository at this point in the history
[FIX] 약관동의 뷰, 세부 UI 변경
  • Loading branch information
comeheredart committed Jun 28, 2022
2 parents 61b9711 + e53858a commit 0771f3b
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,23 @@ import UIKit

class JoinAgreeButton: UIButton {

var Agreed = false
var agreed: Bool = false {
willSet(newVal) {
if isBig {
if newVal {
self.setBackgroundImage(UIImage(named: "icSignupAgreeBig"), for: .normal)
} else {
self.setBackgroundImage(UIImage(named: "icSignupDisagreeBig"), for: .normal)
}
} else {
if newVal {
self.setBackgroundImage(UIImage(named: "icSignupAgreeSmall"), for: .normal)
} else {
self.setBackgroundImage(UIImage(named: "icSignupDisagreeSmall"), for: .normal)
}
}
}
}
var isBig = false

override init(frame: CGRect) {
Expand All @@ -32,34 +48,10 @@ class JoinAgreeButton: UIButton {
}

self.addTarget(self, action: #selector(buttonClicked), for: .touchUpInside)


}

@objc func buttonClicked() {

switch isBig {
case true:
Agreed = !Agreed
if Agreed {
self.setBackgroundImage(UIImage(named: "icSignupAgreeBig"), for: .normal)
} else {
self.setBackgroundImage(UIImage(named: "icSignupDisagreeBig"), for: .normal)
}

case false:
Agreed = !Agreed
if Agreed {
self.setBackgroundImage(UIImage(named: "icSignupAgreeSmall"), for: .normal)
} else {
self.setBackgroundImage(UIImage(named: "icSignupDisagreeSmall"), for: .normal)
}
}


agreed.toggle()
}




}
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ final class FindPasswordVC: UIViewController {
}

//MARK: - configure 함수
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
self.navigationView.endEditing(true)
}
private func configureDelegate() {
emailInputView.inputTextField?.delegate = self
}
Expand Down
4 changes: 2 additions & 2 deletions ChaRo-iOS/ChaRo-iOS/Source/Views/VCs/SignScene/JoinVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ class JoinVC: UIViewController {
let password = self.passwordView.passwordInputView.secondTextField.text
let nickname = self.profileView.nicknameView.inputTextField?.text
let image = self.profileView.profileView.profileImageView.image
let marketingPush = self.contractView.agreePushButton.Agreed
let marketingEmail = self.contractView.agreeEmailButton.Agreed
let marketingPush = self.contractView.agreePushButton.agreed
let marketingEmail = self.contractView.agreeEmailButton.agreed


self.postJoin(userEmail: userEmail!,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@ class SNSLoginVC: UIViewController {
self.navigationController?.pushViewController(nextVC, animated: true)

nextVC.contractView.nextButton.nextPageClosure = {
let isPushAgree = nextVC.contractView.agreePushButton.Agreed
let isEmailAgree = nextVC.contractView.agreeEmailButton.Agreed
let isPushAgree = nextVC.contractView.agreePushButton.agreed
let isEmailAgree = nextVC.contractView.agreeEmailButton.agreed

switch self.socialType {
case .apple:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ class JoinContractView: UIView {
}

@objc func allButtonClicked() {
agreePushButton.buttonClicked()
agreeEmailButton.buttonClicked()
agreePushButton.agreed = agreeAllButton.agreed
agreeEmailButton.agreed = agreeAllButton.agreed
}

//MARK: - configure 함수
Expand Down

0 comments on commit 0771f3b

Please sign in to comment.