Skip to content

[#258]만든 사람들 페이지 수정 #277

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

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 24 additions & 5 deletions EATSSU/App/Sources/Presentation/MyPage/View/CreatorsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,20 @@ import SnapKit
/// "만든 사람들"을 담고 있는 View 입니다.
class CreatorsView: BaseUIView {
// MARK: - UI Components

let scrollView: UIScrollView = UIScrollView().then {
$0.showsVerticalScrollIndicator = false
$0.contentInsetAdjustmentBehavior = .never
}

let contentView: UIView = UIView().then {
$0.backgroundColor = .clear
}

private let creatorsImageView: UIImageView = {
let imageView = UIImageView()
imageView.image = EATSSUDesignAsset.Images.creators.image
imageView.contentMode = .scaleAspectFit
imageView.snp.makeConstraints { make in
make.width.equalTo(342)
make.height.equalTo(689)
}
return imageView
}()
Comment on lines +18 to 32
Copy link
Collaborator

Choose a reason for hiding this comment

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

같은 파일 내에서 then 사용여부가 통일되었으면 합니다!.!
이번 기회에 프로젝트 내에서 then 사용여부를 통일하여도 좋을 것 같아요.
@Funital @Hrepay 의견 남겨주세요~!

Copy link
Member

Choose a reason for hiding this comment

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

then을 이제 보내줘도 되지 않을까 라는 생각이 요즘 들고 있습니다 ㅎㅎ


Expand All @@ -40,12 +45,26 @@ class CreatorsView: BaseUIView {
// MARK: - Methods

override func configureUI() {
addSubview(creatorsImageView)
addSubview(scrollView)
scrollView.addSubview(contentView)
contentView.addSubview(creatorsImageView)
}

override func setLayout() {
scrollView.snp.makeConstraints { make in
make.edges.equalToSuperview()
}

contentView.snp.makeConstraints { make in
make.edges.equalTo(scrollView)
make.width.equalToSuperview()
make.bottom.equalTo(creatorsImageView.snp.bottom).offset(52)
}

creatorsImageView.snp.makeConstraints { make in
make.center.equalToSuperview()
make.width.equalTo(276)
make.height.equalTo(1770)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ class CreatorViewController: BaseViewController {

override func setLayout() {
creatorsView.snp.makeConstraints { make in
make.top.equalToSuperview().inset(103)
make.leading.trailing.equalToSuperview().inset(24)
make.bottom.equalToSuperview().inset(52)
make.top.equalToSuperview().inset(66)
make.horizontalEdges.equalToSuperview().inset(24)
make.bottom.equalToSuperview()
}
}

Expand All @@ -42,4 +42,27 @@ class CreatorViewController: BaseViewController {
super.setCustomNavigationBar()
navigationItem.title = "만든 사람들"
}

override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
applyGradientBackground()
}

private func applyGradientBackground() {
if let existing = view.layer.sublayers?.first(where: { $0.name == "gradientLayer" }) {
existing.frame = view.bounds
return
}

let gradient = CAGradientLayer()
gradient.name = "gradientLayer"
gradient.frame = view.bounds
gradient.colors = [
UIColor(red: 184/255, green: 228/255, blue: 255/255, alpha: 1.0).cgColor,
UIColor(red: 199/255, green: 255/255, blue: 227/255, alpha: 1.0).cgColor
Comment on lines +61 to +62
Copy link
Collaborator

Choose a reason for hiding this comment

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

일회성으로 사용하는 컬러는 해당 파일에서 선언하여 사용하는 것이 좋을까요? 아님 디자인 시스템에 포함시키는 것이 좋을까요? @Hrepay

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

Choose a reason for hiding this comment

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

그럼 일회성 컬러여도 디자인 시스템에 추가하는 방향으로 통일합시다.

]
gradient.startPoint = CGPoint(x: 0.5, y: 0.0)
gradient.endPoint = CGPoint(x: 0.5, y: 1.0)
view.layer.insertSublayer(gradient, at: 0)
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.