Skip to content

Commit

Permalink
✨[FEAT] : #139 약관동의뷰 UI 수정, 실제 로직 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
comeheredart committed Oct 9, 2021
1 parent 5cea0e2 commit c45fdf2
Showing 1 changed file with 23 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import UIKit

class JoinContractView: UIView {


//MARK: - UI Variables
var contractLabel = JoinTitleLabel(type: .boldTitle, title: "약관동의")

let contractBackgroundImageView = UIImageView().then {
Expand All @@ -33,6 +35,8 @@ class JoinContractView: UIView {
let nextButton = NextButton(isSticky: false, isTheLast: true)
let stickyNextButton = NextButton(isSticky: true, isTheLast: true)


//MARK: - Life Cycle
override init(frame: CGRect) {
super.init(frame: frame)
}
Expand All @@ -47,6 +51,22 @@ class JoinContractView: UIView {
configureUI()
}

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
}


//MARK: - configure 함수
private func configureUI() {

self.addSubviews([contractLabel, contractInputView, nextButton])
Expand All @@ -70,8 +90,7 @@ class JoinContractView: UIView {
agreeEmailLabel,
agreeAllButton,
agreePushButton,
agreeEmailButton,
nextButton])
agreeEmailButton])

contractBackgroundImageView.snp.makeConstraints {
$0.top.bottom.leading.trailing.equalToSuperview()
Expand Down Expand Up @@ -124,6 +143,8 @@ class JoinContractView: UIView {
$0.height.equalTo(48)
$0.leading.trailing.equalTo(contractLabel)
}

makeButtonBlue()

}

Expand Down

0 comments on commit c45fdf2

Please sign in to comment.