Skip to content

Commit

Permalink
[feat] FeedDetailVC 추가 (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
BAEKYUJEONG committed Sep 6, 2024
1 parent 0307f15 commit c8b9429
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
4 changes: 4 additions & 0 deletions PLUV.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
68830FAF2C8264CA00995785 /* FeedViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 68830FAE2C8264CA00995785 /* FeedViewModel.swift */; };
68830FB12C82657F00995785 /* Feed.swift in Sources */ = {isa = PBXBuildFile; fileRef = 68830FB02C82657F00995785 /* Feed.swift */; };
68830FB32C8265F600995785 /* FeedCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 68830FB22C8265F600995785 /* FeedCollectionViewCell.swift */; };
68830FB52C8273DA00995785 /* FeedDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 68830FB42C8273DA00995785 /* FeedDetailViewController.swift */; };
6889F5122C6CD194001F5FC2 /* SelectPlaylistViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6889F5112C6CD194001F5FC2 /* SelectPlaylistViewModel.swift */; };
6889F5162C6CE56F001F5FC2 /* SelectMusicViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6889F5152C6CE56F001F5FC2 /* SelectMusicViewController.swift */; };
6889F5182C6D234C001F5FC2 /* SelectMusicTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6889F5172C6D234C001F5FC2 /* SelectMusicTableViewCell.swift */; };
Expand Down Expand Up @@ -122,6 +123,7 @@
68830FAE2C8264CA00995785 /* FeedViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeedViewModel.swift; sourceTree = "<group>"; };
68830FB02C82657F00995785 /* Feed.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Feed.swift; sourceTree = "<group>"; };
68830FB22C8265F600995785 /* FeedCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeedCollectionViewCell.swift; sourceTree = "<group>"; };
68830FB42C8273DA00995785 /* FeedDetailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeedDetailViewController.swift; sourceTree = "<group>"; };
6889F5112C6CD194001F5FC2 /* SelectPlaylistViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelectPlaylistViewModel.swift; sourceTree = "<group>"; };
6889F5152C6CE56F001F5FC2 /* SelectMusicViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelectMusicViewController.swift; sourceTree = "<group>"; };
6889F5172C6D234C001F5FC2 /* SelectMusicTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelectMusicTableViewCell.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -234,6 +236,7 @@
68830FAC2C81F57900995785 /* FeedViewController.swift */,
68830FAE2C8264CA00995785 /* FeedViewModel.swift */,
68830FB22C8265F600995785 /* FeedCollectionViewCell.swift */,
68830FB42C8273DA00995785 /* FeedDetailViewController.swift */,
);
path = Feed;
sourceTree = "<group>";
Expand Down Expand Up @@ -751,6 +754,7 @@
files = (
6889F5342C724B58001F5FC2 /* RotationAnimation.swift in Sources */,
68830FAA2C81D8CF00995785 /* WebViewController.swift in Sources */,
68830FB52C8273DA00995785 /* FeedDetailViewController.swift in Sources */,
68F6FAB42C4A9D8B001128FF /* TransferDestinationViewController.swift in Sources */,
68DB03812C80F18E00FBD014 /* TabBarViewController.swift in Sources */,
68DC4C732C6B6DE5006D8E97 /* SelectPlaylistViewController.swift in Sources */,
Expand Down
44 changes: 44 additions & 0 deletions PLUV/Feed/FeedDetailViewController.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
//
// FeedDetailViewController.swift
// PLUV
//
// Created by 백유정 on 8/31/24.
//

import UIKit

class FeedDetailViewController: UIViewController {

init(viewModel: FeedViewModel) {
super.init(nibName: nil, bundle: nil)
}

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

override func viewDidLoad() {
super.viewDidLoad()

setUI()
setNavigationBar()
}

private func setUI() {
self.view.backgroundColor = .white
self.navigationItem.setHidesBackButton(true, animated: false)
}

private func setNavigationBar() {
/// NavigationBar의 back 버튼 이미지 변경
let backImage = UIImage(named: "backbutton_icon")?.withRenderingMode(.alwaysOriginal)
let resizedBackImage = backImage?.withRenderingMode(.alwaysOriginal).resize(to: CGSize(width: 24, height: 24))
let backButton = UIBarButtonItem(image: resizedBackImage, style: .plain, target: self, action: #selector(clickBackButton))
backButton.tintColor = .gray800
navigationItem.leftBarButtonItem = backButton
}

@objc private func clickBackButton() {
self.navigationController?.popViewController(animated: true)
}
}

0 comments on commit c8b9429

Please sign in to comment.