Skip to content

Commit

Permalink
[Fix] 관심장르 empty인 경우 separator 위치 조정 (#140)
Browse files Browse the repository at this point in the history
* [Fix] 관심장르 empty인 경우 separator 위치 조정

관심 장르 empty인 경우 label에 " " 넣어줘 라벨 크기 갖도록 해 separator 위치 조정

* [fix] genreView의 최소 높이 constraint 추가

minHeight = genreLabel height + top inset + bottom inset
  • Loading branch information
JongHoooon authored Jul 15, 2023
1 parent 2b45f9c commit f1d37d8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
1 change: 1 addition & 0 deletions Sinzak/Scene/MyProfile/EditProfile/VC/EditProfileVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ final class EditProfileVC: SZVC {
let genres: String = genres
.map { $0.text }
.joined(separator: "\n")

owner.mainView.genreNameLabel.text = genres
})
.disposed(by: disposeBag)
Expand Down
14 changes: 6 additions & 8 deletions Sinzak/Scene/MyProfile/EditProfile/View/EditProfileView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ final class EditProfileView: SZView {
.joined(separator: "\n")

genreNameLabel.text = categoryLike

applyAuthorButton.isEnabled = !profile.certAuthor
applyAuthorButton.isEnabled = !profile.certAuthor
}

// MARK: - Design Helpers
Expand Down Expand Up @@ -337,22 +337,20 @@ final class EditProfileView: SZView {
make.height.equalTo(0.5)
}
genreView.snp.makeConstraints { make in
let minHeight = 16.0 + 19.0 + 19.0

make.leading.trailing.equalToSuperview()
make.bottom.equalTo(genreNameLabel.snp.bottom).offset(20.0)
make.height.greaterThanOrEqualTo(minHeight)
}
genreLabel.snp.makeConstraints { make in
make.leading.top.equalToSuperview().inset(19)
}
genreNameLabel.snp.makeConstraints { make in
make.top.equalTo(genreLabel)
make.leading.equalTo(genreLabel.snp.trailing).offset(30)
make.trailing.lessThanOrEqualTo(changeGenreButton.snp.leading).offset(-10)
make.trailing.equalTo(changeGenreButton.snp.leading).offset(-10)
}
genreNameLabel.setContentCompressionResistancePriority(
.defaultLow,
for: .horizontal
)

changeGenreButton.snp.makeConstraints { make in
make.trailing.equalToSuperview().inset(24)
make.width.equalTo(72)
Expand Down

0 comments on commit f1d37d8

Please sign in to comment.