diff --git a/PickaView/Views/Player/Player.storyboard b/PickaView/Views/Player/Player.storyboard index 33f87e1..8807b4c 100644 --- a/PickaView/Views/Player/Player.storyboard +++ b/PickaView/Views/Player/Player.storyboard @@ -161,13 +161,6 @@ - @@ -181,13 +174,13 @@ - + + + + + + + + + + + + + - - + + @@ -225,8 +236,9 @@ + + - @@ -336,9 +348,6 @@ - - - diff --git a/PickaView/Views/Player/PlayerViewCollectionViewCell.swift b/PickaView/Views/Player/PlayerViewCollectionViewCell.swift index 40fe8c0..27d0b35 100644 --- a/PickaView/Views/Player/PlayerViewCollectionViewCell.swift +++ b/PickaView/Views/Player/PlayerViewCollectionViewCell.swift @@ -11,15 +11,17 @@ import UIKit /// 썸네일, 영상 길이, 업로더 정보(이미지, 이름), 조회수를 표시 class PlayerViewCollectionViewCell: UICollectionViewCell { @IBOutlet weak var thumbnailImageView: UIImageView! - @IBOutlet weak var totalTimeLabel: UILabel! @IBOutlet weak var userImageView: UIImageView! @IBOutlet weak var usernameLabel: UILabel! @IBOutlet weak var viewsLabel: UILabel! + @IBOutlet weak var durationView: UIView! + @IBOutlet weak var durationLabel: UILabel! override func layoutSubviews() { super.layoutSubviews() - // 프로필 이미지를 원형으로 설정 + durationView.layer.cornerRadius = 4 + userImageView.layer.cornerRadius = userImageView.frame.width / 2 userImageView.clipsToBounds = true } @@ -32,9 +34,9 @@ class PlayerViewCollectionViewCell: UICollectionViewCell { // 총 재생 시간을 포맷팅하여 표시 if let durationSeconds = video.timeStamp?.totalTime { - totalTimeLabel.text = Int(durationSeconds).toDurationString() + durationLabel.text = Int(durationSeconds).toDurationString() } else { - totalTimeLabel.text = "Duration: N/A" + durationLabel.text = "Duration: N/A" } // 사용자 이미지 설정, 없으면 기본 이미지 사용 diff --git a/PickaView/Views/Player/PlayerViewController+UI.swift b/PickaView/Views/Player/PlayerViewController+UI.swift index de6a551..aab0b15 100644 --- a/PickaView/Views/Player/PlayerViewController+UI.swift +++ b/PickaView/Views/Player/PlayerViewController+UI.swift @@ -33,6 +33,11 @@ extension PlayerViewController { controlsOverlayView.addSubview(seekerStack) controlsOverlayView.addSubview(fullscreenButton) controlsOverlayView.addSubview(dismissButton) + + videoContainerView.addSubview(rateTwoView) + videoContainerView.insertSubview(rateTwoView, belowSubview: controlsOverlayView) + + rateTwoView.layer.cornerRadius = 8 // 세로/가로 레이아웃 제약 정의 portraitConstraints = [ @@ -67,7 +72,7 @@ extension PlayerViewController { fullscreenButton.trailingAnchor.constraint(equalTo: controlsOverlayView.trailingAnchor, constant: -16), dismissButton.topAnchor.constraint(equalTo: controlsOverlayView.topAnchor, constant: 16), - dismissButton.leadingAnchor.constraint(equalTo: controlsOverlayView.leadingAnchor, constant: 16) + dismissButton.trailingAnchor.constraint(equalTo: controlsOverlayView.trailingAnchor, constant: -16) ]) // 버튼 고정 크기 설정 diff --git a/PickaView/Views/Player/PlayerViewController.swift b/PickaView/Views/Player/PlayerViewController.swift index 711e547..9e0591f 100644 --- a/PickaView/Views/Player/PlayerViewController.swift +++ b/PickaView/Views/Player/PlayerViewController.swift @@ -127,7 +127,7 @@ class PlayerViewController: UIViewController, PlayerViewControllerDelegate { /// 닫기 버튼 lazy var dismissButton: UIButton = { - let button = createButton(systemName: "chevron.down", useSmallConfig: true) + let button = createButton(systemName: "xmark", useSmallConfig: true) button.addTarget(self, action: #selector(handleDismissButtonTapped(_:)), for: .touchUpInside) return button }() @@ -179,13 +179,6 @@ class PlayerViewController: UIViewController, PlayerViewControllerDelegate { setupGestures() addPlayerObservers() - // rateTwoView를 playerLayer 위, controlsOverlayView 아래에 위치 - videoContainerView.addSubview(rateTwoView) - videoContainerView.insertSubview(rateTwoView, belowSubview: controlsOverlayView) - - // Apply rounded corners to rateTwoLabel - rateTwoView.layer.cornerRadius = 8 - // 기기 방향 변화 알림 등록 NotificationCenter.default.addObserver( self,