Skip to content

Commit

Permalink
[Fix] Health-Food-Me#252 - 리뷰 쓰기 버튼 비율로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
yungu0010 committed Sep 9, 2022
1 parent 41b8127 commit 07035a9
Showing 1 changed file with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,19 +154,24 @@ extension MainDetailVC {
view.addSubviews(mainTableView,bottomView)
let bottomSafeArea = safeAreaBottomInset()

let reviewWriteButtonWidth = UIScreen.main.bounds.width * (335 / 375)
let reviewWriteButtonHeight = reviewWriteButtonWidth * (44/335)


if UIDevice.current.hasNotch {
reviewWriteCTAButton.snp.makeConstraints { make in
make.top.equalToSuperview().offset(8)
make.leading.equalToSuperview().offset(20)
make.trailing.equalToSuperview().offset(-20)
make.height.equalTo(40)
make.centerX.equalToSuperview()
make.width.equalTo(reviewWriteButtonWidth)
make.height.equalTo(reviewWriteButtonHeight)
}
} else {
reviewWriteCTAButton.snp.makeConstraints { make in
make.bottom.equalToSuperview().offset(-21)
make.leading.equalToSuperview().offset(20)
make.trailing.equalToSuperview().offset(-20)
make.height.equalTo(40)
make.centerX.equalToSuperview()
make.width.equalTo(reviewWriteButtonWidth)
make.height.equalTo(reviewWriteButtonHeight)

}
}

Expand Down

0 comments on commit 07035a9

Please sign in to comment.