Skip to content

Commit

Permalink
Merge pull request #1272 from wakmusic/1268-playtype-toggle-button-ui
Browse files Browse the repository at this point in the history
๐Ÿ”€ :: (#1268) ์žฌ์ƒ ๋ฐฉ์‹ ํ† ๊ธ€ ๋ฒ„ํŠผ UI ์ˆ˜์ •
  • Loading branch information
youn9k authored Aug 31, 2024
2 parents 2f44504 + 16929a3 commit 06cc25b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ private extension PlayTypeTogglePopupViewController {

firstDotImageView.snp.makeConstraints {
$0.size.equalTo(16)
$0.top.equalTo(secondItemButton.snp.bottom).offset(8)
$0.top.equalTo(secondItemButton.snp.bottom).offset(12)
$0.left.equalToSuperview().offset(20)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ final class PlayTypeTogglePopupItemButtonView: UIView {
$0.layer.borderColor = DesignSystemAsset.BlueGrayColor.gray200.color.cgColor
$0.layer.borderWidth = 1
$0.backgroundColor = .white
$0.layer.addShadow(
color: UIColor(hex: "#080F34"),
alpha: 0.08,
x: 0,
y: 2,
blur: 4,
spread: 0
)
}

private let titleLabel = WMLabel(
Expand All @@ -23,7 +31,7 @@ final class PlayTypeTogglePopupItemButtonView: UIView {
)

private let imageView = UIImageView().then {
$0.image = DesignSystemAsset.MyInfo.donut.image
$0.image = DesignSystemAsset.Storage.checkBox.image
$0.contentMode = .scaleAspectFit
}

Expand Down Expand Up @@ -92,20 +100,22 @@ private extension PlayTypeTogglePopupItemButtonView {
guard let self else { return }

self.baseView.layer.borderColor = isSelected ?
DesignSystemAsset.PrimaryColorV2.point.color.cgColor :
DesignSystemAsset.BlueGrayColor.blueGray200.color.cgColor
DesignSystemAsset.PrimaryColorV2.decrease.color.cgColor :
DesignSystemAsset.BlueGrayColor.blueGray200.color.withAlphaComponent(0.4).cgColor

self.baseView.layer.borderWidth = isSelected ? 2 : 1
self.baseView.layer.shadowOpacity = isSelected ? 0.08 : 0
}

self.imageView.image = isSelected ?
DesignSystemAsset.MyInfo.donutColor.image :
DesignSystemAsset.MyInfo.donut.image
DesignSystemAsset.Storage.checkBox.image : nil

let font = isSelected ?
UIFont.WMFontSystem.t5(weight: .medium) :
UIFont.WMFontSystem.t5(weight: .light)
self.titleLabel.setFont(font)
self.titleLabel.textColor = isSelected ?
DesignSystemAsset.PrimaryColorV2.decrease.color :
DesignSystemAsset.BlueGrayColor.blueGray900.color
}

func setActions() {
Expand Down

0 comments on commit 06cc25b

Please sign in to comment.