diff --git a/Projects/Features/BaseFeature/Resources/Base.storyboard b/Projects/Features/BaseFeature/Resources/Base.storyboard index e867030f0..42532169e 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..444f559b3 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: 48)) + 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,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) @@ -182,6 +201,7 @@ extension ContainSongsViewController { 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)" 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 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 {