-
Notifications
You must be signed in to change notification settings - Fork 0
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
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
46651f0
:seedling: LOSlider에 필요한 에셋 추가
chopmozzi fe16f2a
:seedling: LOSlider 추가
chopmozzi b951fb8
:seedling: add: LOTagStackView추가
chopmozzi 02536ba
:seedling: add: LODescriptionView 추가
chopmozzi 120165b
:seedling: add: Playback Scene추가
chopmozzi 93af59f
:sparkles: feat: HomeViewController 캐러셀 레이아웃 구현
loinsir 60481eb
:sparkles: feat: 재생 화면 뷰 배치
chopmozzi 588ed4a
:fire: delete: 불필요 커스텀 flowlayout 코드 삭제
loinsir 898f559
:art: chore: 코드 리뷰 반영 개선
loinsir 12bdc6a
Merge pull request #28 from boostcampwm2023/iOS/feat#21
loinsir 5f968b6
:sparkles: feat: 공통PlayerView 구현
loinsir c6ea93f
:recycle: chore: 소개 내용 뷰 애니메이션 수정
chopmozzi b3691c4
fixup
chopmozzi 97739e3
:recycle: chore: 코드 리뷰 반영
chopmozzi 1e3ef7c
Merge pull request #38 from boostcampwm2023/iOS/feat#33
loinsir 6881b68
:recycle: chore: 필요없는 사항 수정, 리팩토링
chopmozzi 9e7719f
Merge branch 'iOS/feat#9'
chopmozzi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
// | ||
// LODescriptionView.swift | ||
// Layover | ||
// | ||
// Created by 황지웅 on 11/15/23. | ||
// | ||
|
||
import UIKit | ||
|
||
final class LODescriptionView: UIView { | ||
static let descriptionWidth: CGFloat = 104 | ||
static let descriptionHeight: CGFloat = 63 | ||
|
||
// MARK: - View isTouched State | ||
|
||
enum State { | ||
case show | ||
case hidden | ||
} | ||
|
||
// MARK: - Properties | ||
|
||
let titleLabel: UILabel = { | ||
let label: UILabel = UILabel() | ||
label.numberOfLines = 1 | ||
label.font = .loFont(type: .body1) | ||
label.textColor = .layoverWhite | ||
label.text = "제목 테스트" | ||
return label | ||
}() | ||
let descriptionLabel: UILabel = { | ||
let label: UILabel = UILabel() | ||
label.textColor = .layoverWhite | ||
label.font = .loFont(type: .body2) | ||
label.numberOfLines = 0 | ||
return label | ||
}() | ||
|
||
private var descrioptionText: String = "" | ||
var state: State = .hidden | ||
|
||
override init(frame: CGRect) { | ||
super.init(frame: frame) | ||
setupConstraints() | ||
} | ||
|
||
required init?(coder: NSCoder) { | ||
super.init(coder: coder) | ||
setupConstraints() | ||
} | ||
|
||
// MARK: Method | ||
|
||
private func setupConstraints() { | ||
descriptionLabel.translatesAutoresizingMaskIntoConstraints = false | ||
titleLabel.translatesAutoresizingMaskIntoConstraints = false | ||
self.addSubviews(descriptionLabel, titleLabel) | ||
|
||
NSLayoutConstraint.activate([ | ||
titleLabel.leadingAnchor.constraint(equalTo: self.leadingAnchor), | ||
titleLabel.bottomAnchor.constraint(equalTo: descriptionLabel.topAnchor), | ||
descriptionLabel.topAnchor.constraint(equalTo: titleLabel.bottomAnchor), | ||
descriptionLabel.leadingAnchor.constraint(equalTo: self.leadingAnchor), | ||
descriptionLabel.widthAnchor.constraint(equalTo: self.widthAnchor) | ||
]) | ||
} | ||
|
||
func setText(_ content: String) { | ||
let attrString: NSMutableAttributedString = NSMutableAttributedString(string: content) | ||
let paragraphStyle = NSMutableParagraphStyle() | ||
paragraphStyle.lineHeightMultiple = 1.3 | ||
attrString.addAttribute(NSAttributedString.Key.paragraphStyle, value: paragraphStyle, range: NSRange(location: 0, length: attrString.length)) | ||
descriptionLabel.attributedText = attrString | ||
} | ||
|
||
func checkLabelOverflow() -> Bool { | ||
let originViewSize: CGSize = CGSize(width: LODescriptionView.descriptionWidth, height: LODescriptionView.descriptionHeight) | ||
let currentSize: CGSize = descriptionLabel.intrinsicContentSize | ||
return currentSize.height > originViewSize.height || currentSize.width > originViewSize.width | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// | ||
// LOSlider.swift | ||
// Layover | ||
// | ||
// Created by 황지웅 on 11/15/23. | ||
// | ||
|
||
import UIKit | ||
|
||
final class LOSlider: UISlider { | ||
override init(frame: CGRect) { | ||
super.init(frame: frame) | ||
setUI() | ||
} | ||
|
||
required init?(coder: NSCoder) { | ||
super.init(coder: coder) | ||
setUI() | ||
} | ||
|
||
override func beginTracking(_ touch: UITouch, with event: UIEvent?) -> Bool { | ||
setThumbImage(UIImage.loNormalThumb, for: .normal) | ||
return true | ||
} | ||
|
||
override func endTracking(_ touch: UITouch?, with event: UIEvent?) { | ||
setThumbImage(UIImage.loSelectedThumb, for: .normal) | ||
} | ||
|
||
private func setUI() { | ||
self.minimumTrackTintColor = .primaryPurple | ||
setThumbImage(UIImage.loNormalThumb, for: .normal) | ||
self.minimumValue = 1 | ||
self.maximumValue = 100 | ||
self.value = 50 | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
// | ||
// LOTagStackView.swift | ||
// Layover | ||
// | ||
// Created by 황지웅 on 11/16/23. | ||
// Copyright © 2023 CodeBomber. All rights reserved. | ||
// | ||
|
||
import UIKit | ||
final class LOTagStackView: UIStackView { | ||
lazy var tagButton1: UIButton = setButton("#테스트1") | ||
lazy var tagButton2: UIButton = setButton("#테스트2") | ||
lazy var tagButton3: UIButton = setButton("#테스트3") | ||
|
||
override init(frame: CGRect) { | ||
super.init(frame: frame) | ||
setUpConstraints() | ||
} | ||
|
||
required init(coder: NSCoder) { | ||
super.init(coder: coder) | ||
setUpConstraints() | ||
} | ||
|
||
private func setUpConstraints() { | ||
[tagButton1, tagButton2, tagButton3].forEach { tagButton in | ||
self.addArrangedSubview(tagButton) | ||
} | ||
self.alignment = .fill | ||
self.distribution = .fillProportionally | ||
self.axis = .horizontal | ||
self.spacing = 8 | ||
} | ||
|
||
// TODO: Component 추가 시 변경 | ||
private func setButton(_ content: String) -> UIButton { | ||
let button: UIButton = UIButton() | ||
var config = UIButton.Configuration.plain() | ||
config.titleTextAttributesTransformer = UIConfigurationTextAttributesTransformer { incoming in | ||
var outgoing = incoming | ||
outgoing.font = UIFont.loFont(type: .body2Bold) | ||
return outgoing | ||
} | ||
Comment on lines
+38
to
+43
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
button.backgroundColor = UIColor.primaryPurple | ||
button.setTitleColor(UIColor.layoverWhite, for: .normal) | ||
button.setTitle(content, for: .normal) | ||
button.configuration = config | ||
button.configuration?.contentInsets = NSDirectionalEdgeInsets(top: 5.0, leading: 8.0, bottom: 5.0, trailing: 8.0) | ||
button.layer.cornerRadius = 12 | ||
return button | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
iOS/Layover/Layover/Resources/Assets.xcassets/LONormalThumb.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "Ellipse 46.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"filename" : "Ellipse 47.png", | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"filename" : "Ellipse 48.png", | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+508 Bytes
...Layover/Layover/Resources/Assets.xcassets/LONormalThumb.imageset/Ellipse 46.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+508 Bytes
...Layover/Layover/Resources/Assets.xcassets/LONormalThumb.imageset/Ellipse 47.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+508 Bytes
...Layover/Layover/Resources/Assets.xcassets/LONormalThumb.imageset/Ellipse 48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
가능하면 mark 주석 부탁드립니다~