From 0218b83cbe6355f49ce3e7584dc8ec2e46ef3543 Mon Sep 17 00:00:00 2001 From: jihyeonjjang Date: Tue, 17 Jun 2025 11:36:08 +0900 Subject: [PATCH 1/2] =?UTF-8?q?design:=20duration=20=EB=94=94=EC=9E=90?= =?UTF-8?q?=EC=9D=B8=20=ED=86=B5=EC=9D=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PickaView/Views/Player/Player.storyboard | 39 ++++++++++++------- .../Player/PlayerViewCollectionViewCell.swift | 10 +++-- .../Player/PlayerViewController+UI.swift | 5 +++ .../Views/Player/PlayerViewController.swift | 7 ---- 4 files changed, 35 insertions(+), 26 deletions(-) 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..81fdf97 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 = [ diff --git a/PickaView/Views/Player/PlayerViewController.swift b/PickaView/Views/Player/PlayerViewController.swift index 711e547..8c391b7 100644 --- a/PickaView/Views/Player/PlayerViewController.swift +++ b/PickaView/Views/Player/PlayerViewController.swift @@ -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, From 55bb80fd2d9880139a0835628e5b355936f337b3 Mon Sep 17 00:00:00 2001 From: jihyeonjjang Date: Tue, 17 Jun 2025 12:27:08 +0900 Subject: [PATCH 2/2] =?UTF-8?q?design:=20=ED=94=8C=EB=A0=88=EC=9D=B4?= =?UTF-8?q?=EC=96=B4=20dismiss=20=EB=B2=84=ED=8A=BC=20=EC=9D=B4=EB=AF=B8?= =?UTF-8?q?=EC=A7=80=20=EB=B0=8F=20=EB=B0=B0=EC=B9=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PickaView/Views/Player/PlayerViewController+UI.swift | 2 +- PickaView/Views/Player/PlayerViewController.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PickaView/Views/Player/PlayerViewController+UI.swift b/PickaView/Views/Player/PlayerViewController+UI.swift index 81fdf97..aab0b15 100644 --- a/PickaView/Views/Player/PlayerViewController+UI.swift +++ b/PickaView/Views/Player/PlayerViewController+UI.swift @@ -72,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 8c391b7..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 }()