-
Notifications
You must be signed in to change notification settings - Fork 1
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
[밀봉/개봉 화면] 버그 수정 #104
[밀봉/개봉 화면] 버그 수정 #104
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,9 +10,9 @@ import SnapKit | |
import UIKit | ||
|
||
final class CapsuleOpenView: UIView, BaseView, UnOpenable { | ||
lazy var thumbnailImageView = ThemeThumbnailImageView(frame: .zero, width: FrameResource.capsuleThumbnailWidth) | ||
var thumbnailImageView = ThemeThumbnailImageView(frame: .zero, width: UIScreen.main.bounds.width * FrameResource.capsuleThumbnailWidthRatio) | ||
|
||
lazy var descriptionLabel = { | ||
var descriptionLabel = { | ||
let label = ThemeLabel(text: nil, size: FrameResource.fontSize140, color: .themeGray300) | ||
label.numberOfLines = 3 | ||
label.textAlignment = .center | ||
|
@@ -21,14 +21,14 @@ final class CapsuleOpenView: UIView, BaseView, UnOpenable { | |
|
||
let blurEffectView = CapsuleBlurEffectView() | ||
|
||
lazy var lockImageView = { | ||
var lockImageView = { | ||
let lockImageView = UIImageView() | ||
lockImageView.image = .lock | ||
lockImageView.tintColor = .themeGray200 | ||
return lockImageView | ||
}() | ||
|
||
lazy var dateLabel = { | ||
var dateLabel = { | ||
let dateLabel = ThemeLabel(text: nil, size: FrameResource.fontSize80, color: .themeGray200) | ||
dateLabel.textAlignment = .center | ||
return dateLabel | ||
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. 불필요한 lazy 키워드 제거한거 좋네요 이왕 하시는 김에 불필요한 var 은 let 으로, 또 다른 객체에서 참조되지 않을 Label 들 같은 프로퍼티들은 private 으로 선언하면 더 좋을 것 같다는 의견입니당 ㅋㅅㅋ 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. UnOpenabel 프로토콜의 속성들이라서 var를 사용했습니다. |
||
|
@@ -49,7 +49,7 @@ final class CapsuleOpenView: UIView, BaseView, UnOpenable { | |
|
||
override init(frame: CGRect) { | ||
super.init(frame: frame) | ||
|
||
configure() | ||
addSubViews() | ||
makeConstraints() | ||
|
@@ -84,6 +84,7 @@ final class CapsuleOpenView: UIView, BaseView, UnOpenable { | |
dateLabel.text = capsuleCellItem.closedDate.dateTimeString | ||
if !capsuleCellItem.isOpenable() { | ||
openButton.backgroundColor = .themeGray200 | ||
openButton.isEnabled = false | ||
applyUnOpenableEffect() | ||
} | ||
} | ||
|
@@ -98,19 +99,21 @@ final class CapsuleOpenView: UIView, BaseView, UnOpenable { | |
thumbnailImageView.snp.makeConstraints { | ||
$0.centerX.equalToSuperview() | ||
$0.centerY.equalToSuperview().multipliedBy(AnimationResource.fromOriginY) | ||
$0.width.equalTo(FrameResource.capsuleThumbnailWidth) | ||
$0.height.equalTo(FrameResource.capsuleThumbnailHeight) | ||
$0.width.equalTo(UIScreen.main.bounds.width * FrameResource.capsuleThumbnailWidthRatio) | ||
$0.height.equalTo(UIScreen.main.bounds.width * FrameResource.capsuleThumbnailWidthRatio * FrameResource.capsuleThumbnailHWRatio) | ||
} | ||
|
||
descriptionLabel.snp.makeConstraints { | ||
$0.centerX.equalToSuperview() | ||
$0.top.equalTo(self.snp.centerY).multipliedBy(0.8).offset(FrameResource.openCapsuleVerticalPadding + FrameResource.capsuleThumbnailHeight / 2) | ||
$0.top.equalTo(self.snp.centerY).multipliedBy(0.7) | ||
.offset(FrameResource.capsuleThumbnailHeight / 2 + AnimationResource.capsuleMoveHeight) | ||
$0.bottom.equalTo(openButton.snp.top).offset(-FrameResource.spacing200).priority(999) | ||
Comment on lines
-107
to
+110
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. 고생하셨네요 ㅎㅎ |
||
} | ||
|
||
openButton.snp.makeConstraints { | ||
$0.leading.equalToSuperview().offset(FrameResource.horizontalPadding) | ||
$0.trailing.equalToSuperview().offset(-FrameResource.horizontalPadding) | ||
$0.bottom.equalTo(safeAreaLayoutGuide.snp.bottom) | ||
$0.bottom.equalTo(safeAreaLayoutGuide.snp.bottom).offset(-FrameResource.spacing200) | ||
$0.height.equalTo(FrameResource.buttonHeight) | ||
} | ||
} | ||
|
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.
이러면 무조건 기기 화면크기 인가요?