From 97b8d450a372f13f178f9702e3c582162d390c60 Mon Sep 17 00:00:00 2001 From: SeoYeon Choi <102604192+choiseoo@users.noreply.github.com> Date: Sun, 26 Nov 2023 06:37:15 +0900 Subject: [PATCH] =?UTF-8?q?[Chore]=20=EB=A9=94=EC=9D=B8=EB=B7=B0=20?= =?UTF-8?q?=EC=83=81=EB=8B=A8=20=EC=B9=B4=EB=93=9C=EB=B7=B0=20=EB=A0=88?= =?UTF-8?q?=EC=9D=B4=EC=95=84=EC=9B=83=20=EC=88=98=EC=A0=95=20=EC=99=84?= =?UTF-8?q?=EB=A3=8C=20#36?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Main/MainViewController.swift | 8 ++-- .../Main/View/ActivityCardView.swift | 7 +--- .../Presentation/Main/View/IdCardView.swift | 40 ++++++++----------- 3 files changed, 23 insertions(+), 32 deletions(-) diff --git a/SOPKATHON_33-iOS/SOPKATHON_33-iOS/Presentation/Main/MainViewController.swift b/SOPKATHON_33-iOS/SOPKATHON_33-iOS/Presentation/Main/MainViewController.swift index 2cb9cab..ba08bcc 100644 --- a/SOPKATHON_33-iOS/SOPKATHON_33-iOS/Presentation/Main/MainViewController.swift +++ b/SOPKATHON_33-iOS/SOPKATHON_33-iOS/Presentation/Main/MainViewController.swift @@ -34,7 +34,7 @@ final class MainViewController: BaseViewController { private func setHierachy() { self.view.addSubview(backgroundImageView) - backgroundImageView.addSubviews(logoImageView, + self.view.addSubviews(logoImageView, idCardView, activityCardView) } @@ -56,8 +56,10 @@ final class MainViewController: BaseViewController { } activityCardView.snp.makeConstraints { - $0.top.equalTo(idCardView.snp.bottom).offset(15.adjusted) - $0.centerX.equalToSuperview() + $0.top.equalTo(idCardView.snp.bottom).offset(1.adjusted) + $0.leading.equalToSuperview().inset(25.adjusted) + $0.trailing.equalToSuperview().inset(25.adjusted) + $0.height.equalTo(405.adjusted) } } diff --git a/SOPKATHON_33-iOS/SOPKATHON_33-iOS/Presentation/Main/View/ActivityCardView.swift b/SOPKATHON_33-iOS/SOPKATHON_33-iOS/Presentation/Main/View/ActivityCardView.swift index 3e179a4..ae3f972 100644 --- a/SOPKATHON_33-iOS/SOPKATHON_33-iOS/Presentation/Main/View/ActivityCardView.swift +++ b/SOPKATHON_33-iOS/SOPKATHON_33-iOS/Presentation/Main/View/ActivityCardView.swift @@ -70,11 +70,7 @@ final class ActivityCardView: UIView { //MARK: - set Layout private func setLayout() { - self.snp.makeConstraints { - $0.width.equalTo(335.adjusted) - $0.height.equalTo(405.adjusted) - } - + ringImageView.snp.makeConstraints { $0.top.equalToSuperview().inset(34.adjusted) $0.centerX.equalToSuperview() @@ -83,6 +79,7 @@ final class ActivityCardView: UIView { activityStackView.snp.makeConstraints { $0.top.equalToSuperview().inset(255.adjusted) $0.leading.equalToSuperview().inset(20.adjusted) + $0.trailing.equalToSuperview().inset(24.adjusted) } divisionLine.snp.makeConstraints { diff --git a/SOPKATHON_33-iOS/SOPKATHON_33-iOS/Presentation/Main/View/IdCardView.swift b/SOPKATHON_33-iOS/SOPKATHON_33-iOS/Presentation/Main/View/IdCardView.swift index d9c0a0b..a4321e0 100644 --- a/SOPKATHON_33-iOS/SOPKATHON_33-iOS/Presentation/Main/View/IdCardView.swift +++ b/SOPKATHON_33-iOS/SOPKATHON_33-iOS/Presentation/Main/View/IdCardView.swift @@ -46,7 +46,7 @@ final class IdCardView: UIView { self.do { $0.frame = CGRect(x: 0, y: 0, width: 335, height: 185) } - + backgroundImageView.do { $0.image = Image.profileCard $0.contentMode = .scaleAspectFill @@ -98,59 +98,51 @@ final class IdCardView: UIView { userCrimeYearAgo, userImageView, editProfileButton) - } //MARK: - set Layout private func setLayout() { - - self.snp.makeConstraints { - $0.width.equalTo(335.adjusted) - $0.height.equalTo(185.adjusted) - } - + backgroundImageView.snp.makeConstraints { $0.edges.equalToSuperview() } userName.snp.makeConstraints { - $0.top.equalToSuperview().inset(35.adjusted) - $0.leading.equalToSuperview().inset(25.adjusted) + $0.top.equalToSuperview().inset(50.adjusted) + $0.leading.equalToSuperview().inset(35.adjusted) } ageChipView.snp.makeConstraints { - $0.top.equalToSuperview().inset(68.adjusted) - $0.leading.equalToSuperview().inset(25.adjusted) + $0.top.equalToSuperview().inset(83.adjusted) + $0.leading.equalToSuperview().inset(35.adjusted) $0.width.equalTo(ageChipView.labelWidth) } genderChipView.snp.makeConstraints { - $0.top.equalToSuperview().inset(68.adjusted) - $0.leading.equalToSuperview().inset(74.adjusted) + $0.top.equalToSuperview().inset(83.adjusted) + $0.leading.equalTo(ageChipView.snp.trailing).offset(7.adjusted) $0.width.equalTo(genderChipView.labelWidth) } userCrimeHistory.snp.makeConstraints { - $0.top.equalToSuperview().inset(104.adjusted) - $0.leading.equalToSuperview().inset(25.adjusted) + $0.top.equalToSuperview().inset(119) + $0.leading.equalToSuperview().inset(35) } userCrimeYearAgo.snp.makeConstraints { - $0.top.equalToSuperview().inset(103.adjusted) - $0.leading.equalToSuperview().inset(96.adjusted) + $0.top.equalToSuperview().inset(118) + $0.leading.equalTo(userCrimeHistory.snp.trailing).offset(10.adjusted) } userImageView.snp.makeConstraints { - $0.top.equalToSuperview().inset(25.adjusted) - $0.trailing.equalToSuperview().inset(25.adjusted) - $0.width.equalTo(65.adjusted) - $0.height.equalTo(65.adjusted) + $0.top.equalToSuperview().inset(40.adjusted) + $0.leading.equalTo(userName.snp.trailing).offset(173.adjusted) } editProfileButton.snp.makeConstraints { - $0.top.equalToSuperview().inset(69.adjusted) - $0.leading.equalToSuperview().inset(289.adjusted) + $0.top.equalToSuperview().inset(84.adjusted) + $0.leading.equalTo(genderChipView.snp.trailing).offset(178.adjusted) } } }