Skip to content

Commit

Permalink
[Feat] dim apply (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
yurim830 committed Jan 15, 2025
1 parent 8f41b87 commit a6cfbf7
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class SpotListCollectionViewCell: BaseCollectionViewCell {
// MARK: - UI Properties

private let bgImage = UIImageView()
private let dimImage = UIImageView()

private let matchingRateView = UIView()
private let matchingRateLabel = UILabel()
Expand All @@ -35,6 +36,7 @@ class SpotListCollectionViewCell: BaseCollectionViewCell {
super.setHierarchy()

self.addSubviews(bgImage,
dimImage,
matchingRateView,
stackView)

Expand All @@ -57,6 +59,10 @@ class SpotListCollectionViewCell: BaseCollectionViewCell {
$0.edges.equalToSuperview()
}

dimImage.snp.makeConstraints {
$0.edges.equalTo(bgImage)
}

matchingRateView.snp.makeConstraints {
$0.leading.top.equalToSuperview().offset(16)
$0.width.equalTo(96)
Expand All @@ -80,9 +86,15 @@ class SpotListCollectionViewCell: BaseCollectionViewCell {
backgroundColor = .clear

bgImage.do {
$0.clipsToBounds = true
$0.contentMode = .scaleAspectFill
$0.layer.cornerRadius = 6
}

dimImage.do {
$0.clipsToBounds = true
$0.image = .dimGra2
$0.layer.cornerRadius = 6
}

matchingRateView.do {
Expand Down

0 comments on commit a6cfbf7

Please sign in to comment.