From 1842fcdafeb8c2665779310b41f0f60bf0808671 Mon Sep 17 00:00:00 2001 From: yungu0010 Date: Thu, 11 Jan 2024 16:23:53 +0900 Subject: [PATCH] =?UTF-8?q?[Fix]=20#217=20-=20=EB=8B=A4=EC=9D=B4=EC=96=BC?= =?UTF-8?q?=EB=A1=9C=EA=B7=B8=20=EB=B7=B0=20=EC=9E=AC=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iOS-NOTTODO.xcodeproj/project.pbxproj | 4 +- .../NotificationDialogViewController.swift | 107 +++++++++++++++++- 2 files changed, 106 insertions(+), 5 deletions(-) diff --git a/iOS-NOTTODO/iOS-NOTTODO.xcodeproj/project.pbxproj b/iOS-NOTTODO/iOS-NOTTODO.xcodeproj/project.pbxproj index 5674f138..81370737 100644 --- a/iOS-NOTTODO/iOS-NOTTODO.xcodeproj/project.pbxproj +++ b/iOS-NOTTODO/iOS-NOTTODO.xcodeproj/project.pbxproj @@ -1555,7 +1555,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.1; + MARKETING_VERSION = 1.0.2; PRODUCT_BUNDLE_IDENTIFIER = "nottodo.iOS-NOTTODO"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -1593,7 +1593,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.1; + MARKETING_VERSION = 1.0.2; PRODUCT_BUNDLE_IDENTIFIER = "nottodo.iOS-NOTTODO"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/iOS-NOTTODO/iOS-NOTTODO/Presentation/NotificatoinDialog/ViewControllers/NotificationDialogViewController.swift b/iOS-NOTTODO/iOS-NOTTODO/Presentation/NotificatoinDialog/ViewControllers/NotificationDialogViewController.swift index 8e49b69a..8ab5de09 100644 --- a/iOS-NOTTODO/iOS-NOTTODO/Presentation/NotificatoinDialog/ViewControllers/NotificationDialogViewController.swift +++ b/iOS-NOTTODO/iOS-NOTTODO/Presentation/NotificatoinDialog/ViewControllers/NotificationDialogViewController.swift @@ -11,7 +11,7 @@ import SnapKit import Then final class NotificationDialogViewController: UIViewController { - + // MARK: - Properties var buttonHandler: (() -> Void)? @@ -20,7 +20,17 @@ final class NotificationDialogViewController: UIViewController { private let bellImage = UIImageView() private let titleLabel = UILabel() + private let alertView = UIView() private let bottomButton = UIButton() + private let alertTitleMessageLabel = UILabel() + private let alertSubTitleMessageLabel = UILabel() + private let notAllowButton = UIButton() + private let allowButton = UIButton() + private let buttonStackView = UIStackView() + private let circleImage = UIImageView() + private let backgroundImage = UIImageView() + private let verticalView = UIView() + private let horizontalView = UIView() // MARK: - Life Cycle @@ -29,14 +39,16 @@ final class NotificationDialogViewController: UIViewController { setUI() setLayout() } - } extension NotificationDialogViewController { private func setUI() { + view.backgroundColor = .ntdBlack bellImage.image = .icBell + circleImage.image = .icCircle + backgroundImage.image = .notificationDialog titleLabel.do { $0.text = I18N.notiDialogTitle @@ -46,6 +58,39 @@ extension NotificationDialogViewController { $0.textAlignment = .center } + alertTitleMessageLabel.do { + $0.text = I18N.notiAllowTitle + $0.textColor = .notiBlack + $0.font = .Pretendard(.semiBold, size: 18) + $0.numberOfLines = 0 + $0.textAlignment = .center + } + + alertSubTitleMessageLabel.do { + $0.text = I18N.notiAllowSubTitle + $0.textColor = .gray3 + $0.font = .Pretendard(.medium, size: 13) + $0.numberOfLines = 0 + $0.textAlignment = .center + } + + buttonStackView.do { + $0.layer.cornerRadius = 17 + $0.backgroundColor = .none + } + + allowButton.do { + $0.setTitle(I18N.allow, for: .normal) + $0.setTitleColor(.notiBlue, for: .normal) + $0.titleLabel?.font = .Pretendard(.semiBold, size: 18) + } + + notAllowButton.do { + $0.setTitle(I18N.notAllow, for: .normal) + $0.setTitleColor(.gray4, for: .normal) + $0.titleLabel?.font = .Pretendard(.medium, size: 15) + } + bottomButton.do { $0.backgroundColor = .white $0.layer.cornerRadius = 25 @@ -55,10 +100,19 @@ extension NotificationDialogViewController { $0.addTarget(self, action: #selector(buttonTapped), for: .touchUpInside) } + alertView.do { + $0.backgroundColor = .none + $0.layer.cornerRadius = 17 + } + + verticalView.backgroundColor = .notiGreen + horizontalView.backgroundColor = .notiGreen } private func setLayout() { - view.addSubviews(bellImage, titleLabel, bottomButton) + view.addSubviews(bellImage, titleLabel, alertView, bottomButton, circleImage) + alertView.addSubviews(backgroundImage, alertTitleMessageLabel, alertSubTitleMessageLabel, horizontalView, buttonStackView) + buttonStackView.addArrangedSubviews(notAllowButton, verticalView, allowButton) bellImage.snp.makeConstraints { $0.top.equalTo(view.safeAreaLayoutGuide).inset(convertByHeightRatio(63)) @@ -77,6 +131,53 @@ extension NotificationDialogViewController { $0.directionalHorizontalEdges.equalToSuperview().inset(convertByHeightRatio(15)) $0.height.equalTo(convertByHeightRatio(50)) } + + alertView.snp.makeConstraints { + $0.top.equalTo(titleLabel.snp.bottom).offset(convertByHeightRatio(36)) + $0.directionalHorizontalEdges.equalToSuperview().inset(convertByHeightRatio(46)) + $0.bottom.equalTo(bottomButton.snp.top).inset(convertByHeightRatio(-186)) + } + + backgroundImage.snp.makeConstraints { + $0.center.equalToSuperview() + $0.size.equalToSuperview() + } + + alertTitleMessageLabel.snp.makeConstraints { + $0.top.equalToSuperview().inset(convertByHeightRatio(26)) + $0.centerX.equalToSuperview() + $0.height.equalTo(convertByHeightRatio(48)) + } + + alertSubTitleMessageLabel.snp.makeConstraints { + $0.top.equalTo(alertTitleMessageLabel.snp.bottom).offset(convertByHeightRatio(7)) + $0.directionalHorizontalEdges.equalToSuperview() + $0.height.equalTo(convertByHeightRatio(36)) + } + + buttonStackView.snp.makeConstraints { + $0.directionalHorizontalEdges.bottom.equalToSuperview() + $0.height.equalTo(convertByHeightRatio(48)) + } + + horizontalView.snp.makeConstraints { + $0.directionalHorizontalEdges.equalToSuperview() + $0.height.equalTo(convertByHeightRatio(1)) + $0.bottom.equalTo(buttonStackView.snp.top) + } + + verticalView.snp.makeConstraints { + $0.width.equalTo(convertByHeightRatio(1)) + } + + circleImage.snp.makeConstraints { + $0.center.equalTo(allowButton.snp.center) + $0.size.equalTo(convertByHeightRatio(77)) + } + + allowButton.snp.makeConstraints { + $0.width.equalToSuperview().dividedBy(2) + } } @objc