Skip to content

Commit

Permalink
Merge pull request #153 from boostcampwm-2022/feature/fix-login-view
Browse files Browse the repository at this point in the history
Login View 수정
  • Loading branch information
radiantchoi authored Dec 6, 2022
2 parents fcdb432 + 98f539b commit 6a6653b
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions Segno/Segno/Presentation/ViewController/LoginViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ final class LoginViewController: UIViewController {
static let buttonHeight: CGFloat = 50
static let buttonRadius: CGFloat = 20
static let footerBottomOffset: CGFloat = -100
static let footerHeight: CGFloat = 50
static let inset: CGFloat = 20
static let subTitleFontSize: CGFloat = 30
static let subTitleHeight: CGFloat = 50
Expand Down Expand Up @@ -82,9 +83,9 @@ final class LoginViewController: UIViewController {

private lazy var buttonStack = {
let stackView = UIStackView()
stackView.alignment = .center
stackView.alignment = .bottom
stackView.axis = .vertical
stackView.distribution = .equalSpacing
stackView.distribution = .equalCentering
stackView.spacing = Metric.inset
return stackView
}()
Expand All @@ -97,6 +98,14 @@ final class LoginViewController: UIViewController {
return label
}()

private lazy var buttonStackHolder: UIView = {
let view = UIView()

view.backgroundColor = .clear

return view
}()

// MARK: - initializer
init(viewModel: LoginViewModel = LoginViewModel()) {
self.viewModel = viewModel
Expand Down Expand Up @@ -166,7 +175,7 @@ final class LoginViewController: UIViewController {
buttonStack.addArrangedSubview($0)
}

[titleLabel, subTitleLabel, buttonStack, footerLabel].forEach {
[titleLabel, subTitleLabel, buttonStack, footerLabel, buttonStackHolder].forEach {
view.addSubview($0)

$0.snp.makeConstraints { make in
Expand All @@ -186,11 +195,17 @@ final class LoginViewController: UIViewController {
}

footerLabel.snp.makeConstraints { make in
make.height.equalTo(Metric.footerHeight)
make.bottom.equalToSuperview().offset(Metric.footerBottomOffset)
}

buttonStack.snp.makeConstraints { make in
buttonStackHolder.snp.makeConstraints { make in
make.top.equalTo(subTitleLabel.snp.bottom)
make.bottom.equalTo(footerLabel.snp.top)
}

buttonStack.snp.makeConstraints { make in
make.centerY.equalTo(buttonStackHolder.snp.centerY)
}

buttonStack.arrangedSubviews.forEach {
Expand Down

0 comments on commit 6a6653b

Please sign in to comment.