From dd4b44d3d8ce3d581152012939e993d492611d03 Mon Sep 17 00:00:00 2001 From: Sangwoo Byeon Date: Sun, 14 Jan 2024 01:28:14 +0900 Subject: [PATCH 1/3] =?UTF-8?q?[Feat]=20#50=20-=20=ED=88=AC=EB=AA=85?= =?UTF-8?q?=EB=8F=84=20=ED=8D=BC=EC=84=BC=ED=8A=B8=EC=97=90=20=EB=94=B0?= =?UTF-8?q?=EB=A5=B8=20UI=20=EB=B3=80=EA=B2=BD=20=EC=99=84=EB=A3=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MyPage/Views/MyPageProfileView.swift | 38 +++++++++---------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/DontBe-iOS/DontBe-iOS/Presentation/MyPage/Views/MyPageProfileView.swift b/DontBe-iOS/DontBe-iOS/Presentation/MyPage/Views/MyPageProfileView.swift index 0fe46399..2383180c 100644 --- a/DontBe-iOS/DontBe-iOS/Presentation/MyPage/Views/MyPageProfileView.swift +++ b/DontBe-iOS/DontBe-iOS/Presentation/MyPage/Views/MyPageProfileView.swift @@ -13,6 +13,8 @@ final class MyPageProfileView: UIView { // MARK: - Properties + let transparencyValue: Int = -85 + // MARK: - UI Components private let profileImageView: UIImageView = { @@ -39,7 +41,7 @@ final class MyPageProfileView: UIView { let userIntroduction: UILabel = { let label = UILabel() - label.setTextWithLineHeight(text: "안녕하세요반가와요우히히안녕하세요반가와요우히히안녕하세요반가와요우히히안녕하세요반가와요우히히히히", lineHeight: 20.adjusted) + label.setTextWithLineHeight(text: "안녕하세요반가와요우히히안녕하세요반가와요우히히안녕하세요반가와요우히히안녕하세요반가와요우히히히히", lineHeight: 20.adjusted, alignment: .center) label.textColor = .donGray7 label.textAlignment = .center label.font = .font(.caption2) @@ -65,14 +67,20 @@ final class MyPageProfileView: UIView { private let emptyTransparencyPercentage: UIImageView = { let imageView = UIImageView() imageView.image = ImageLiterals.MyPage.emptyPercentage - imageView.contentMode = .scaleAspectFit + imageView.contentMode = .left + imageView.clipsToBounds = true + imageView.layer.cornerRadius = 5.adjusted + imageView.layer.masksToBounds = true return imageView }() private let fullTransparencyPercentage: UIImageView = { let imageView = UIImageView() imageView.image = ImageLiterals.MyPage.fullPercentage - imageView.contentMode = .scaleAspectFit + imageView.contentMode = .left + imageView.clipsToBounds = true + imageView.layer.cornerRadius = 5.adjusted + imageView.layer.masksToBounds = true return imageView }() @@ -100,8 +108,6 @@ final class MyPageProfileView: UIView { setUI() setHierarchy() setLayout() - setAddTarget() - setRegisterCell() } @available(*, unavailable) @@ -115,6 +121,7 @@ final class MyPageProfileView: UIView { extension MyPageProfileView { private func setUI() { self.backgroundColor = .donBlack + self.transparencyLabel.text = "\(self.transparencyValue)%" } private func setHierarchy() { @@ -157,7 +164,7 @@ extension MyPageProfileView { } percentageBox.snp.makeConstraints { - $0.trailing.equalToSuperview().inset(16.adjusted) + $0.trailing.equalToSuperview().offset(((CGFloat(self.transparencyValue) * (UIScreen.main.bounds.width - 32.adjusted)) / 100) - 16.adjusted) $0.bottom.equalTo(fullTransparencyPercentage.snp.top).offset(-4.adjusted) $0.height.equalTo(28.adjusted) } @@ -174,9 +181,10 @@ extension MyPageProfileView { } fullTransparencyPercentage.snp.makeConstraints { - $0.top.equalTo(userIntroduction.snp.bottom).offset(48.adjusted) - $0.leading.trailing.equalToSuperview().inset(16.adjusted) - $0.height.equalTo(10.adjusted) + $0.top.equalTo(emptyTransparencyPercentage) + $0.leading.equalToSuperview().inset(16.adjusted) + $0.trailing.equalTo(percentageBox.snp.trailing) + $0.height.equalTo(emptyTransparencyPercentage) } transparencyInfoButton.snp.makeConstraints { @@ -184,16 +192,4 @@ extension MyPageProfileView { $0.leading.equalTo(fullTransparencyPercentage.snp.leading).offset(-10.adjusted) } } - - private func setAddTarget() { - - } - - private func setRegisterCell() { - - } - - private func setDataBind() { - - } } From 1ab9d4daf6d668715bf9da516dec52c5c973baff Mon Sep 17 00:00:00 2001 From: Sangwoo Byeon Date: Sun, 14 Jan 2024 02:03:56 +0900 Subject: [PATCH 2/3] =?UTF-8?q?[Add]=20#50=20-=20=EB=9D=BC=EC=9D=B4?= =?UTF-8?q?=ED=8A=B8=20=EB=AA=A8=EB=93=9C=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DontBe-iOS/DontBe-iOS/Global/Resources/Info.plist | 2 ++ 1 file changed, 2 insertions(+) diff --git a/DontBe-iOS/DontBe-iOS/Global/Resources/Info.plist b/DontBe-iOS/DontBe-iOS/Global/Resources/Info.plist index dfe3e3bf..66d68e72 100644 --- a/DontBe-iOS/DontBe-iOS/Global/Resources/Info.plist +++ b/DontBe-iOS/DontBe-iOS/Global/Resources/Info.plist @@ -2,6 +2,8 @@ + UIUserInterfaceStyle + Light LSApplicationQueriesSchemes kakaolink From f0e3321a83b89ad6ec2331452cd9d62a568ccd42 Mon Sep 17 00:00:00 2001 From: Sangwoo Byeon Date: Sun, 14 Jan 2024 02:05:21 +0900 Subject: [PATCH 3/3] =?UTF-8?q?[Fix]=20#50=20-=20=EB=A7=88=EC=9D=B4?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=20=EB=84=A4=EB=B9=84=EA=B2=8C?= =?UTF-8?q?=EC=9D=B4=EC=85=98=20=EB=B0=94=20=EC=83=89=EC=83=81=20=EC=A0=81?= =?UTF-8?q?=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MyPage/ViewControllers/MyPageViewController.swift | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/DontBe-iOS/DontBe-iOS/Presentation/MyPage/ViewControllers/MyPageViewController.swift b/DontBe-iOS/DontBe-iOS/Presentation/MyPage/ViewControllers/MyPageViewController.swift index ea000be3..00e6adfc 100644 --- a/DontBe-iOS/DontBe-iOS/Presentation/MyPage/ViewControllers/MyPageViewController.swift +++ b/DontBe-iOS/DontBe-iOS/Presentation/MyPage/ViewControllers/MyPageViewController.swift @@ -58,9 +58,19 @@ final class MyPageViewController: UIViewController { extension MyPageViewController { private func setUI() { + self.view.backgroundColor = .donBlack self.tabBarController?.tabBar.isTranslucent = true self.title = StringLiterals.MyPage.MyPageNavigationTitle self.navigationController?.navigationBar.titleTextAttributes = [.foregroundColor: UIColor.donWhite] + self.navigationController?.navigationBar.tintColor = .donBlack + self.navigationController?.navigationBar.barTintColor = .donBlack + self.navigationController?.navigationBar.backgroundColor = .donBlack + self.navigationController?.navigationBar.setBackgroundImage(UIImage(), for: .default) + self.navigationController?.navigationBar.isTranslucent = true + + let statusBarView = UIView(frame: UIApplication.shared.statusBarFrame) + statusBarView.backgroundColor = UIColor.donBlack // 적절한 색상으로 변경 가능 + view.addSubview(statusBarView) let image = ImageLiterals.MyPage.icnMenu let renderedImage = image.withRenderingMode(.alwaysOriginal)