diff --git a/EATSSU/App/Sources/Presentation/MyPage/View/CreatorsView.swift b/EATSSU/App/Sources/Presentation/MyPage/View/CreatorsView.swift index 3614ae19..005275fc 100644 --- a/EATSSU/App/Sources/Presentation/MyPage/View/CreatorsView.swift +++ b/EATSSU/App/Sources/Presentation/MyPage/View/CreatorsView.swift @@ -14,15 +14,24 @@ import SnapKit /// "만든 사람들"을 담고 있는 View 입니다. class CreatorsView: BaseUIView { // MARK: - UI Components + + let scrollView: UIScrollView = { + let scrollView = UIScrollView() + scrollView.showsVerticalScrollIndicator = false + scrollView.contentInsetAdjustmentBehavior = .never + return scrollView + }() + + let contentView: UIView = { + let view = UIView() + view.backgroundColor = .clear + return view + }() 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 }() @@ -40,12 +49,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) } } } diff --git a/EATSSU/App/Sources/Presentation/MyPage/ViewController/CreatorViewController.swift b/EATSSU/App/Sources/Presentation/MyPage/ViewController/CreatorViewController.swift index c846f9f6..2df820fb 100644 --- a/EATSSU/App/Sources/Presentation/MyPage/ViewController/CreatorViewController.swift +++ b/EATSSU/App/Sources/Presentation/MyPage/ViewController/CreatorViewController.swift @@ -11,6 +11,8 @@ import UIKit // External Module import SnapKit +import EATSSUDesign + class CreatorViewController: BaseViewController { // MARK: - Properties @@ -31,9 +33,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() } } @@ -42,4 +44,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 = [ + EATSSUDesignAsset.Color.Gradation.highGradation.color.cgColor, + EATSSUDesignAsset.Color.Gradation.lowGradation.color.cgColor + ] + gradient.startPoint = CGPoint(x: 0.5, y: 0.0) + gradient.endPoint = CGPoint(x: 0.5, y: 1.0) + view.layer.insertSublayer(gradient, at: 0) + } } diff --git a/EATSSUDesign/EATSSUDesign/Resources/Color.xcassets/Gradation/Contents.json b/EATSSUDesign/EATSSUDesign/Resources/Color.xcassets/Gradation/Contents.json new file mode 100644 index 00000000..6e965652 --- /dev/null +++ b/EATSSUDesign/EATSSUDesign/Resources/Color.xcassets/Gradation/Contents.json @@ -0,0 +1,9 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "provides-namespace" : true + } +} diff --git a/EATSSUDesign/EATSSUDesign/Resources/Color.xcassets/Gradation/highGradation.colorset/Contents.json b/EATSSUDesign/EATSSUDesign/Resources/Color.xcassets/Gradation/highGradation.colorset/Contents.json new file mode 100644 index 00000000..cfe484ff --- /dev/null +++ b/EATSSUDesign/EATSSUDesign/Resources/Color.xcassets/Gradation/highGradation.colorset/Contents.json @@ -0,0 +1,20 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "255", + "green" : "228", + "red" : "184" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/EATSSUDesign/EATSSUDesign/Resources/Color.xcassets/Gradation/lowGradation.colorset/Contents.json b/EATSSUDesign/EATSSUDesign/Resources/Color.xcassets/Gradation/lowGradation.colorset/Contents.json new file mode 100644 index 00000000..25d9484d --- /dev/null +++ b/EATSSUDesign/EATSSUDesign/Resources/Color.xcassets/Gradation/lowGradation.colorset/Contents.json @@ -0,0 +1,20 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "227", + "green" : "255", + "red" : "199" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/EATSSUDesign/EATSSUDesign/Resources/Images.xcassets/Creators.imageset/Creators.png b/EATSSUDesign/EATSSUDesign/Resources/Images.xcassets/Creators.imageset/Creators.png index 8f317736..9d86a055 100644 Binary files a/EATSSUDesign/EATSSUDesign/Resources/Images.xcassets/Creators.imageset/Creators.png and b/EATSSUDesign/EATSSUDesign/Resources/Images.xcassets/Creators.imageset/Creators.png differ