diff --git a/Oliveyoung-iOS/Oliveyoung-iOS.xcodeproj/project.pbxproj b/Oliveyoung-iOS/Oliveyoung-iOS.xcodeproj/project.pbxproj index 07d13a0..c021378 100644 --- a/Oliveyoung-iOS/Oliveyoung-iOS.xcodeproj/project.pbxproj +++ b/Oliveyoung-iOS/Oliveyoung-iOS.xcodeproj/project.pbxproj @@ -7,6 +7,8 @@ objects = { /* Begin PBXBuildFile section */ + 37E0023329262A1A00283615 /* TagCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37E0023229262A1A00283615 /* TagCollectionViewCell.swift */; }; + 37E0023529262A2800283615 /* ProductCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37E0023429262A2800283615 /* ProductCollectionViewCell.swift */; }; DD0FC2962924C38500ACF342 /* DetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD0FC2952924C38500ACF342 /* DetailViewController.swift */; }; DD0FC2982924C39800ACF342 /* SearchResultViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD0FC2972924C39800ACF342 /* SearchResultViewController.swift */; }; DD0FC29A2924C39E00ACF342 /* SearchViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD0FC2992924C39E00ACF342 /* SearchViewController.swift */; }; @@ -31,6 +33,8 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 37E0023229262A1A00283615 /* TagCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TagCollectionViewCell.swift; sourceTree = ""; }; + 37E0023429262A2800283615 /* ProductCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProductCollectionViewCell.swift; sourceTree = ""; }; DD0FC2952924C38500ACF342 /* DetailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DetailViewController.swift; sourceTree = ""; }; DD0FC2972924C39800ACF342 /* SearchResultViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchResultViewController.swift; sourceTree = ""; }; DD0FC2992924C39E00ACF342 /* SearchViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchViewController.swift; sourceTree = ""; }; @@ -216,6 +220,8 @@ isa = PBXGroup; children = ( DD0FC2952924C38500ACF342 /* DetailViewController.swift */, + 37E0023229262A1A00283615 /* TagCollectionViewCell.swift */, + 37E0023429262A2800283615 /* ProductCollectionViewCell.swift */, ); path = Detail; sourceTree = ""; @@ -311,11 +317,13 @@ DD0FC29C2924C3A500ACF342 /* HomeViewController.swift in Sources */, DDC28C7D29232CD6003B87BB /* UIImageView+.swift in Sources */, DDC28C8329232D75003B87BB /* Identifier.swift in Sources */, + 37E0023329262A1A00283615 /* TagCollectionViewCell.swift in Sources */, DD0FC29A2924C39E00ACF342 /* SearchViewController.swift in Sources */, DDC28C52292320E0003B87BB /* AppDelegate.swift in Sources */, DDC28C8729232E0E003B87BB /* UIView+.swift in Sources */, DDC28C54292320E0003B87BB /* SceneDelegate.swift in Sources */, DD0FC2982924C39800ACF342 /* SearchResultViewController.swift in Sources */, + 37E0023529262A2800283615 /* ProductCollectionViewCell.swift in Sources */, DDC28C7F29232D27003B87BB /* Const.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/Oliveyoung-iOS/Oliveyoung-iOS/Source/Presentation/Detail/DetailViewController.swift b/Oliveyoung-iOS/Oliveyoung-iOS/Source/Presentation/Detail/DetailViewController.swift index 490887d..01ee92d 100644 --- a/Oliveyoung-iOS/Oliveyoung-iOS/Source/Presentation/Detail/DetailViewController.swift +++ b/Oliveyoung-iOS/Oliveyoung-iOS/Source/Presentation/Detail/DetailViewController.swift @@ -24,7 +24,10 @@ final class DetailViewController: UIViewController { //MARK: - Components - private let productContainerView = UIView() + private let productContainerView = UIView().then { + $0.backgroundColor = .red + } + private let deliveryContainerView = UIView() private let availableStoreContainerView = UIView() private let productDetailContainerView = UIView() @@ -35,27 +38,94 @@ final class DetailViewController: UIViewController { private let searchButton = UIButton() private let cartButton = UIButton() private let brandButton = UIButton() + private let heartButton = UIButton() + private let purchaseButton = UIButton() + + private let brandLabel = UILabel().then { + $0.font = .systemFont(ofSize: 12, weight: .regular) + $0.textColor = 0x2F2F2F.color + $0.text = "에스트라" + } + + private let productLabel = UILabel().then { + $0.font = .systemFont(ofSize: 22, weight: .medium) + $0.textColor = 0x2F2F2F.color + + } + + private let priceLabel = UILabel().then { + $0.font = .systemFont(ofSize: 22, weight: .medium) + $0.textColor = 0x2F2F2F.color + } + + private let originalPriceLabel = UILabel().then { + $0.font = .systemFont(ofSize: 12, weight: .medium) + $0.textColor = 0xEBEBEB.color } + + private let discountLabel = UILabel().then { + $0.font = .systemFont(ofSize: 22, weight: .medium) + $0.textColor = 0xF87171.color + } + + private let rateLabel = UILabel().then { + $0.font = .systemFont(ofSize: 12, weight: .medium) + $0.textColor = 0x2F2F2F.color + } - private let brandLabel = UILabel() - private let productLabel = UILabel() - private let priceLabel = UILabel() - private let originalPriceLabel = UILabel() - private let discountLabel = UILabel() - private let rateLabel = UILabel() - private let rateCountLabel = UILabel() - private let productTypeLabel = UILabel() - private let shippingLabel = UILabel() - private let shippingPriceLabel = UILabel() - private let freeShippingLabel = UILabel() - private let overnightShippingLabel = UILabel() - private let overnightPriceLabel = UILabel() - private let overnightTimeLabel = UILabel() - - private let availableStoreLabel = UILabel() - private let storeStatusLabel = UILabel() - private let stockLabel = UILabel() +// private let rateCountLabel = UILabel().then { +// $0.textColor = 0x +// } +// +// private let productTypeLabel = UILabel().then { +// $0.textColor = 0x +// } +// +// private let shippingLabel = UILabel().then { +// $0.textColor = 0x +// } +// +// private let shippingPriceLabel = UILabel().then { +// $0.textColor = 0x +// } +// +// private let freeShippingLabel = UILabel().then { +// $0.textColor = 0x +// } +// +// private let overnightShippingLabel = UILabel().then { +// $0.textColor = 0x +// } +// +// private let overnightPriceLabel = UILabel().then { +// $0.textColor = 0x +// } +// +// private let overnightTimeLabel = UILabel().then { +// $0.textColor = 0x +// } +// +// private let minuteLabel = UILabel().then { +// $0.textColor = 0x +// } +// +// private let hourLable = UILabel().then { +// $0.textColor = 0x +// } +// +// private let availableStoreLabel = UILabel().then { +// $0.textColor = 0x +// } +// +// private let storeStatusLabel = UILabel().then { +// $0.textColor = 0x +// } +// +// private let stockLabel = UILabel().then { +// $0.textColor = 0x +// } private let productImageView = UIImage() + private let searchImageView = UIImage() //MARK: - Variables @@ -65,8 +135,9 @@ final class DetailViewController: UIViewController { //MARK: - Life Cycles override func viewDidLoad() { super.viewDidLoad() +// buttonConfig() layout() - configDelegate() +// configDelegate() } } @@ -75,24 +146,44 @@ extension DetailViewController { //MARK: - Layout Helpers private func layout() { + // view.addSubviews(productContainerView, deliveryContainerView, availableStoreContainerView, productDetailContainerView, productRecommandContainerView, relatedProductContainerView) + view.addSubview(productContainerView) + productContainerView.snp.makeConstraints { + $0.top.leading.trailing.equalTo(view.safeAreaLayoutGuide) + $0.height.equalTo(60) + } } //MARK: - General Helpers - private func configDelegate() { - - } +// private func buttonConfig(){ +// backButton.setImage(UIImage(named: <#T##String#>), for: .normal) +// searchButton.setImage(UIImage(named: "searchIcon24X24"), for: .normal) +// cartButton.setImage(UIImage(named: "shoppingBag22X22"), for: .normal) +// brandButton.setImage(UIImage(named: "chevron12X12"), for: .normal) +//// heartButton.setImage(UIImage(named: <#T##String#>), for: .normal) +// purchaseButton.setTitle("구매하기", for: .normal) +// } + +// private func labelConfig() { +// brandLabel. +// } + +// private func configDelegate() { +// +// } //MARK: - Action Helpers } -//MARK: - UICollectionViewDelegateFlowLayout -extension DetailViewController: UICollectionViewDelegateFlowLayout { - -} -//MARK: - UICollectionViewDataSource +////MARK: - UICollectionViewDelegateFlowLayout +//extension DetailViewController: UICollectionViewDelegateFlowLayout { +// +//} +// +////MARK: - UICollectionViewDataSource //extension DetailViewController: UICollectionViewDataSource { // func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { // <#code#> @@ -102,5 +193,4 @@ extension DetailViewController: UICollectionViewDelegateFlowLayout { // <#code#> // } // -// //} diff --git a/Oliveyoung-iOS/Oliveyoung-iOS/Source/Presentation/Detail/ProductCollectionViewCell.swift b/Oliveyoung-iOS/Oliveyoung-iOS/Source/Presentation/Detail/ProductCollectionViewCell.swift new file mode 100644 index 0000000..a4762b8 --- /dev/null +++ b/Oliveyoung-iOS/Oliveyoung-iOS/Source/Presentation/Detail/ProductCollectionViewCell.swift @@ -0,0 +1,12 @@ +// +// ProductCollectionViewCell.swift +// Oliveyoung-iOS +// +// Created by Joon Baek on 2022/11/17. +// + +import UIKit + +final class ProductCollectionViewCell: UICollectionViewCell { + +} diff --git a/Oliveyoung-iOS/Oliveyoung-iOS/Source/Presentation/Detail/TagCollectionViewCell.swift b/Oliveyoung-iOS/Oliveyoung-iOS/Source/Presentation/Detail/TagCollectionViewCell.swift new file mode 100644 index 0000000..6c7925a --- /dev/null +++ b/Oliveyoung-iOS/Oliveyoung-iOS/Source/Presentation/Detail/TagCollectionViewCell.swift @@ -0,0 +1,12 @@ +// +// TagCollectionViewCell.swift +// Oliveyoung-iOS +// +// Created by Joon Baek on 2022/11/17. +// + +import UIKit + +final class TagCollectionViewCell: UICollectionViewCell { + +}