Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 재생화면 뷰 구현(UI) #29

Merged
merged 17 commits into from
Nov 20, 2023
Merged

feat: 재생화면 뷰 구현(UI) #29

merged 17 commits into from
Nov 20, 2023

Conversation

chopmozzi
Copy link
Collaborator

🧑‍🚀 PR 요약

  • LOSlider thumbimage 추가
  • LOSlider, LOTagStackView, LODescriptionView 추가
  • 재생화면 뷰 배치 구현

📌 변경 사항

내용 소개가 이상함...

📸 ScreenShot
Simulator.Screen.Recording.-.iPhone.13.mini.-.2023-11-17.at.01.15.33.mp4

Linked Issue

close #9


import UIKit

final class LODescriptionView: UIView {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

가능하면 mark 주석 부탁드립니다~

Comment on lines 37 to 39
descriptionLabel.textColor = .layoverWhite
descriptionLabel.font = .loFont(type: .body2)
descriptionLabel.numberOfLines = 0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

선언할 때 클로저 내부에서 처리하면 어떨까요

Comment on lines 41 to 42
self.addSubview(descriptionLabel)
self.addSubview(titleLabel)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

만들어둔 addsubviews 사용하면 좋을 것 같습니다!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

놓쳤네요 감사합니다.

Comment on lines 16 to 21
self.minimumTrackTintColor = .primaryPurple
setThumbImage(UIImage(named: normalThumbImage), for: .normal)
self.minimumValue = 1
self.maximumValue = 100
self.value = 50

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

함수로 감싸주세요....
minimumValue, maximumValue는 여기서 설정해줘도 될까요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

일단 레이아웃 뷰 배치만 하려고 임시로 설정했습니다.

Comment on lines 11 to 12
private let normalThumbImage: String = "LONormalThumb"
private let selectedThumbImage: String = "LOSelectedThumb"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이미지 말고 깎아서 쓰는거 어때요... ㅎㅎㅎㅎ

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UISlider에 thumb는 UIImage로 밖에 못 넣는거 같아서.. 좀 더 확인해보겠습니다.

Comment on lines 11 to 12
private let normalThumbImage: String = "LONormalThumb"
private let selectedThumbImage: String = "LOSelectedThumb"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resource loader 사용하시면 될 듯 해서 없어도 될 코드 인 것 같습니다.
아래에 후술할게요

}

override func beginTracking(_ touch: UITouch, with event: UIEvent?) -> Bool {
setThumbImage(UIImage(named: selectedThumbImage), for: .normal)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setThumbImage(UIImage.selectedThumbImage, for: .normal

Comment on lines 24 to 26
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

코드 연쇄살인마를 위해 fatalError외에 구현해주세요...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오마오마갓

Comment on lines +37 to +42
var config = UIButton.Configuration.plain()
config.titleTextAttributesTransformer = UIConfigurationTextAttributesTransformer { incoming in
var outgoing = incoming
outgoing.font = UIFont.loFont(type: .body2Bold)
return outgoing
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

button.layer.cornerRadius = 19
button.layer.borderWidth = 1
button.layer.borderColor = UIColor.layoverWhite.cgColor
// button.setImage(UIImage(systemName: "cancel"), for: .normal)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

사용하지 않으시면 주석 삭제해도 좋을 것 같습니다

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

얘 언젠간 쓸거 같아서... 프로필 이미지를 위해 남겨놨습니다.

Comment on lines +109 to +121
private func setup() {
let viewController = self
let interactor = PlaybackInteractor()
let presenter = PlaybackPresenter()
let router = PlaybackRouter()

viewController.router = router
viewController.interactor = interactor
interactor.presenter = presenter
presenter.viewController = viewController
router.viewController = viewController
router.dataStore = interactor
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

하는김에 configurator 만들어서 분리해도 좋을 것 같습니다

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

얘는 뷰모델 받아와서 뷰 구성하는 작업할 때 따로 이슈로 만들어서 처리할게요~

@chopmozzi
Copy link
Collaborator Author

chopmozzi commented Nov 18, 2023

Approve "해줘"주세요..

Comment on lines 21 to 38
// MARK: - Properties

private (set) var titleLabel: UILabel = {
let label: UILabel = UILabel()
label.numberOfLines = 1
label.font = .loFont(type: .body1)
label.textColor = .layoverWhite
label.text = "제목 테스트"
return label
}()
private (set) var descriptionLabel: UILabel = {
let label: UILabel = UILabel()
label.textColor = .layoverWhite
label.font = .loFont(type: .body2)
label.numberOfLines = 0
return label
}()

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

혹시 라벨을 var로 선언하신 이유가 있을까요 ??

Copy link
Collaborator Author

@chopmozzi chopmozzi Nov 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ready only로 쓰려고 private (set) var를 했는데 이렇게 쓸거면 private 풀고 let 박아두는게 나을거 같아서 수정했습니다 감사합니다.

Comment on lines 55 to 57
descriptionLabel.textColor = .layoverWhite
descriptionLabel.font = .loFont(type: .body2)
descriptionLabel.numberOfLines = 0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

선언시에 처리해주는 걸로 수정하셨으니 이부분은 이제 삭제해도 괜찮지 않을까요 !

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아차차... 감사합니다.

Copy link
Member

@anyukyung anyukyung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니당 👾

@chopmozzi chopmozzi merged commit 2ea4cc8 into iOS/dev Nov 20, 2023
1 check passed
@chopmozzi chopmozzi deleted the iOS/feat#9 branch November 20, 2023 01:51
@chopmozzi chopmozzi restored the iOS/feat#9 branch March 8, 2024 13:27
@chopmozzi chopmozzi deleted the iOS/feat#9 branch March 8, 2024 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants