From 3c29e02e168a6a6e1d445e9c79ab5811a495fea9 Mon Sep 17 00:00:00 2001 From: Hamp Date: Thu, 29 Aug 2024 21:12:33 +0900 Subject: [PATCH 1/3] =?UTF-8?q?:zap:=20::=20=ED=97=A4=EB=8D=94=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BaseFeature/Resources/Base.storyboard | 33 ++---------------- .../ContainSongsViewController.swift | 34 ++++++++++++++++--- .../PlaylistViewController.swift | 6 ++-- ...iewModel.swift => PlaylistViewModel.swift} | 2 +- 4 files changed, 36 insertions(+), 39 deletions(-) rename Projects/Features/PlaylistFeature/Sources/ViewModels/{PlayListViewModel.swift => PlaylistViewModel.swift} (99%) diff --git a/Projects/Features/BaseFeature/Resources/Base.storyboard b/Projects/Features/BaseFeature/Resources/Base.storyboard index e867030f0..ddf71784d 100644 --- a/Projects/Features/BaseFeature/Resources/Base.storyboard +++ b/Projects/Features/BaseFeature/Resources/Base.storyboard @@ -152,32 +152,8 @@ - - - - - - - - - - - - - - - + @@ -266,16 +242,13 @@ - + - - - @@ -283,8 +256,6 @@ - - diff --git a/Projects/Features/BaseFeature/Sources/ViewControllers/ContainSongsViewController.swift b/Projects/Features/BaseFeature/Sources/ViewControllers/ContainSongsViewController.swift index 5ed8a1169..2a2d5d13f 100644 --- a/Projects/Features/BaseFeature/Sources/ViewControllers/ContainSongsViewController.swift +++ b/Projects/Features/BaseFeature/Sources/ViewControllers/ContainSongsViewController.swift @@ -15,9 +15,9 @@ public final class ContainSongsViewController: BaseViewController, ViewControlle @IBOutlet weak var titleLabel: UILabel! @IBOutlet weak var tableView: UITableView! @IBOutlet weak var indicator: NVActivityIndicatorView! - @IBOutlet weak var songCountLabel: UILabel! - @IBOutlet weak var subTitleLabel: UILabel! - + let containerView = UIView(frame: CGRect(x: .zero, y: .zero, width: APP_WIDTH(), height: 36)) + let songCountLabel: UILabel = UILabel() + let subTitleLabel: UILabel = UILabel() var multiPurposePopupFactory: MultiPurposePopupFactory! var textPopupFactory: TextPopupFactory! @@ -30,6 +30,8 @@ public final class ContainSongsViewController: BaseViewController, ViewControlle override public func viewDidLoad() { super.viewDidLoad() + addSubviews() + setLayout() configureUI() inputBind() outputBind() @@ -53,6 +55,26 @@ public final class ContainSongsViewController: BaseViewController, ViewControlle } extension ContainSongsViewController { + + private func addSubviews() { + containerView.addSubviews(songCountLabel, subTitleLabel) + tableView.tableHeaderView = containerView + } + + private func setLayout() { + + subTitleLabel.snp.makeConstraints { + $0.leading.equalTo(songCountLabel.snp.trailing) + $0.centerY.equalTo(songCountLabel.snp.centerY) + } + + songCountLabel.snp.makeConstraints { + $0.leading.equalTo(closeButton.snp.leading) + $0.centerY.equalToSuperview() + + } + } + private func inputBind() { tableView.rx.setDelegate(self).disposed(by: disposeBag) @@ -181,7 +203,9 @@ extension ContainSongsViewController { titleLabel.textColor = DesignSystemAsset.BlueGrayColor.gray900.color titleLabel.text = "리스트에 담기" titleLabel.setTextWithAttributes(kernValue: -0.5) - + + + // 24 , 12 songCountLabel.font = DesignSystemFontFamily.Pretendard.medium.font(size: 14) songCountLabel.textColor = DesignSystemAsset.PrimaryColor.point.color songCountLabel.text = "\(viewModel.songs.count)" @@ -196,6 +220,8 @@ extension ContainSongsViewController { indicator.color = DesignSystemAsset.PrimaryColor.point.color indicator.startAnimating() } + + } extension ContainSongsViewController: UITableViewDelegate { diff --git a/Projects/Features/PlaylistFeature/Sources/ViewControllers/PlaylistViewController.swift b/Projects/Features/PlaylistFeature/Sources/ViewControllers/PlaylistViewController.swift index 414a6bebf..2ac0bd8f7 100644 --- a/Projects/Features/PlaylistFeature/Sources/ViewControllers/PlaylistViewController.swift +++ b/Projects/Features/PlaylistFeature/Sources/ViewControllers/PlaylistViewController.swift @@ -181,7 +181,7 @@ private extension PlaylistViewController { }.store(in: &subscription) output.playlists - .map { [PlayListSectionModel.init(model: 0, items: $0)] } + .map { [PlaylistSectionModel.init(model: 0, items: $0)] } .do(afterNext: { [currentSongID, tableView = playlistView.playlistTableView] playListSectionModel in guard let currentSongID else { return } guard @@ -277,8 +277,8 @@ extension PlaylistViewController { private func createDatasources( output: PlaylistViewModel .Output - ) -> RxTableViewSectionedReloadDataSource { - let datasource = RxTableViewSectionedReloadDataSource( + ) -> RxTableViewSectionedReloadDataSource { + let datasource = RxTableViewSectionedReloadDataSource( configureCell: { [weak self] _, tableView, indexPath, model -> UITableViewCell in guard let self else { return UITableViewCell() } guard let cell = tableView.dequeueReusableCell( diff --git a/Projects/Features/PlaylistFeature/Sources/ViewModels/PlayListViewModel.swift b/Projects/Features/PlaylistFeature/Sources/ViewModels/PlaylistViewModel.swift similarity index 99% rename from Projects/Features/PlaylistFeature/Sources/ViewModels/PlayListViewModel.swift rename to Projects/Features/PlaylistFeature/Sources/ViewModels/PlaylistViewModel.swift index 6aee4d667..f51be9027 100644 --- a/Projects/Features/PlaylistFeature/Sources/ViewModels/PlayListViewModel.swift +++ b/Projects/Features/PlaylistFeature/Sources/ViewModels/PlaylistViewModel.swift @@ -7,7 +7,7 @@ import RxRelay import RxSwift import Utility -internal typealias PlayListSectionModel = SectionModel +internal typealias PlaylistSectionModel = SectionModel final class PlaylistViewModel: ViewModelType { struct Input { From 526808512633a38312a55e5938cca87309be4e3f Mon Sep 17 00:00:00 2001 From: yongbeomkwak Date: Thu, 29 Aug 2024 21:12:41 +0900 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=8E=A8=20::=20=EC=BD=94=EB=93=9C=20Fo?= =?UTF-8?q?rmatting=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ContainSongsViewController.swift | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/Projects/Features/BaseFeature/Sources/ViewControllers/ContainSongsViewController.swift b/Projects/Features/BaseFeature/Sources/ViewControllers/ContainSongsViewController.swift index 2a2d5d13f..c1fe771cf 100644 --- a/Projects/Features/BaseFeature/Sources/ViewControllers/ContainSongsViewController.swift +++ b/Projects/Features/BaseFeature/Sources/ViewControllers/ContainSongsViewController.swift @@ -55,26 +55,23 @@ public final class ContainSongsViewController: BaseViewController, ViewControlle } extension ContainSongsViewController { - private func addSubviews() { containerView.addSubviews(songCountLabel, subTitleLabel) tableView.tableHeaderView = containerView } - + private func setLayout() { - subTitleLabel.snp.makeConstraints { $0.leading.equalTo(songCountLabel.snp.trailing) $0.centerY.equalTo(songCountLabel.snp.centerY) } - + songCountLabel.snp.makeConstraints { $0.leading.equalTo(closeButton.snp.leading) $0.centerY.equalToSuperview() - } } - + private func inputBind() { tableView.rx.setDelegate(self).disposed(by: disposeBag) @@ -203,8 +200,7 @@ extension ContainSongsViewController { titleLabel.textColor = DesignSystemAsset.BlueGrayColor.gray900.color titleLabel.text = "리스트에 담기" titleLabel.setTextWithAttributes(kernValue: -0.5) - - + // 24 , 12 songCountLabel.font = DesignSystemFontFamily.Pretendard.medium.font(size: 14) songCountLabel.textColor = DesignSystemAsset.PrimaryColor.point.color @@ -220,8 +216,6 @@ extension ContainSongsViewController { indicator.color = DesignSystemAsset.PrimaryColor.point.color indicator.startAnimating() } - - } extension ContainSongsViewController: UITableViewDelegate { From 9411970d7d7290fbd4793b79da8a981bb140d716 Mon Sep 17 00:00:00 2001 From: Hamp Date: Fri, 30 Aug 2024 11:14:49 +0900 Subject: [PATCH 3/3] =?UTF-8?q?:zap:=20::=20=EA=B0=84=EA=B2=A9=20=EC=A1=B0?= =?UTF-8?q?=EC=A0=88=20=EB=B0=8F=20border=20=EC=83=89=EA=B9=94=20opacitiy?= =?UTF-8?q?=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Projects/Features/BaseFeature/Resources/Base.storyboard | 4 ++-- .../Sources/ViewControllers/ContainSongsViewController.swift | 2 +- .../BaseFeature/Sources/Views/ContainPlaylistHeaderView.swift | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Projects/Features/BaseFeature/Resources/Base.storyboard b/Projects/Features/BaseFeature/Resources/Base.storyboard index ddf71784d..42532169e 100644 --- a/Projects/Features/BaseFeature/Resources/Base.storyboard +++ b/Projects/Features/BaseFeature/Resources/Base.storyboard @@ -153,7 +153,7 @@ - + @@ -247,7 +247,7 @@ - + diff --git a/Projects/Features/BaseFeature/Sources/ViewControllers/ContainSongsViewController.swift b/Projects/Features/BaseFeature/Sources/ViewControllers/ContainSongsViewController.swift index c1fe771cf..444f559b3 100644 --- a/Projects/Features/BaseFeature/Sources/ViewControllers/ContainSongsViewController.swift +++ b/Projects/Features/BaseFeature/Sources/ViewControllers/ContainSongsViewController.swift @@ -15,7 +15,7 @@ public final class ContainSongsViewController: BaseViewController, ViewControlle @IBOutlet weak var titleLabel: UILabel! @IBOutlet weak var tableView: UITableView! @IBOutlet weak var indicator: NVActivityIndicatorView! - let containerView = UIView(frame: CGRect(x: .zero, y: .zero, width: APP_WIDTH(), height: 36)) + let containerView = UIView(frame: CGRect(x: .zero, y: .zero, width: APP_WIDTH(), height: 48)) let songCountLabel: UILabel = UILabel() let subTitleLabel: UILabel = UILabel() var multiPurposePopupFactory: MultiPurposePopupFactory! diff --git a/Projects/Features/BaseFeature/Sources/Views/ContainPlaylistHeaderView.swift b/Projects/Features/BaseFeature/Sources/Views/ContainPlaylistHeaderView.swift index e3f839368..6af835b79 100644 --- a/Projects/Features/BaseFeature/Sources/Views/ContainPlaylistHeaderView.swift +++ b/Projects/Features/BaseFeature/Sources/Views/ContainPlaylistHeaderView.swift @@ -50,7 +50,7 @@ class ContainPlaylistHeaderView: UIView { self.backgroundColor = .clear superView.backgroundColor = .white.withAlphaComponent(0.4) superView.layer.cornerRadius = 8 - superView.layer.borderColor = DesignSystemAsset.BlueGrayColor.gray200.color.withAlphaComponent(0.7).cgColor + superView.layer.borderColor = DesignSystemAsset.BlueGrayColor.gray200.color.withAlphaComponent(0.4).cgColor superView.layer.borderWidth = 1 blurEffectViews.layer.cornerRadius = 8