Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Pyonsnal-Color/Pyonsnal-Color.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@
F0687BED2A529679004B5EAE /* Config.swift in Sources */ = {isa = PBXBuildFile; fileRef = F0687BEC2A529679004B5EAE /* Config.swift */; };
F068A9702A99E76A000AFD52 /* FilterRenderable.swift in Sources */ = {isa = PBXBuildFile; fileRef = F068A96F2A99E76A000AFD52 /* FilterRenderable.swift */; };
F069DBE62A30B9850001D3DD /* UIFont+.swift in Sources */ = {isa = PBXBuildFile; fileRef = F069DBE52A30B9850001D3DD /* UIFont+.swift */; };
F06E3DA32C0C76F900D6C195 /* ProductTastesTagView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F06E3DA22C0C76F900D6C195 /* ProductTastesTagView.swift */; };
F06E3D982C0C428D00D6C195 /* ActionButtonCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F06E3D972C0C428D00D6C195 /* ActionButtonCell.swift */; };
F06F40292B35E2FC00897396 /* AdMobManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = F06F40282B35E2FC00897396 /* AdMobManager.swift */; };
F06F40322B35EE2800897396 /* CurationAdCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F06F40312B35EE2800897396 /* CurationAdCell.swift */; };
Expand Down Expand Up @@ -620,6 +621,7 @@
F069DBE92A30BA8C0001D3DD /* Pretendard-Regular.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Pretendard-Regular.otf"; sourceTree = "<group>"; };
F069DBEA2A30BA8C0001D3DD /* Pretendard-SemiBold.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Pretendard-SemiBold.otf"; sourceTree = "<group>"; };
F06E3D972C0C428D00D6C195 /* ActionButtonCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ActionButtonCell.swift; sourceTree = "<group>"; };
F06E3DA22C0C76F900D6C195 /* ProductTastesTagView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProductTastesTagView.swift; sourceTree = "<group>"; };
F06F40282B35E2FC00897396 /* AdMobManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdMobManager.swift; sourceTree = "<group>"; };
F06F40312B35EE2800897396 /* CurationAdCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CurationAdCell.swift; sourceTree = "<group>"; };
F06F40362B37361500897396 /* NativeAdView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NativeAdView.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1305,6 +1307,7 @@
BA87E3DF2A462AD9000A9DEC /* ProductTagListView.swift */,
BA87E3D42A45D400000A9DEC /* GiftItemView.swift */,
BA87E3D62A45D40A000A9DEC /* GiftInformationView.swift */,
F06E3DA22C0C76F900D6C195 /* ProductTastesTagView.swift */,
);
path = ProductDetail;
sourceTree = "<group>";
Expand Down Expand Up @@ -2223,6 +2226,7 @@
B2F258192AAF03160022013E /* DetailReviewInteractor.swift in Sources */,
B2EECB772B6A896600B328C1 /* LoginPopupViewHolder.swift in Sources */,
F0A8A3B02A70053D00601DAE /* FilterType.swift in Sources */,
F06E3DA32C0C76F900D6C195 /* ProductTastesTagView.swift in Sources */,
F06F40322B35EE2800897396 /* CurationAdCell.swift in Sources */,
BA87E3D72A45D40A000A9DEC /* GiftInformationView.swift in Sources */,
F0B90DCC2ADD2167005DE34A /* FavoriteHomePageViewController.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
//
// ProductTastesView.swift
// Pyonsnal-Color
//
// Created by 조소정 on 6/2/24.
//

import UIKit
import SnapKit

final class ProductTastesTagView: UIView {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

상품 취향, 태그 관련해서 ProductTastes네이밍 가져가면 될것 같네요~!👍

// MARK: - Initializer
init(text: String) {
super.init(frame: .zero)
configureUI()
configureView()
configureConstraint()
setText(with: text)
}

required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}

private var tastesTagLabel: UILabel = {
let label = UILabel()
label.textColor = .red500
label.font = .body3r
return label
}()

private func setText(with text: String) {
self.tastesTagLabel.text = text
}

private func configureUI() {
self.backgroundColor = .red100
}
Comment on lines +36 to +38
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[C]
태그의 배경 뷰에 makeRounded() 필요한거로 알고있습니다~!


private func configureView() {
self.addSubview(tastesTagLabel)
}

private func configureConstraint() {
tastesTagLabel.snp.makeConstraints {
$0.top.equalToSuperview().offset(.spacing2)
$0.bottom.equalToSuperview().inset(.spacing2)
$0.leading.equalToSuperview().inset(.spacing8)
$0.trailing.equalToSuperview().inset(.spacing8)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@ extension ProductDetailInformationCell {
return label
}()

let productTastesTagStackView: UIStackView = {
let stackView = UIStackView()
stackView.axis = .horizontal
stackView.spacing = .spacing4
return stackView
}()

let giftInformationView: GiftInformationView = {
let giftInformationView: GiftInformationView = .init()
return giftInformationView
Expand All @@ -87,6 +94,7 @@ extension ProductDetailInformationCell {
textContainerView.addSubview(productNameLabel)
textContainerView.addSubview(productPriceLabel)
textContainerView.addSubview(productDescriptionLabel)
textContainerView.addSubview(productTastesTagStackView)
textContainerView.addSubview(giftInformationView)
}

Expand Down Expand Up @@ -120,8 +128,13 @@ extension ProductDetailInformationCell {
make.leading.trailing.equalToSuperview()
}

productTastesTagStackView.snp.makeConstraints { make in
make.top.equalTo(productDescriptionLabel.snp.bottom).offset(.spacing16)
make.leading.trailing.equalToSuperview()
}

giftInformationView.snp.makeConstraints { make in
make.top.equalTo(productDescriptionLabel.snp.bottom).offset(.spacing40)
make.top.equalTo(productTastesTagStackView.snp.bottom).offset(.spacing40)
make.leading.trailing.equalToSuperview()
make.bottom.equalToSuperview()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ final class ProductDetailInformationCell: UICollectionViewCell {
return
}

// TODO: if let has tastesTags
setTastesTag()

if let gift = payload.productDetail.gift {
viewHolder.giftInformationView.isHidden = false
viewHolder.productDescriptionLabel.snp.remakeConstraints { make in
Expand Down Expand Up @@ -84,4 +87,15 @@ final class ProductDetailInformationCell: UICollectionViewCell {
viewHolder.productPriceLabel.text = productDetail.price
viewHolder.productDescriptionLabel.text = productDetail.description
}

private func setTastesTag() {
viewHolder.productTastesTagStackView.arrangedSubviews.forEach { $0.removeFromSuperview() }

let tagList = ["카페인러버", "헬창", "캐릭터컬렉터", "카페인러버", "헬창", "캐릭터컬렉터"]
tagList.map { "# \($0)" }
.forEach { tagText in
let tastesTagView = ProductTastesTagView(text: tagText)
viewHolder.productTastesTagStackView.addArrangedSubview(tastesTagView)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ protocol ProfileHomeListener: AnyObject {
final class ProfileHomeInteractor: PresentableInteractor<ProfileHomePresentable>,
ProfileHomeInteractable,
ProfileHomePresentableListener {

weak var router: ProfileHomeRouting?
weak var listener: ProfileHomeListener?
private var cancellable = Set<AnyCancellable>()
Expand Down