From 74679aff95658a38dc306b69dcb8aead05c086f0 Mon Sep 17 00:00:00 2001 From: youz2me Date: Mon, 15 Jul 2024 01:35:47 +0900 Subject: [PATCH 01/22] =?UTF-8?q?fix/#176=20rootView=EB=A1=9C=20=EB=84=A4?= =?UTF-8?q?=EC=9D=B4=EB=B0=8D=20=EC=A0=84=ED=99=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ViewController/ReadyStatusViewController.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/KkuMulKum/Source/Promise/ReadyStatus/ViewController/ReadyStatusViewController.swift b/KkuMulKum/Source/Promise/ReadyStatus/ViewController/ReadyStatusViewController.swift index 78876385..0d2bcb8d 100644 --- a/KkuMulKum/Source/Promise/ReadyStatus/ViewController/ReadyStatusViewController.swift +++ b/KkuMulKum/Source/Promise/ReadyStatus/ViewController/ReadyStatusViewController.swift @@ -8,11 +8,11 @@ import UIKit class ReadyStatusViewController: BaseViewController { - private let readyStatusView: ReadyStatusView = ReadyStatusView() + private let rootView: ReadyStatusView = ReadyStatusView() override func viewDidLoad() { super.viewDidLoad() - view.addSubview(readyStatusView) + view.addSubview(rootView) } } From 9cda8af51d0795c0a714aab3daddc4894d5b1bad Mon Sep 17 00:00:00 2001 From: youz2me Date: Mon, 15 Jul 2024 01:36:41 +0900 Subject: [PATCH 02/22] =?UTF-8?q?feat/#176=20=EC=86=8C=EC=9A=94=EC=8B=9C?= =?UTF-8?q?=EA=B0=84=20=EC=A0=95=EB=B3=B4=20=EB=B7=B0=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Source/Promise/ReadyStatus/View/ReadyStatusView.swift | 6 ------ 1 file changed, 6 deletions(-) diff --git a/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusView.swift b/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusView.swift index 37ce3d08..336a29e9 100644 --- a/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusView.swift +++ b/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusView.swift @@ -8,11 +8,5 @@ import UIKit class ReadyStatusView: BaseView { - override init(frame: CGRect) { - super.init(frame: frame) - } - required init?(coder: NSCoder) { - fatalError("init(coder:) has not been implemented") - } } From b28c076712656385e8e7eee09d43e15a8331c5d7 Mon Sep 17 00:00:00 2001 From: youz2me Date: Mon, 15 Jul 2024 01:37:02 +0900 Subject: [PATCH 03/22] =?UTF-8?q?feat/#176=20=EC=86=8C=EC=9A=94=EC=8B=9C?= =?UTF-8?q?=EA=B0=84=20=EC=A0=95=EB=B3=B4=20=EB=B7=B0=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ReadyStatus/View/ReadyPlanInfoView.swift | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyPlanInfoView.swift b/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyPlanInfoView.swift index 355010eb..16a40326 100644 --- a/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyPlanInfoView.swift +++ b/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyPlanInfoView.swift @@ -12,4 +12,54 @@ class ReadyPlanInfoView: BaseView { $0.setText("12시 30분에 준비하고,\n1시에 이동을 시작해야 해요", style: .body03) $0.setHighlightText("12시 30분", "1시", style: .body03, color: .maincolor) } + + private let requestReadyTimeLabel: UILabel = UILabel().then { + $0.setText("준비 소요 시간: 30분", style: .label02, color: .gray8) + } + + private let requestMoveTimeLabel: UILabel = UILabel().then { + $0.setText("이동 소요 시간: 1시간 30분", style: .label02, color: .gray8) + } + + private let editButton: UIButton = UIButton().then { + $0.setTitle("수정", for: .normal) + $0.setTitleColor(.gray6, for: .normal) + $0.titleLabel?.font = .pretendard(.caption01) + $0.backgroundColor = .gray0 + $0.layer.cornerRadius = 50 + $0.clipsToBounds = true + } + + override func setupView() { + addSubviews( + readyTimeLabel, + requestReadyTimeLabel, + requestMoveTimeLabel, + editButton + ) + } + + override func setupAutoLayout() { + readyTimeLabel.snp.makeConstraints { + $0.top.equalToSuperview().offset(16) + $0.leading.equalToSuperview().offset(20) + } + + requestReadyTimeLabel.snp.makeConstraints { + $0.top.equalTo(readyTimeLabel.snp.bottom).offset(12) + $0.leading.equalToSuperview().offset(20) + } + + requestMoveTimeLabel.snp.makeConstraints { + $0.top.equalTo(requestReadyTimeLabel.snp.bottom).offset(8) + $0.leading.equalToSuperview().offset(20) + $0.bottom.equalToSuperview().inset(18) + } + + editButton.snp.makeConstraints { + $0.trailing.equalToSuperview().inset(22) + $0.bottom.equalToSuperview().inset(18) + $0.height.equalTo(Screen.height(28)) + } + } } From 48984374e2d85f72f83f4e3ed358ef3c07651a8e Mon Sep 17 00:00:00 2001 From: youz2me Date: Mon, 15 Jul 2024 01:38:06 +0900 Subject: [PATCH 04/22] =?UTF-8?q?feat/#176=20rootView=20viewDidLoad()?= =?UTF-8?q?=EC=97=90=EC=84=9C=20loadView()=EC=97=90=EC=84=9C=20=EC=84=A4?= =?UTF-8?q?=EC=A0=95=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ViewController/ReadyStatusViewController.swift | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/KkuMulKum/Source/Promise/ReadyStatus/ViewController/ReadyStatusViewController.swift b/KkuMulKum/Source/Promise/ReadyStatus/ViewController/ReadyStatusViewController.swift index 0d2bcb8d..90857442 100644 --- a/KkuMulKum/Source/Promise/ReadyStatus/ViewController/ReadyStatusViewController.swift +++ b/KkuMulKum/Source/Promise/ReadyStatus/ViewController/ReadyStatusViewController.swift @@ -10,9 +10,7 @@ import UIKit class ReadyStatusViewController: BaseViewController { private let rootView: ReadyStatusView = ReadyStatusView() - override func viewDidLoad() { - super.viewDidLoad() - - view.addSubview(rootView) + override func loadView() { + view = rootView } } From 34339055f0a9817131780247e96924fc210cb192 Mon Sep 17 00:00:00 2001 From: youz2me Date: Mon, 15 Jul 2024 02:34:02 +0900 Subject: [PATCH 05/22] =?UTF-8?q?feat/#176=20=ED=99=94=EB=A9=B4=20?= =?UTF-8?q?=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- KkuMulKum.xcodeproj/project.pbxproj | 8 ++ .../ReadyStatus/View/ReadyStatusButton.swift | 75 +++++++++++++++++++ .../View/ReadyStatusProgressView.swift | 44 +++++++++++ .../ReadyStatus/View/ReadyStatusView.swift | 8 ++ 4 files changed, 135 insertions(+) create mode 100644 KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusButton.swift create mode 100644 KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusProgressView.swift diff --git a/KkuMulKum.xcodeproj/project.pbxproj b/KkuMulKum.xcodeproj/project.pbxproj index 95951034..243c25ae 100644 --- a/KkuMulKum.xcodeproj/project.pbxproj +++ b/KkuMulKum.xcodeproj/project.pbxproj @@ -104,6 +104,8 @@ DD43937C2C412F4500EC1799 /* InviteCodeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD4393742C412F4500EC1799 /* InviteCodeViewController.swift */; }; DD43937D2C412F4500EC1799 /* CheckInviteCodeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD4393752C412F4500EC1799 /* CheckInviteCodeViewController.swift */; }; DD43937F2C41357800EC1799 /* InviteCodeViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD43937E2C41357800EC1799 /* InviteCodeViewModel.swift */; }; + DD7698192C443D7E00EB09FA /* ReadyStatusProgressView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD7698182C443D7E00EB09FA /* ReadyStatusProgressView.swift */; }; + DD76981B2C44402A00EB09FA /* ReadyStatusButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD76981A2C44402A00EB09FA /* ReadyStatusButton.swift */; }; DD931B6B2C3D9EBB00526452 /* ReadyStatusView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD931B6A2C3D9EBB00526452 /* ReadyStatusView.swift */; }; DD931B6E2C3DA27F00526452 /* ParticipantCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD931B6D2C3DA27F00526452 /* ParticipantCollectionViewCell.swift */; }; DD931B722C3DA92700526452 /* EnterReadyInfoButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD931B712C3DA92700526452 /* EnterReadyInfoButtonView.swift */; }; @@ -238,6 +240,8 @@ DD4393742C412F4500EC1799 /* InviteCodeViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InviteCodeViewController.swift; sourceTree = ""; }; DD4393752C412F4500EC1799 /* CheckInviteCodeViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CheckInviteCodeViewController.swift; sourceTree = ""; }; DD43937E2C41357800EC1799 /* InviteCodeViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InviteCodeViewModel.swift; sourceTree = ""; }; + DD7698182C443D7E00EB09FA /* ReadyStatusProgressView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadyStatusProgressView.swift; sourceTree = ""; }; + DD76981A2C44402A00EB09FA /* ReadyStatusButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadyStatusButton.swift; sourceTree = ""; }; DD931B6A2C3D9EBB00526452 /* ReadyStatusView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadyStatusView.swift; sourceTree = ""; }; DD931B6D2C3DA27F00526452 /* ParticipantCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ParticipantCollectionViewCell.swift; sourceTree = ""; }; DD931B712C3DA92700526452 /* EnterReadyInfoButtonView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnterReadyInfoButtonView.swift; sourceTree = ""; }; @@ -737,6 +741,8 @@ DD931B6A2C3D9EBB00526452 /* ReadyStatusView.swift */, DD931B712C3DA92700526452 /* EnterReadyInfoButtonView.swift */, DD931B732C3DAB9A00526452 /* ReadyPlanInfoView.swift */, + DD7698182C443D7E00EB09FA /* ReadyStatusProgressView.swift */, + DD76981A2C44402A00EB09FA /* ReadyStatusButton.swift */, ); path = View; sourceTree = ""; @@ -1396,6 +1402,7 @@ DD43937A2C412F4500EC1799 /* FinishCreateViewController.swift in Sources */, DE254AAC2C31192400A4015E /* UILabel+.swift in Sources */, DE254AB72C3119D000A4015E /* ReuseIdentifiable.swift in Sources */, + DD7698192C443D7E00EB09FA /* ReadyStatusProgressView.swift in Sources */, A3DD9C412C41BAD000E58A13 /* MeetingListViewModel.swift in Sources */, DDAF1C922C3D6E3D008A37D3 /* PromiseInfoViewController.swift in Sources */, 78AED1342C3D951F000AD80A /* NicknameViewController.swift in Sources */, @@ -1470,6 +1477,7 @@ DDAF1C842C3D5D19008A37D3 /* ViewModelType.swift in Sources */, DD3072262C3C0F0B00416D9F /* PromiseLateInfoResponseModel.swift in Sources */, DE254AB92C311AB300A4015E /* Screen.swift in Sources */, + DD76981B2C44402A00EB09FA /* ReadyStatusButton.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusButton.swift b/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusButton.swift new file mode 100644 index 00000000..58b4463d --- /dev/null +++ b/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusButton.swift @@ -0,0 +1,75 @@ +// +// ReadyStatusButton.swift +// KkuMulKum +// +// Created by YOUJIM on 7/15/24. +// + +import UIKit + +enum ReadyStatus { + case none + case ready + case boarding + case done +} + +class ReadyStatusButton: UIButton { + static let defaultWidth: CGFloat = Screen.width(335) + static let defaultHeight: CGFloat = Screen.height(52) + + init(readyStatus: ReadyStatus) { + super.init(frame: .zero) + + setupButton(title, readyStatus) + } + + override init(frame: CGRect) { + super.init(frame: frame) + } + + required init?(coder: NSCoder) { + super.init(coder: coder) + } +} + +private extension ReadyStatusButton { + func setupButton( + _ title: String, + _ readyStatus: ReadyStatus + ) { + switch readyStatus { + case .none: + self.backgroundColor = .white + self.layer.borderColor = UIColor.gray3.cgColor + setTitle(title, style: .body05, color: .gray3) + case .ready: + self.backgroundColor = .white + self.layer.borderColor = UIColor.gray3.cgColor + setTitle(title, style: .body05, color: .gray3) + case .boarding: + self.backgroundColor = .green2 + self.layer.borderColor = UIColor.maincolor.cgColor + setTitle(title, style: .body05, color: .gray3) + case .done: + self.backgroundColor = .white + self.layer.borderColor = UIColor.gray3.cgColor + setTitle(title, style: .body05, color: .gray3) + } + + } + + func updateButtonColor() { + backgroundColor = isEnabled ? .maincolor : .gray2 + } + + @objc + func buttonPressed() { + rea + } + + @objc + func buttonReleased() { + updateButtonColor() + } +} diff --git a/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusProgressView.swift b/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusProgressView.swift new file mode 100644 index 00000000..1a4991f1 --- /dev/null +++ b/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusProgressView.swift @@ -0,0 +1,44 @@ +// +// ReadyStatusProgressView.swift +// KkuMulKum +// +// Created by YOUJIM on 7/15/24. +// + +import UIKit + +class ReadyStatusProgressView: BaseView { + private let statusProgressView: UIProgressView = UIProgressView().then { + $0.trackTintColor = .gray2 + $0.progressTintColor = .maincolor + } + + private let readyStartTimeLabel: UILabel = UILabel().then { + $0.setText("AM hh:mm", style: .caption02, color: .gray8) + } + + private let readyStartCheckImageView: UIImageView = UIImageView(backgroundColor: .gray2).then { + $0.layer.cornerRadius = Screen.height(16 / 2) + $0.clipsToBounds = true + } + + private let + + private let moveStartTimeLabel: UILabel = UILabel().then { + $0.setText("AM hh:mm", style: .caption02, color: .gray8) + } + + private let moveStartCheckImageView: UIImageView = UIImageView(backgroundColor: .gray2).then { + $0.layer.cornerRadius = Screen.height(16 / 2) + $0.clipsToBounds = true + } + + private let arrivalTimeLabel: UILabel = UILabel().then { + $0.setText("AM hh:mm", style: .caption02, color: .gray8) + } + + private let arrivalCheckImageView: UIImageView = UIImageView(backgroundColor: .gray2).then { + $0.layer.cornerRadius = Screen.height(16 / 2) + $0.clipsToBounds = true + } +} diff --git a/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusView.swift b/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusView.swift index 336a29e9..d1733ae8 100644 --- a/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusView.swift +++ b/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusView.swift @@ -8,5 +8,13 @@ import UIKit class ReadyStatusView: BaseView { + private let enterReadyButtonView: EnterReadyInfoButtonView = EnterReadyInfoButtonView() + private let readyPlanInfoView: ReadyPlanInfoView = ReadyPlanInfoView() + + private let myReadyStatusTitleLabel: UILabel = UILabel().then { + $0.setText("나의 준비 현황", style: .body01, color: .gray8) + } + + private let } From 350b162e4dcfd73d59d7cd4327b78b51a1e30a18 Mon Sep 17 00:00:00 2001 From: youz2me Date: Mon, 15 Jul 2024 06:44:12 +0900 Subject: [PATCH 06/22] =?UTF-8?q?feat/#176=20=EC=A4=80=EB=B9=84=20?= =?UTF-8?q?=ED=98=84=ED=99=A9=20=EB=B7=B0=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- KkuMulKum.xcodeproj/project.pbxproj | 12 ++ .../img_splash.imageset/Contents.json | 0 .../img_splash.imageset/img_splash.svg | 0 .../img_text_popup.imageset/Contents.json | 12 ++ .../img_text_popup.imageset/text_popup.svg | 4 + .../Cell/OurReadyStatusTableViewCell.swift | 48 +++++++ .../ReadyStatus/View/ReadyStatusButton.swift | 45 +++---- .../View/ReadyStatusProgressView.swift | 124 +++++++++++++++++- .../ReadyStatus/View/ReadyStatusView.swift | 43 +++++- 9 files changed, 261 insertions(+), 27 deletions(-) rename KkuMulKum/Resource/Assets.xcassets/{ => Image}/img_splash.imageset/Contents.json (100%) rename KkuMulKum/Resource/Assets.xcassets/{ => Image}/img_splash.imageset/img_splash.svg (100%) create mode 100644 KkuMulKum/Resource/Assets.xcassets/Image/img_text_popup.imageset/Contents.json create mode 100644 KkuMulKum/Resource/Assets.xcassets/Image/img_text_popup.imageset/text_popup.svg create mode 100644 KkuMulKum/Source/Promise/ReadyStatus/Cell/OurReadyStatusTableViewCell.swift diff --git a/KkuMulKum.xcodeproj/project.pbxproj b/KkuMulKum.xcodeproj/project.pbxproj index 243c25ae..961aae01 100644 --- a/KkuMulKum.xcodeproj/project.pbxproj +++ b/KkuMulKum.xcodeproj/project.pbxproj @@ -106,6 +106,7 @@ DD43937F2C41357800EC1799 /* InviteCodeViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD43937E2C41357800EC1799 /* InviteCodeViewModel.swift */; }; DD7698192C443D7E00EB09FA /* ReadyStatusProgressView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD7698182C443D7E00EB09FA /* ReadyStatusProgressView.swift */; }; DD76981B2C44402A00EB09FA /* ReadyStatusButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD76981A2C44402A00EB09FA /* ReadyStatusButton.swift */; }; + DD76981D2C44767E00EB09FA /* OurReadyStatusTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD76981C2C44767E00EB09FA /* OurReadyStatusTableViewCell.swift */; }; DD931B6B2C3D9EBB00526452 /* ReadyStatusView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD931B6A2C3D9EBB00526452 /* ReadyStatusView.swift */; }; DD931B6E2C3DA27F00526452 /* ParticipantCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD931B6D2C3DA27F00526452 /* ParticipantCollectionViewCell.swift */; }; DD931B722C3DA92700526452 /* EnterReadyInfoButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD931B712C3DA92700526452 /* EnterReadyInfoButtonView.swift */; }; @@ -242,6 +243,7 @@ DD43937E2C41357800EC1799 /* InviteCodeViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InviteCodeViewModel.swift; sourceTree = ""; }; DD7698182C443D7E00EB09FA /* ReadyStatusProgressView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadyStatusProgressView.swift; sourceTree = ""; }; DD76981A2C44402A00EB09FA /* ReadyStatusButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadyStatusButton.swift; sourceTree = ""; }; + DD76981C2C44767E00EB09FA /* OurReadyStatusTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OurReadyStatusTableViewCell.swift; sourceTree = ""; }; DD931B6A2C3D9EBB00526452 /* ReadyStatusView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadyStatusView.swift; sourceTree = ""; }; DD931B6D2C3DA27F00526452 /* ParticipantCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ParticipantCollectionViewCell.swift; sourceTree = ""; }; DD931B712C3DA92700526452 /* EnterReadyInfoButtonView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnterReadyInfoButtonView.swift; sourceTree = ""; }; @@ -863,6 +865,14 @@ path = ViewModel; sourceTree = ""; }; + DD76981E2C44768100EB09FA /* Cell */ = { + isa = PBXGroup; + children = ( + DD76981C2C44767E00EB09FA /* OurReadyStatusTableViewCell.swift */, + ); + path = Cell; + sourceTree = ""; + }; DD865B652C3920F600C351A2 /* Onboarding */ = { isa = PBXGroup; children = ( @@ -889,6 +899,7 @@ children = ( DD3976952C41CC2200E2A4C4 /* ViewController */, DD3976962C41CC2C00E2A4C4 /* View */, + DD76981E2C44768100EB09FA /* Cell */, ); path = ReadyStatus; sourceTree = ""; @@ -1463,6 +1474,7 @@ DD3976882C41C2AD00E2A4C4 /* UpcomingEmptyView.swift in Sources */, DD931B762C3DC16100526452 /* PromiseInfoView.swift in Sources */, DD3072242C3C0EB200416D9F /* MyPromiseReadyInfoRequestModel.swift in Sources */, + DD76981D2C44767E00EB09FA /* OurReadyStatusTableViewCell.swift in Sources */, DD3976872C41C2AD00E2A4C4 /* TodayPromiseView.swift in Sources */, 789873332C3D1A7B00435E96 /* LoginViewModel.swift in Sources */, 782B40752C3DBFBA008B0CA7 /* ProfileView.swift in Sources */, diff --git a/KkuMulKum/Resource/Assets.xcassets/img_splash.imageset/Contents.json b/KkuMulKum/Resource/Assets.xcassets/Image/img_splash.imageset/Contents.json similarity index 100% rename from KkuMulKum/Resource/Assets.xcassets/img_splash.imageset/Contents.json rename to KkuMulKum/Resource/Assets.xcassets/Image/img_splash.imageset/Contents.json diff --git a/KkuMulKum/Resource/Assets.xcassets/img_splash.imageset/img_splash.svg b/KkuMulKum/Resource/Assets.xcassets/Image/img_splash.imageset/img_splash.svg similarity index 100% rename from KkuMulKum/Resource/Assets.xcassets/img_splash.imageset/img_splash.svg rename to KkuMulKum/Resource/Assets.xcassets/Image/img_splash.imageset/img_splash.svg diff --git a/KkuMulKum/Resource/Assets.xcassets/Image/img_text_popup.imageset/Contents.json b/KkuMulKum/Resource/Assets.xcassets/Image/img_text_popup.imageset/Contents.json new file mode 100644 index 00000000..b0281910 --- /dev/null +++ b/KkuMulKum/Resource/Assets.xcassets/Image/img_text_popup.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "text_popup.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/KkuMulKum/Resource/Assets.xcassets/Image/img_text_popup.imageset/text_popup.svg b/KkuMulKum/Resource/Assets.xcassets/Image/img_text_popup.imageset/text_popup.svg new file mode 100644 index 00000000..cb94ccdd --- /dev/null +++ b/KkuMulKum/Resource/Assets.xcassets/Image/img_text_popup.imageset/text_popup.svg @@ -0,0 +1,4 @@ + + + + diff --git a/KkuMulKum/Source/Promise/ReadyStatus/Cell/OurReadyStatusTableViewCell.swift b/KkuMulKum/Source/Promise/ReadyStatus/Cell/OurReadyStatusTableViewCell.swift new file mode 100644 index 00000000..f5a99835 --- /dev/null +++ b/KkuMulKum/Source/Promise/ReadyStatus/Cell/OurReadyStatusTableViewCell.swift @@ -0,0 +1,48 @@ +// +// OurReadyStatusTableViewCell.swift +// KkuMulKum +// +// Created by YOUJIM on 7/15/24. +// + +import UIKit + +class OurReadyStatusTableViewCell: BaseTableViewCell { + private let profileImageView: UIImageView = UIImageView(image: .imgProfile).then { + $0.contentMode = .scaleAspectFill + } + + private let nameLabel: UILabel = UILabel().then { + $0.setText("유짐이", style: .body03, color: .gray8) + } + + private let readyStatusButton: ReadyStatusButton = ReadyStatusButton( + title: "준비중", + readyStatus: .ready + ) + + override func setupView() { + addSubviews(profileImageView, nameLabel, readyStatusButton) + } + + override func setupAutoLayout() { + profileImageView.snp.makeConstraints { + $0.centerY.equalToSuperview() + $0.leading.equalToSuperview().offset(12) + $0.height.equalTo(Screen.height(44)) + $0.width.equalTo(profileImageView.snp.height) + } + + nameLabel.snp.makeConstraints { + $0.centerY.equalToSuperview() + $0.leading.equalTo(profileImageView.snp.trailing).offset(13) + } + + readyStatusButton.snp.makeConstraints { + $0.centerY.equalToSuperview() + $0.trailing.equalToSuperview().inset(12) + $0.height.equalTo(Screen.height(28)) + $0.width.equalTo(Screen.width(68)) + } + } +} diff --git a/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusButton.swift b/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusButton.swift index 58b4463d..ed77f4a4 100644 --- a/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusButton.swift +++ b/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusButton.swift @@ -10,15 +10,12 @@ import UIKit enum ReadyStatus { case none case ready - case boarding + case move case done } class ReadyStatusButton: UIButton { - static let defaultWidth: CGFloat = Screen.width(335) - static let defaultHeight: CGFloat = Screen.height(52) - - init(readyStatus: ReadyStatus) { + init(title: String,readyStatus: ReadyStatus) { super.init(frame: .zero) setupButton(title, readyStatus) @@ -38,25 +35,24 @@ private extension ReadyStatusButton { _ title: String, _ readyStatus: ReadyStatus ) { - switch readyStatus { - case .none: - self.backgroundColor = .white - self.layer.borderColor = UIColor.gray3.cgColor - setTitle(title, style: .body05, color: .gray3) - case .ready: - self.backgroundColor = .white - self.layer.borderColor = UIColor.gray3.cgColor - setTitle(title, style: .body05, color: .gray3) - case .boarding: - self.backgroundColor = .green2 - self.layer.borderColor = UIColor.maincolor.cgColor - setTitle(title, style: .body05, color: .gray3) - case .done: - self.backgroundColor = .white - self.layer.borderColor = UIColor.gray3.cgColor - setTitle(title, style: .body05, color: .gray3) - } - + switch readyStatus { + case .none: + self.backgroundColor = .white + self.layer.borderColor = UIColor.gray3.cgColor + setTitle(title, style: .body05, color: .gray3) + case .ready: + self.backgroundColor = .white + self.layer.borderColor = UIColor.gray3.cgColor + setTitle(title, style: .body05, color: .maincolor) + case .move: + self.backgroundColor = .green2 + self.layer.borderColor = UIColor.maincolor.cgColor + setTitle(title, style: .body05, color: .maincolor) + case .done: + self.backgroundColor = .maincolor + self.layer.borderColor = UIColor.maincolor.cgColor + setTitle(title, style: .body05, color: .white) + } } func updateButtonColor() { @@ -65,7 +61,6 @@ private extension ReadyStatusButton { @objc func buttonPressed() { - rea } @objc diff --git a/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusProgressView.swift b/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusProgressView.swift index 1a4991f1..d61ab8bd 100644 --- a/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusProgressView.swift +++ b/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusProgressView.swift @@ -22,7 +22,14 @@ class ReadyStatusProgressView: BaseView { $0.clipsToBounds = true } - private let + private let readyStartButton: ReadyStatusButton = ReadyStatusButton( + title: "준비 중", + readyStatus: .none + ) + + private let readyStartTitleLabel: UILabel = UILabel().then { + $0.setText("준비를 시작 시 눌러주세요", style: .label02, color: .gray5) + } private let moveStartTimeLabel: UILabel = UILabel().then { $0.setText("AM hh:mm", style: .caption02, color: .gray8) @@ -33,6 +40,15 @@ class ReadyStatusProgressView: BaseView { $0.clipsToBounds = true } + private let moveStartButton: ReadyStatusButton = ReadyStatusButton( + title: "이동 시작", + readyStatus: .none + ) + + private let moveStartTitleLabel: UILabel = UILabel().then { + $0.setText("이동을 시작 시 눌러주세요", style: .label02, color: .gray5) + } + private let arrivalTimeLabel: UILabel = UILabel().then { $0.setText("AM hh:mm", style: .caption02, color: .gray8) } @@ -41,4 +57,110 @@ class ReadyStatusProgressView: BaseView { $0.layer.cornerRadius = Screen.height(16 / 2) $0.clipsToBounds = true } + + private let arrivalButton: ReadyStatusButton = ReadyStatusButton( + title: "도착 완료", + readyStatus: .none + ) + + private let arrivalTitleLabel: UILabel = UILabel().then { + $0.setText("도착 시작 시 눌러주세요", style: .label02, color: .gray5) + } + + override func setupView() { + addSubviews( + statusProgressView, + readyStartTimeLabel, + readyStartCheckImageView, + readyStartButton, + readyStartTimeLabel, + moveStartTimeLabel, + moveStartCheckImageView, + moveStartTitleLabel, + arrivalTimeLabel, + arrivalCheckImageView, + arrivalButton, + arrivalTitleLabel + ) + } + + override func setupAutoLayout() { + statusProgressView.snp.makeConstraints { + $0.top.equalToSuperview().offset(31.5) + $0.horizontalEdges.equalToSuperview() + $0.height.equalTo(Screen.height(5)) + } + + readyStartTimeLabel.snp.makeConstraints { + $0.top.equalToSuperview().offset(23) + $0.leading.equalToSuperview().offset(38) + } + + readyStartCheckImageView.snp.makeConstraints { + $0.centerY.equalTo(statusProgressView) + $0.leading.equalToSuperview().offset(53.5) + $0.height.equalTo(Screen.height(16)) + $0.width.equalTo(readyStartCheckImageView.snp.height) + } + + readyStartButton.snp.makeConstraints { + $0.top.equalTo(readyStartCheckImageView.snp.bottom).offset(8) + $0.centerX.equalTo(readyStartCheckImageView) + $0.height.equalTo(Screen.height(32)) + $0.width.equalTo(Screen.width(84)) + } + + readyStartTitleLabel.snp.makeConstraints { + $0.top.equalTo(readyStartButton.snp.bottom).offset(9) + $0.centerX.equalTo(readyStartCheckImageView) + } + + moveStartTimeLabel.snp.makeConstraints { + $0.centerX.equalToSuperview() + $0.centerY.equalTo(readyStartTimeLabel) + } + + moveStartCheckImageView.snp.makeConstraints { + $0.centerX.equalToSuperview() + $0.centerY.equalTo(readyStartCheckImageView) + $0.height.equalTo(Screen.height(16)) + $0.width.equalTo(moveStartCheckImageView.snp.height) + } + + moveStartButton.snp.makeConstraints { + $0.top.equalTo(moveStartCheckImageView.snp.bottom).offset(8) + $0.centerX.equalTo(moveStartCheckImageView) + $0.height.equalTo(Screen.height(32)) + $0.width.equalTo(Screen.width(84)) + } + + moveStartTitleLabel.snp.makeConstraints { + $0.centerX.equalToSuperview() + $0.centerY.equalTo(readyStartTitleLabel) + } + + arrivalTimeLabel.snp.makeConstraints { + $0.trailing.equalToSuperview().inset(38) + $0.centerY.equalTo(readyStartTimeLabel) + } + + arrivalCheckImageView.snp.makeConstraints { + $0.centerX.equalTo(arrivalTimeLabel) + $0.centerY.equalTo(readyStartCheckImageView) + $0.height.equalTo(Screen.height(16)) + $0.width.equalTo(arrivalCheckImageView.snp.height) + } + + arrivalButton.snp.makeConstraints { + $0.top.equalTo(arrivalCheckImageView.snp.bottom).offset(8) + $0.centerX.equalTo(arrivalCheckImageView) + $0.height.equalTo(Screen.height(32)) + $0.width.equalTo(Screen.width(84)) + } + + arrivalTitleLabel.snp.makeConstraints { + $0.centerX.equalTo(arrivalCheckImageView) + $0.centerY.equalTo(readyStartTitleLabel) + } + } } diff --git a/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusView.swift b/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusView.swift index d1733ae8..039ecd2c 100644 --- a/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusView.swift +++ b/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusView.swift @@ -8,6 +8,10 @@ import UIKit class ReadyStatusView: BaseView { + private let baseStackView: UIStackView = UIStackView(axis: .vertical).then { + $0.spacing = 24 + } + private let enterReadyButtonView: EnterReadyInfoButtonView = EnterReadyInfoButtonView() private let readyPlanInfoView: ReadyPlanInfoView = ReadyPlanInfoView() @@ -16,5 +20,42 @@ class ReadyStatusView: BaseView { $0.setText("나의 준비 현황", style: .body01, color: .gray8) } - private let + private let myReadyStatusProgressView: ReadyStatusProgressView = ReadyStatusProgressView() + + private let popUpImageView: UIImageView = UIImageView(image: .imgTextPopup).then { + $0.contentMode = .scaleAspectFit + } + + private let ourReadyStatusLabel: UILabel = UILabel().then { + $0.setText( + "우리들의 준비 현황", + style: .body01, + color: .gray8 + ) + } + + private let ourReadyStatusTableView: UITableView = UITableView().then { + $0.register(OurReadyStatusTableViewCell.self, forCellReuseIdentifier: OurReadyStatusTableViewCell.reuseIdentifier) + } + + override func setupView() { + baseStackView.addArrangedSubviews( + enterReadyButtonView, + readyPlanInfoView, + myReadyStatusTitleLabel, + myReadyStatusProgressView, + popUpImageView, + ourReadyStatusLabel + ) + + addSubview(baseStackView) + } + + override func setupAutoLayout() { + baseStackView.snp.makeConstraints { + $0.top.equalToSuperview().offset(24) + $0.horizontalEdges.equalToSuperview().inset(20) + $0.bottom.equalToSuperview() + } + } } From 4baafa8bd8b4511263becd6e1706249cf51f7915 Mon Sep 17 00:00:00 2001 From: youz2me Date: Mon, 15 Jul 2024 06:52:40 +0900 Subject: [PATCH 07/22] =?UTF-8?q?fix/#176=20=EC=B6=A9=EB=8F=8C=20=ED=95=B4?= =?UTF-8?q?=EA=B2=B0=20=EC=A4=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DTO/Model/Promises/TardyInfoModel.swift | 22 ++++ .../img_empty_tardy.imageset/Contents.json | 21 ++++ .../img_empty_tardy.svg | 14 +++ .../Image/img_gift.imageset/Contents.json | 12 ++ .../Image/img_gift.imageset/img_gift.svg | 31 +++++ .../View/PagePromiseSegmentedControl.swift | 74 ++++++++++++ .../PagePromiseViewController.swift | 113 ++++++++++++++++++ .../ViewModel/PagePromiseViewModel.swift | 17 +++ .../Tardy/Cell/TardyCollectionViewCell.swift | 43 +++++++ .../Promise/Tardy/Service/TardyService.swift | 28 +++++ .../Promise/Tardy/View/ArriveView.swift | 67 +++++++++++ .../Promise/Tardy/View/TardyEmptyView.swift | 36 ++++++ .../Promise/Tardy/View/TardyPenaltyView.swift | 52 ++++++++ .../Source/Promise/Tardy/View/TardyView.swift | 87 ++++++++++++++ .../Tardy/ViewModel/TardyViewModel.swift | 21 ++++ 15 files changed, 638 insertions(+) create mode 100644 KkuMulKum/Network/DTO/Model/Promises/TardyInfoModel.swift create mode 100644 KkuMulKum/Resource/Assets.xcassets/Image/img_empty_tardy.imageset/Contents.json create mode 100644 KkuMulKum/Resource/Assets.xcassets/Image/img_empty_tardy.imageset/img_empty_tardy.svg create mode 100644 KkuMulKum/Resource/Assets.xcassets/Image/img_gift.imageset/Contents.json create mode 100644 KkuMulKum/Resource/Assets.xcassets/Image/img_gift.imageset/img_gift.svg create mode 100644 KkuMulKum/Source/Promise/PagePromise/View/PagePromiseSegmentedControl.swift create mode 100644 KkuMulKum/Source/Promise/PagePromise/ViewController/PagePromiseViewController.swift create mode 100644 KkuMulKum/Source/Promise/PagePromise/ViewModel/PagePromiseViewModel.swift create mode 100644 KkuMulKum/Source/Promise/Tardy/Cell/TardyCollectionViewCell.swift create mode 100644 KkuMulKum/Source/Promise/Tardy/Service/TardyService.swift create mode 100644 KkuMulKum/Source/Promise/Tardy/View/ArriveView.swift create mode 100644 KkuMulKum/Source/Promise/Tardy/View/TardyEmptyView.swift create mode 100644 KkuMulKum/Source/Promise/Tardy/View/TardyPenaltyView.swift create mode 100644 KkuMulKum/Source/Promise/Tardy/View/TardyView.swift create mode 100644 KkuMulKum/Source/Promise/Tardy/ViewModel/TardyViewModel.swift diff --git a/KkuMulKum/Network/DTO/Model/Promises/TardyInfoModel.swift b/KkuMulKum/Network/DTO/Model/Promises/TardyInfoModel.swift new file mode 100644 index 00000000..fd0c4da5 --- /dev/null +++ b/KkuMulKum/Network/DTO/Model/Promises/TardyInfoModel.swift @@ -0,0 +1,22 @@ +// +// PromiseLateInfoResponseModel.swift +// KkuMulKum +// +// Created by YOUJIM on 7/8/24. +// + + +// MARK: 약속 지각 상세 조회 + +import Foundation + +struct TardyInfoModel: ResponseModelType { + let penalty: String + let isPastDue: Bool + let lateComers: [Comer] +} + +struct Comer: Codable { + let participantId: Int + let name, profileImg: String +} diff --git a/KkuMulKum/Resource/Assets.xcassets/Image/img_empty_tardy.imageset/Contents.json b/KkuMulKum/Resource/Assets.xcassets/Image/img_empty_tardy.imageset/Contents.json new file mode 100644 index 00000000..9060b7d0 --- /dev/null +++ b/KkuMulKum/Resource/Assets.xcassets/Image/img_empty_tardy.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "img_empty_tardy.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/KkuMulKum/Resource/Assets.xcassets/Image/img_empty_tardy.imageset/img_empty_tardy.svg b/KkuMulKum/Resource/Assets.xcassets/Image/img_empty_tardy.imageset/img_empty_tardy.svg new file mode 100644 index 00000000..9626371d --- /dev/null +++ b/KkuMulKum/Resource/Assets.xcassets/Image/img_empty_tardy.imageset/img_empty_tardy.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/KkuMulKum/Resource/Assets.xcassets/Image/img_gift.imageset/Contents.json b/KkuMulKum/Resource/Assets.xcassets/Image/img_gift.imageset/Contents.json new file mode 100644 index 00000000..8881e95a --- /dev/null +++ b/KkuMulKum/Resource/Assets.xcassets/Image/img_gift.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "img_gift.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/KkuMulKum/Resource/Assets.xcassets/Image/img_gift.imageset/img_gift.svg b/KkuMulKum/Resource/Assets.xcassets/Image/img_gift.imageset/img_gift.svg new file mode 100644 index 00000000..5583c3db --- /dev/null +++ b/KkuMulKum/Resource/Assets.xcassets/Image/img_gift.imageset/img_gift.svg @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/KkuMulKum/Source/Promise/PagePromise/View/PagePromiseSegmentedControl.swift b/KkuMulKum/Source/Promise/PagePromise/View/PagePromiseSegmentedControl.swift new file mode 100644 index 00000000..0fb91d7f --- /dev/null +++ b/KkuMulKum/Source/Promise/PagePromise/View/PagePromiseSegmentedControl.swift @@ -0,0 +1,74 @@ +// +// PagePromiseSegmentedControl.swift +// KkuMulKum +// +// Created by YOUJIM on 7/9/24. +// + +import UIKit + +import SnapKit + +class PagePromiseSegmentedControl: UISegmentedControl { + private let backgroundLineView: UIView = UIView(backgroundColor: .gray2) + + let selectedUnderLineView: UIView = UIView(backgroundColor: .black).then { + $0.layer.cornerRadius = 1 + } + + override init(items: [Any]?) { + super.init(items: items) + + setupSegment() + setupTextAttribute() + setupBackgroundLineView() + setupBackgroundAndDivider() + } + + required init?(coder: NSCoder) { + fatalError() + } + + private func setupSegment() { + addSubviews(backgroundLineView, selectedUnderLineView) + + selectedSegmentIndex = 0 + } + + private func setupBackgroundAndDivider() { + setBackgroundImage(UIImage(), for: .normal, barMetrics: .default) + setBackgroundImage(UIImage(), for: .selected, barMetrics: .default) + setBackgroundImage(UIImage(), for: .highlighted, barMetrics: .default) + + setDividerImage( + UIImage(), + forLeftSegmentState: .selected, + rightSegmentState: .normal, + barMetrics: .default + ) + } + + private func setupTextAttribute() { + setTitleTextAttributes([ + NSAttributedString.Key.foregroundColor: UIColor.gray3, + NSAttributedString.Key.font: UIFont.pretendard(.body05) + ], for: .normal) + setTitleTextAttributes([ + NSAttributedString.Key.foregroundColor: UIColor.black, + NSAttributedString.Key.font: UIFont.pretendard(.body05) + ], for: .selected) + } + + private func setupBackgroundLineView() { + backgroundLineView.snp.makeConstraints { + $0.bottom.leading.trailing.equalToSuperview() + $0.height.equalTo(2) + } + + selectedUnderLineView.snp.makeConstraints { + $0.bottom.leading.equalToSuperview() + $0.width.equalToSuperview().dividedBy(numberOfSegments) + $0.height.equalTo(backgroundLineView) + } + } +} diff --git a/KkuMulKum/Source/Promise/PagePromise/ViewController/PagePromiseViewController.swift b/KkuMulKum/Source/Promise/PagePromise/ViewController/PagePromiseViewController.swift new file mode 100644 index 00000000..8bbbf92f --- /dev/null +++ b/KkuMulKum/Source/Promise/PagePromise/ViewController/PagePromiseViewController.swift @@ -0,0 +1,113 @@ +// +// PromiseViewController.swift +// KkuMulKum +// +// Created by YOUJIM on 7/9/24. +// + +import UIKit + +class PagePromiseViewController: BaseViewController { + private let promiseViewModel = PagePromiseViewModel() + + private let promiseViewControllerList: [BaseViewController] = [ + PromiseInfoViewController(), + ReadyStatusViewController(), + // TODO: 서버 연결 시 데이터 바인딩 필요 + TardyViewController( + tardyViewModel: TardyViewModel( + isPastDue: ObservablePattern(false), + hasTardy: ObservablePattern(false) + ) + ) + ] + + private lazy var promiseSegmentedControl = PagePromiseSegmentedControl( + items: ["약속 정보", "준비 현황", "지각 꾸물이"] + ) + + private let promisePageViewController = UIPageViewController( + transitionStyle: .scroll, + navigationOrientation: .vertical + ) + + override func setupView() { + view.backgroundColor = .white + + addChild(promisePageViewController) + + view.addSubviews( + promiseSegmentedControl, + promisePageViewController.view + ) + + promisePageViewController.setViewControllers( + [promiseViewControllerList[0]], + direction: .forward, + animated: true + ) + + promiseSegmentedControl.snp.makeConstraints { + $0.top.equalTo(view.safeAreaLayoutGuide) + $0.leading.trailing.equalToSuperview().inset(-6) + $0.height.equalTo(60) + } + + promisePageViewController.view.snp.makeConstraints { + $0.top.equalTo(promiseSegmentedControl.snp.bottom) + $0.leading.trailing.bottom.equalToSuperview() + } + } + + override func setupAction() { + promiseSegmentedControl.addTarget( + self, + action: #selector(didSegmentedControlIndexUpdated), + for: .valueChanged + ) + } + + override func setupDelegate() { + promisePageViewController.delegate = self + promisePageViewController.dataSource = self + } + + @objc private func didSegmentedControlIndexUpdated() { + let condition = promiseViewModel.currentPage.value <= promiseSegmentedControl.selectedSegmentIndex + let direction: UIPageViewController.NavigationDirection = condition ? .forward : .reverse + let (width, count, selectedIndex) = ( + promiseSegmentedControl.bounds.width, + promiseSegmentedControl.numberOfSegments, + promiseSegmentedControl.selectedSegmentIndex + ) + + promiseSegmentedControl.selectedUnderLineView.snp.updateConstraints { + $0.leading.equalToSuperview().offset((width / CGFloat(count)) * CGFloat(selectedIndex)) + } + + promiseViewModel.didSegmentIndexChanged( + index: promiseSegmentedControl.selectedSegmentIndex + ) + + promisePageViewController.setViewControllers([ + promiseViewControllerList[promiseViewModel.currentPage.value] + ], direction: direction, animated: false) + } +} + + +extension PagePromiseViewController: UIPageViewControllerDelegate, UIPageViewControllerDataSource { + func pageViewController( + _ pageViewController: UIPageViewController, + viewControllerAfter viewController: UIViewController + ) -> UIViewController? { + return nil + } + + func pageViewController( + _ pageViewController: UIPageViewController, + viewControllerBefore viewController: UIViewController + ) -> UIViewController? { + return nil + } +} diff --git a/KkuMulKum/Source/Promise/PagePromise/ViewModel/PagePromiseViewModel.swift b/KkuMulKum/Source/Promise/PagePromise/ViewModel/PagePromiseViewModel.swift new file mode 100644 index 00000000..eb68a471 --- /dev/null +++ b/KkuMulKum/Source/Promise/PagePromise/ViewModel/PagePromiseViewModel.swift @@ -0,0 +1,17 @@ +// +// PromiseViewModel.swift +// KkuMulKum +// +// Created by YOUJIM on 7/9/24. +// + +import Foundation + + +class PagePromiseViewModel { + var currentPage = ObservablePattern(0) + + func didSegmentIndexChanged(index: Int) { + currentPage.value = index + } +} diff --git a/KkuMulKum/Source/Promise/Tardy/Cell/TardyCollectionViewCell.swift b/KkuMulKum/Source/Promise/Tardy/Cell/TardyCollectionViewCell.swift new file mode 100644 index 00000000..178847eb --- /dev/null +++ b/KkuMulKum/Source/Promise/Tardy/Cell/TardyCollectionViewCell.swift @@ -0,0 +1,43 @@ +// +// TardyCollectionViewCell.swift +// KkuMulKum +// +// Created by YOUJIM on 7/13/24. +// + +import UIKit + +class TardyCollectionViewCell: BaseCollectionViewCell { + private let profileImageView: UIImageView = UIImageView().then { + $0.image = .imgProfile + $0.contentMode = .scaleAspectFill + $0.layer.cornerRadius = 67 / 2 + } + + let nameLabel: UILabel = UILabel().then { + $0.setText("이름", style: .body06, color: .gray6) + } + + override func setupView() { + addSubviews(profileImageView, nameLabel) + + self.layer.cornerRadius = 8 + self.layer.borderWidth = 1 + self.layer.borderColor = UIColor.gray2.cgColor + } + + override func setupAutoLayout() { + profileImageView.snp.makeConstraints { + $0.top.equalToSuperview().offset(13.5) + $0.leading.trailing.equalToSuperview().inset(18.5) + $0.height.equalTo(Screen.height(67)) + $0.width.equalTo(profileImageView.snp.height) + } + + nameLabel.snp.makeConstraints { + $0.top.equalTo(profileImageView.snp.bottom).offset(16.5) + $0.centerX.equalToSuperview() + $0.bottom.equalToSuperview().inset(19) + } + } +} diff --git a/KkuMulKum/Source/Promise/Tardy/Service/TardyService.swift b/KkuMulKum/Source/Promise/Tardy/Service/TardyService.swift new file mode 100644 index 00000000..1966b48e --- /dev/null +++ b/KkuMulKum/Source/Promise/Tardy/Service/TardyService.swift @@ -0,0 +1,28 @@ +// +// TardyService.swift +// KkuMulKum +// +// Created by YOUJIM on 7/14/24. +// + +import Foundation + +protocol TardyServiceType { + func getPromiseTardyInfo(with promiseID: Int) -> TardyInfoModel? +} + +final class MockTardyService: TardyServiceType { + func getPromiseTardyInfo(with promiseID: Int) -> TardyInfoModel? { + let mockData = TardyInfoModel( + penalty: "티라미수 케익 릴스", + isPastDue: true, + lateComers: [Comer( + participantId: 1, + name: "유짐이", + profileImg: "" + )] + ) + + return mockData + } +} diff --git a/KkuMulKum/Source/Promise/Tardy/View/ArriveView.swift b/KkuMulKum/Source/Promise/Tardy/View/ArriveView.swift new file mode 100644 index 00000000..1e553886 --- /dev/null +++ b/KkuMulKum/Source/Promise/Tardy/View/ArriveView.swift @@ -0,0 +1,67 @@ +// +// ArriveView.swift +// KkuMulKum +// +// Created by YOUJIM on 7/14/24. +// + +import UIKit + +class ArriveView: BaseView { + private let giftImageView: UIImageView = UIImageView().then { + $0.image = .imgGift + $0.contentMode = .scaleAspectFit + } + + private let mainTitleLabel: UILabel = UILabel().then { + $0.setText("축하해요!", style: .head01, color: .gray8) + } + + private let subTitleLabel: UILabel = UILabel().then { + $0.setText("약속 시간까지 아무도 꾸물거리지 않았네요!", style: .body06, color: .gray6) + } + + private let finishMeetingButton: CustomButton = CustomButton( + title: "약속 마치기", + isEnabled: true + ).then { + $0.backgroundColor = .maincolor + } + + override func setupView() { + backgroundColor = .green1 + + addSubviews( + giftImageView, + mainTitleLabel, + subTitleLabel, + finishMeetingButton + ) + } + + override func setupAutoLayout() { + giftImageView.snp.makeConstraints { + $0.top.equalTo(safeAreaLayoutGuide).offset(131) + $0.centerX.equalToSuperview() + $0.height.equalTo(Screen.height(177)) + $0.width.equalTo(Screen.width(187)) + } + + mainTitleLabel.snp.makeConstraints { + $0.top.equalTo(giftImageView.snp.bottom).offset(36) + $0.centerX.equalToSuperview() + } + + subTitleLabel.snp.makeConstraints { + $0.top.equalTo(mainTitleLabel.snp.bottom).offset(17) + $0.centerX.equalToSuperview() + } + + finishMeetingButton.snp.makeConstraints { + $0.bottom.equalToSuperview().inset(64) + $0.centerX.equalToSuperview() + $0.height.equalTo(CustomButton.defaultHeight) + $0.width.equalTo(CustomButton.defaultWidth) + } + } +} diff --git a/KkuMulKum/Source/Promise/Tardy/View/TardyEmptyView.swift b/KkuMulKum/Source/Promise/Tardy/View/TardyEmptyView.swift new file mode 100644 index 00000000..b2402d9e --- /dev/null +++ b/KkuMulKum/Source/Promise/Tardy/View/TardyEmptyView.swift @@ -0,0 +1,36 @@ +// +// TardyEmptyView.swift +// KkuMulKum +// +// Created by YOUJIM on 7/13/24. +// + +import UIKit + +class TardyEmptyView: BaseView { + private let characterImageView: UIImageView = UIImageView().then { + $0.image = .imgEmptyTardy + $0.contentMode = .scaleAspectFit + } + + private let emptyContentLabel: UILabel = UILabel().then { + $0.setText("꾸물이들이 도착하길\n기다리는 중이에요", style: .body05, color: .gray3) + } + + override func setupView() { + addSubviews(characterImageView, emptyContentLabel) + } + + override func setupAutoLayout() { + characterImageView.snp.makeConstraints { + $0.top.centerX.equalToSuperview() + $0.height.equalTo(Screen.height(121)) + $0.width.equalTo(Screen.width(112)) + } + + emptyContentLabel.snp.makeConstraints { + $0.top.equalTo(characterImageView.snp.bottom).offset(36) + $0.centerX.bottom.equalToSuperview() + } + } +} diff --git a/KkuMulKum/Source/Promise/Tardy/View/TardyPenaltyView.swift b/KkuMulKum/Source/Promise/Tardy/View/TardyPenaltyView.swift new file mode 100644 index 00000000..437ea036 --- /dev/null +++ b/KkuMulKum/Source/Promise/Tardy/View/TardyPenaltyView.swift @@ -0,0 +1,52 @@ +// +// TardyPenaltyView.swift +// KkuMulKum +// +// Created by YOUJIM on 7/13/24. +// + +import UIKit + +class TardyPenaltyView: BaseView { + private let penaltyImageView: UIImageView = UIImageView().then { + $0.image = .iconPenalty + $0.contentMode = .scaleAspectFit + } + + private let penaltyLabel: UILabel = UILabel().then { + $0.setText("벌칙", style: .caption02, color: .gray8) + } + + private let contentLabel: UILabel = UILabel().then { + $0.setText("탕후루 릴스 찍기", style: .body03, color: .gray8) + } + + override func setupView() { + backgroundColor = .green1 + + addSubviews( + penaltyImageView, + penaltyLabel, + contentLabel + ) + } + + override func setupAutoLayout() { + penaltyImageView.snp.makeConstraints { + $0.centerY.equalToSuperview() + $0.leading.equalToSuperview().offset(20) + $0.height.equalTo(Screen.height(24)) + $0.width.equalTo(penaltyImageView.snp.height) + } + + penaltyLabel.snp.makeConstraints { + $0.top.equalToSuperview().offset(18) + $0.leading.equalTo(penaltyImageView.snp.trailing).offset(20) + } + + contentLabel.snp.makeConstraints { + $0.bottom.equalToSuperview().inset(18) + $0.leading.equalTo(penaltyLabel) + } + } +} diff --git a/KkuMulKum/Source/Promise/Tardy/View/TardyView.swift b/KkuMulKum/Source/Promise/Tardy/View/TardyView.swift new file mode 100644 index 00000000..c7491460 --- /dev/null +++ b/KkuMulKum/Source/Promise/Tardy/View/TardyView.swift @@ -0,0 +1,87 @@ +// +// TardyView.swift +// KkuMulKum +// +// Created by YOUJIM on 7/13/24. +// + +import UIKit + +class TardyView: BaseView { + private let tardyPenaltyView: TardyPenaltyView = TardyPenaltyView().then { + $0.layer.cornerRadius = 8 + } + + private let titleLabel: UILabel = UILabel().then { + $0.setText("이번 약속의 지각 꾸물이는?", style: .head01, color: .gray8) + } + + private let tardyEmptyView: TardyEmptyView = TardyEmptyView() + + let tardyCollectionView: UICollectionView = UICollectionView( + frame: .zero, + collectionViewLayout: UICollectionViewFlowLayout().then { + $0.itemSize = CGSize(width: Screen.width(104), height: Screen.height(128)) + $0.minimumLineSpacing = 10 + $0.minimumInteritemSpacing = 10 + } + ).then { + $0.showsVerticalScrollIndicator = false + $0.register( + TardyCollectionViewCell.self, + forCellWithReuseIdentifier: TardyCollectionViewCell.reuseIdentifier + ) + } + + let finishMeetingButton: CustomButton = CustomButton( + title: "약속 마치기", + isEnabled: false + ).then { + $0.backgroundColor = .maincolor + } + + override func setupView() { + backgroundColor = .white + + addSubviews( + tardyPenaltyView, + titleLabel, + tardyEmptyView, + tardyCollectionView, + finishMeetingButton + ) + } + + override func setupAutoLayout() { + tardyPenaltyView.snp.makeConstraints { + $0.top.equalTo(safeAreaLayoutGuide).offset(19) + $0.leading.trailing.equalToSuperview().inset(20) + $0.height.equalTo(Screen.height(74)) + } + + titleLabel.snp.makeConstraints { + $0.top.equalTo(tardyPenaltyView.snp.bottom).offset(26) + $0.centerX.equalToSuperview() + } + + tardyEmptyView.snp.makeConstraints { + $0.top.equalTo(titleLabel.snp.bottom).offset(108) + $0.centerX.equalToSuperview() + $0.height.equalTo(Screen.height(192)) + $0.width.equalTo(Screen.width(112)) + } + + finishMeetingButton.snp.makeConstraints { + $0.bottom.equalToSuperview().inset(64) + $0.centerX.equalToSuperview() + $0.height.equalTo(CustomButton.defaultHeight) + $0.width.equalTo(CustomButton.defaultWidth) + } + + tardyCollectionView.snp.makeConstraints { + $0.top.equalTo(titleLabel.snp.bottom).offset(32) + $0.bottom.equalTo(finishMeetingButton.snp.top).inset(-15) + $0.horizontalEdges.equalToSuperview().inset(20) + } + } +} diff --git a/KkuMulKum/Source/Promise/Tardy/ViewModel/TardyViewModel.swift b/KkuMulKum/Source/Promise/Tardy/ViewModel/TardyViewModel.swift new file mode 100644 index 00000000..1b8ae007 --- /dev/null +++ b/KkuMulKum/Source/Promise/Tardy/ViewModel/TardyViewModel.swift @@ -0,0 +1,21 @@ +// +// TardyViewModel.swift +// KkuMulKum +// +// Created by YOUJIM on 7/14/24. +// + +import Foundation + +class TardyViewModel { + var isPastDue: ObservablePattern + var hasTardy: ObservablePattern + + init( + isPastDue: ObservablePattern, + hasTardy: ObservablePattern + ) { + self.isPastDue = isPastDue + self.hasTardy = hasTardy + } +} From 04f5d77357906d7603b7009ec238af9970d33be8 Mon Sep 17 00:00:00 2001 From: youz2me Date: Mon, 15 Jul 2024 06:54:22 +0900 Subject: [PATCH 08/22] =?UTF-8?q?fix/#176=20=EC=B6=A9=EB=8F=8C=20=ED=95=B4?= =?UTF-8?q?=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Model/Promises/TardyInfoModel.swift~HEAD | 22 ++++ .../Promises/TardyInfoModel.swift~suyeon | 22 ++++ .../PagePromiseSegmentedControl.swift~HEAD | 74 ++++++++++++ .../PagePromiseSegmentedControl.swift~suyeon | 74 ++++++++++++ .../PagePromiseViewController.swift~HEAD | 113 ++++++++++++++++++ .../PagePromiseViewController.swift~suyeon | 113 ++++++++++++++++++ .../ViewModel/PagePromiseViewModel.swift~HEAD | 17 +++ .../PagePromiseViewModel.swift~suyeon | 17 +++ 8 files changed, 452 insertions(+) create mode 100644 KkuMulKum/Network/DTO/Model/Promises/TardyInfoModel.swift~HEAD create mode 100644 KkuMulKum/Network/DTO/Model/Promises/TardyInfoModel.swift~suyeon create mode 100644 KkuMulKum/Source/Promise/PagePromise/View/PagePromiseSegmentedControl.swift~HEAD create mode 100644 KkuMulKum/Source/Promise/PagePromise/View/PagePromiseSegmentedControl.swift~suyeon create mode 100644 KkuMulKum/Source/Promise/PagePromise/ViewController/PagePromiseViewController.swift~HEAD create mode 100644 KkuMulKum/Source/Promise/PagePromise/ViewController/PagePromiseViewController.swift~suyeon create mode 100644 KkuMulKum/Source/Promise/PagePromise/ViewModel/PagePromiseViewModel.swift~HEAD create mode 100644 KkuMulKum/Source/Promise/PagePromise/ViewModel/PagePromiseViewModel.swift~suyeon diff --git a/KkuMulKum/Network/DTO/Model/Promises/TardyInfoModel.swift~HEAD b/KkuMulKum/Network/DTO/Model/Promises/TardyInfoModel.swift~HEAD new file mode 100644 index 00000000..fd0c4da5 --- /dev/null +++ b/KkuMulKum/Network/DTO/Model/Promises/TardyInfoModel.swift~HEAD @@ -0,0 +1,22 @@ +// +// PromiseLateInfoResponseModel.swift +// KkuMulKum +// +// Created by YOUJIM on 7/8/24. +// + + +// MARK: 약속 지각 상세 조회 + +import Foundation + +struct TardyInfoModel: ResponseModelType { + let penalty: String + let isPastDue: Bool + let lateComers: [Comer] +} + +struct Comer: Codable { + let participantId: Int + let name, profileImg: String +} diff --git a/KkuMulKum/Network/DTO/Model/Promises/TardyInfoModel.swift~suyeon b/KkuMulKum/Network/DTO/Model/Promises/TardyInfoModel.swift~suyeon new file mode 100644 index 00000000..fd0c4da5 --- /dev/null +++ b/KkuMulKum/Network/DTO/Model/Promises/TardyInfoModel.swift~suyeon @@ -0,0 +1,22 @@ +// +// PromiseLateInfoResponseModel.swift +// KkuMulKum +// +// Created by YOUJIM on 7/8/24. +// + + +// MARK: 약속 지각 상세 조회 + +import Foundation + +struct TardyInfoModel: ResponseModelType { + let penalty: String + let isPastDue: Bool + let lateComers: [Comer] +} + +struct Comer: Codable { + let participantId: Int + let name, profileImg: String +} diff --git a/KkuMulKum/Source/Promise/PagePromise/View/PagePromiseSegmentedControl.swift~HEAD b/KkuMulKum/Source/Promise/PagePromise/View/PagePromiseSegmentedControl.swift~HEAD new file mode 100644 index 00000000..0fb91d7f --- /dev/null +++ b/KkuMulKum/Source/Promise/PagePromise/View/PagePromiseSegmentedControl.swift~HEAD @@ -0,0 +1,74 @@ +// +// PagePromiseSegmentedControl.swift +// KkuMulKum +// +// Created by YOUJIM on 7/9/24. +// + +import UIKit + +import SnapKit + +class PagePromiseSegmentedControl: UISegmentedControl { + private let backgroundLineView: UIView = UIView(backgroundColor: .gray2) + + let selectedUnderLineView: UIView = UIView(backgroundColor: .black).then { + $0.layer.cornerRadius = 1 + } + + override init(items: [Any]?) { + super.init(items: items) + + setupSegment() + setupTextAttribute() + setupBackgroundLineView() + setupBackgroundAndDivider() + } + + required init?(coder: NSCoder) { + fatalError() + } + + private func setupSegment() { + addSubviews(backgroundLineView, selectedUnderLineView) + + selectedSegmentIndex = 0 + } + + private func setupBackgroundAndDivider() { + setBackgroundImage(UIImage(), for: .normal, barMetrics: .default) + setBackgroundImage(UIImage(), for: .selected, barMetrics: .default) + setBackgroundImage(UIImage(), for: .highlighted, barMetrics: .default) + + setDividerImage( + UIImage(), + forLeftSegmentState: .selected, + rightSegmentState: .normal, + barMetrics: .default + ) + } + + private func setupTextAttribute() { + setTitleTextAttributes([ + NSAttributedString.Key.foregroundColor: UIColor.gray3, + NSAttributedString.Key.font: UIFont.pretendard(.body05) + ], for: .normal) + setTitleTextAttributes([ + NSAttributedString.Key.foregroundColor: UIColor.black, + NSAttributedString.Key.font: UIFont.pretendard(.body05) + ], for: .selected) + } + + private func setupBackgroundLineView() { + backgroundLineView.snp.makeConstraints { + $0.bottom.leading.trailing.equalToSuperview() + $0.height.equalTo(2) + } + + selectedUnderLineView.snp.makeConstraints { + $0.bottom.leading.equalToSuperview() + $0.width.equalToSuperview().dividedBy(numberOfSegments) + $0.height.equalTo(backgroundLineView) + } + } +} diff --git a/KkuMulKum/Source/Promise/PagePromise/View/PagePromiseSegmentedControl.swift~suyeon b/KkuMulKum/Source/Promise/PagePromise/View/PagePromiseSegmentedControl.swift~suyeon new file mode 100644 index 00000000..0fb91d7f --- /dev/null +++ b/KkuMulKum/Source/Promise/PagePromise/View/PagePromiseSegmentedControl.swift~suyeon @@ -0,0 +1,74 @@ +// +// PagePromiseSegmentedControl.swift +// KkuMulKum +// +// Created by YOUJIM on 7/9/24. +// + +import UIKit + +import SnapKit + +class PagePromiseSegmentedControl: UISegmentedControl { + private let backgroundLineView: UIView = UIView(backgroundColor: .gray2) + + let selectedUnderLineView: UIView = UIView(backgroundColor: .black).then { + $0.layer.cornerRadius = 1 + } + + override init(items: [Any]?) { + super.init(items: items) + + setupSegment() + setupTextAttribute() + setupBackgroundLineView() + setupBackgroundAndDivider() + } + + required init?(coder: NSCoder) { + fatalError() + } + + private func setupSegment() { + addSubviews(backgroundLineView, selectedUnderLineView) + + selectedSegmentIndex = 0 + } + + private func setupBackgroundAndDivider() { + setBackgroundImage(UIImage(), for: .normal, barMetrics: .default) + setBackgroundImage(UIImage(), for: .selected, barMetrics: .default) + setBackgroundImage(UIImage(), for: .highlighted, barMetrics: .default) + + setDividerImage( + UIImage(), + forLeftSegmentState: .selected, + rightSegmentState: .normal, + barMetrics: .default + ) + } + + private func setupTextAttribute() { + setTitleTextAttributes([ + NSAttributedString.Key.foregroundColor: UIColor.gray3, + NSAttributedString.Key.font: UIFont.pretendard(.body05) + ], for: .normal) + setTitleTextAttributes([ + NSAttributedString.Key.foregroundColor: UIColor.black, + NSAttributedString.Key.font: UIFont.pretendard(.body05) + ], for: .selected) + } + + private func setupBackgroundLineView() { + backgroundLineView.snp.makeConstraints { + $0.bottom.leading.trailing.equalToSuperview() + $0.height.equalTo(2) + } + + selectedUnderLineView.snp.makeConstraints { + $0.bottom.leading.equalToSuperview() + $0.width.equalToSuperview().dividedBy(numberOfSegments) + $0.height.equalTo(backgroundLineView) + } + } +} diff --git a/KkuMulKum/Source/Promise/PagePromise/ViewController/PagePromiseViewController.swift~HEAD b/KkuMulKum/Source/Promise/PagePromise/ViewController/PagePromiseViewController.swift~HEAD new file mode 100644 index 00000000..8bbbf92f --- /dev/null +++ b/KkuMulKum/Source/Promise/PagePromise/ViewController/PagePromiseViewController.swift~HEAD @@ -0,0 +1,113 @@ +// +// PromiseViewController.swift +// KkuMulKum +// +// Created by YOUJIM on 7/9/24. +// + +import UIKit + +class PagePromiseViewController: BaseViewController { + private let promiseViewModel = PagePromiseViewModel() + + private let promiseViewControllerList: [BaseViewController] = [ + PromiseInfoViewController(), + ReadyStatusViewController(), + // TODO: 서버 연결 시 데이터 바인딩 필요 + TardyViewController( + tardyViewModel: TardyViewModel( + isPastDue: ObservablePattern(false), + hasTardy: ObservablePattern(false) + ) + ) + ] + + private lazy var promiseSegmentedControl = PagePromiseSegmentedControl( + items: ["약속 정보", "준비 현황", "지각 꾸물이"] + ) + + private let promisePageViewController = UIPageViewController( + transitionStyle: .scroll, + navigationOrientation: .vertical + ) + + override func setupView() { + view.backgroundColor = .white + + addChild(promisePageViewController) + + view.addSubviews( + promiseSegmentedControl, + promisePageViewController.view + ) + + promisePageViewController.setViewControllers( + [promiseViewControllerList[0]], + direction: .forward, + animated: true + ) + + promiseSegmentedControl.snp.makeConstraints { + $0.top.equalTo(view.safeAreaLayoutGuide) + $0.leading.trailing.equalToSuperview().inset(-6) + $0.height.equalTo(60) + } + + promisePageViewController.view.snp.makeConstraints { + $0.top.equalTo(promiseSegmentedControl.snp.bottom) + $0.leading.trailing.bottom.equalToSuperview() + } + } + + override func setupAction() { + promiseSegmentedControl.addTarget( + self, + action: #selector(didSegmentedControlIndexUpdated), + for: .valueChanged + ) + } + + override func setupDelegate() { + promisePageViewController.delegate = self + promisePageViewController.dataSource = self + } + + @objc private func didSegmentedControlIndexUpdated() { + let condition = promiseViewModel.currentPage.value <= promiseSegmentedControl.selectedSegmentIndex + let direction: UIPageViewController.NavigationDirection = condition ? .forward : .reverse + let (width, count, selectedIndex) = ( + promiseSegmentedControl.bounds.width, + promiseSegmentedControl.numberOfSegments, + promiseSegmentedControl.selectedSegmentIndex + ) + + promiseSegmentedControl.selectedUnderLineView.snp.updateConstraints { + $0.leading.equalToSuperview().offset((width / CGFloat(count)) * CGFloat(selectedIndex)) + } + + promiseViewModel.didSegmentIndexChanged( + index: promiseSegmentedControl.selectedSegmentIndex + ) + + promisePageViewController.setViewControllers([ + promiseViewControllerList[promiseViewModel.currentPage.value] + ], direction: direction, animated: false) + } +} + + +extension PagePromiseViewController: UIPageViewControllerDelegate, UIPageViewControllerDataSource { + func pageViewController( + _ pageViewController: UIPageViewController, + viewControllerAfter viewController: UIViewController + ) -> UIViewController? { + return nil + } + + func pageViewController( + _ pageViewController: UIPageViewController, + viewControllerBefore viewController: UIViewController + ) -> UIViewController? { + return nil + } +} diff --git a/KkuMulKum/Source/Promise/PagePromise/ViewController/PagePromiseViewController.swift~suyeon b/KkuMulKum/Source/Promise/PagePromise/ViewController/PagePromiseViewController.swift~suyeon new file mode 100644 index 00000000..8bbbf92f --- /dev/null +++ b/KkuMulKum/Source/Promise/PagePromise/ViewController/PagePromiseViewController.swift~suyeon @@ -0,0 +1,113 @@ +// +// PromiseViewController.swift +// KkuMulKum +// +// Created by YOUJIM on 7/9/24. +// + +import UIKit + +class PagePromiseViewController: BaseViewController { + private let promiseViewModel = PagePromiseViewModel() + + private let promiseViewControllerList: [BaseViewController] = [ + PromiseInfoViewController(), + ReadyStatusViewController(), + // TODO: 서버 연결 시 데이터 바인딩 필요 + TardyViewController( + tardyViewModel: TardyViewModel( + isPastDue: ObservablePattern(false), + hasTardy: ObservablePattern(false) + ) + ) + ] + + private lazy var promiseSegmentedControl = PagePromiseSegmentedControl( + items: ["약속 정보", "준비 현황", "지각 꾸물이"] + ) + + private let promisePageViewController = UIPageViewController( + transitionStyle: .scroll, + navigationOrientation: .vertical + ) + + override func setupView() { + view.backgroundColor = .white + + addChild(promisePageViewController) + + view.addSubviews( + promiseSegmentedControl, + promisePageViewController.view + ) + + promisePageViewController.setViewControllers( + [promiseViewControllerList[0]], + direction: .forward, + animated: true + ) + + promiseSegmentedControl.snp.makeConstraints { + $0.top.equalTo(view.safeAreaLayoutGuide) + $0.leading.trailing.equalToSuperview().inset(-6) + $0.height.equalTo(60) + } + + promisePageViewController.view.snp.makeConstraints { + $0.top.equalTo(promiseSegmentedControl.snp.bottom) + $0.leading.trailing.bottom.equalToSuperview() + } + } + + override func setupAction() { + promiseSegmentedControl.addTarget( + self, + action: #selector(didSegmentedControlIndexUpdated), + for: .valueChanged + ) + } + + override func setupDelegate() { + promisePageViewController.delegate = self + promisePageViewController.dataSource = self + } + + @objc private func didSegmentedControlIndexUpdated() { + let condition = promiseViewModel.currentPage.value <= promiseSegmentedControl.selectedSegmentIndex + let direction: UIPageViewController.NavigationDirection = condition ? .forward : .reverse + let (width, count, selectedIndex) = ( + promiseSegmentedControl.bounds.width, + promiseSegmentedControl.numberOfSegments, + promiseSegmentedControl.selectedSegmentIndex + ) + + promiseSegmentedControl.selectedUnderLineView.snp.updateConstraints { + $0.leading.equalToSuperview().offset((width / CGFloat(count)) * CGFloat(selectedIndex)) + } + + promiseViewModel.didSegmentIndexChanged( + index: promiseSegmentedControl.selectedSegmentIndex + ) + + promisePageViewController.setViewControllers([ + promiseViewControllerList[promiseViewModel.currentPage.value] + ], direction: direction, animated: false) + } +} + + +extension PagePromiseViewController: UIPageViewControllerDelegate, UIPageViewControllerDataSource { + func pageViewController( + _ pageViewController: UIPageViewController, + viewControllerAfter viewController: UIViewController + ) -> UIViewController? { + return nil + } + + func pageViewController( + _ pageViewController: UIPageViewController, + viewControllerBefore viewController: UIViewController + ) -> UIViewController? { + return nil + } +} diff --git a/KkuMulKum/Source/Promise/PagePromise/ViewModel/PagePromiseViewModel.swift~HEAD b/KkuMulKum/Source/Promise/PagePromise/ViewModel/PagePromiseViewModel.swift~HEAD new file mode 100644 index 00000000..eb68a471 --- /dev/null +++ b/KkuMulKum/Source/Promise/PagePromise/ViewModel/PagePromiseViewModel.swift~HEAD @@ -0,0 +1,17 @@ +// +// PromiseViewModel.swift +// KkuMulKum +// +// Created by YOUJIM on 7/9/24. +// + +import Foundation + + +class PagePromiseViewModel { + var currentPage = ObservablePattern(0) + + func didSegmentIndexChanged(index: Int) { + currentPage.value = index + } +} diff --git a/KkuMulKum/Source/Promise/PagePromise/ViewModel/PagePromiseViewModel.swift~suyeon b/KkuMulKum/Source/Promise/PagePromise/ViewModel/PagePromiseViewModel.swift~suyeon new file mode 100644 index 00000000..eb68a471 --- /dev/null +++ b/KkuMulKum/Source/Promise/PagePromise/ViewModel/PagePromiseViewModel.swift~suyeon @@ -0,0 +1,17 @@ +// +// PromiseViewModel.swift +// KkuMulKum +// +// Created by YOUJIM on 7/9/24. +// + +import Foundation + + +class PagePromiseViewModel { + var currentPage = ObservablePattern(0) + + func didSegmentIndexChanged(index: Int) { + currentPage.value = index + } +} From 835312423034fba70e8c6f9872aeb8ded00d6d7a Mon Sep 17 00:00:00 2001 From: youz2me Date: Mon, 15 Jul 2024 06:57:24 +0900 Subject: [PATCH 09/22] =?UTF-8?q?fix/#176=20=EC=B6=A9=EB=8F=8C=20=ED=95=B4?= =?UTF-8?q?=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- KkuMulKum.xcodeproj/project.pbxproj | 189 ++++++++++++------ .../PromiseLateInfoResponseModel.swift | 38 ---- .../Resource/Base/BaseViewController.swift | 5 + .../Source/Core/MainTabBarController.swift | 21 +- .../InviteCodeViewController.swift | 6 +- .../MeetingList/View/MeetingListView.swift | 2 +- .../MeetingListViewController.swift | 9 + .../ViewController/LoginViewController.swift | 10 +- .../View/BasePromiseSegmentedControl.swift | 74 ------- .../BasePromiseViewController.swift | 110 ---------- .../ViewModel/BasePromiseViewModel.swift | 17 -- .../PromiseInfo/View/PromiseInfoView.swift | 2 +- .../View/EnterReadyInfoButtonView.swift | 49 ----- .../ReadyStatus/View/ReadyPlanInfoView.swift | 65 ------ .../ReadyStatus/View/ReadyStatusView.swift | 61 ------ .../ReadyStatusViewController.swift | 16 -- .../ViewController/TardyViewController.swift | 70 ++++++- 17 files changed, 224 insertions(+), 520 deletions(-) delete mode 100644 KkuMulKum/Network/DTO/Model/Promises/PromiseLateInfoResponseModel.swift delete mode 100644 KkuMulKum/Source/Promise/BasePromise/View/BasePromiseSegmentedControl.swift delete mode 100644 KkuMulKum/Source/Promise/BasePromise/ViewController/BasePromiseViewController.swift delete mode 100644 KkuMulKum/Source/Promise/BasePromise/ViewModel/BasePromiseViewModel.swift delete mode 100644 KkuMulKum/Source/Promise/ReadyStatus/View/EnterReadyInfoButtonView.swift delete mode 100644 KkuMulKum/Source/Promise/ReadyStatus/View/ReadyPlanInfoView.swift delete mode 100644 KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusView.swift delete mode 100644 KkuMulKum/Source/Promise/ReadyStatus/ViewController/ReadyStatusViewController.swift diff --git a/KkuMulKum.xcodeproj/project.pbxproj b/KkuMulKum.xcodeproj/project.pbxproj index 961aae01..5f18e8d8 100644 --- a/KkuMulKum.xcodeproj/project.pbxproj +++ b/KkuMulKum.xcodeproj/project.pbxproj @@ -80,7 +80,7 @@ DD3072202C3C0D4500416D9F /* MyReadyStatusResponseModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD30721F2C3C0D4500416D9F /* MyReadyStatusResponseModel.swift */; }; DD3072222C3C0DA300416D9F /* PromiseParticipantListResponseModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD3072212C3C0DA300416D9F /* PromiseParticipantListResponseModel.swift */; }; DD3072242C3C0EB200416D9F /* MyPromiseReadyInfoRequestModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD3072232C3C0EB200416D9F /* MyPromiseReadyInfoRequestModel.swift */; }; - DD3072262C3C0F0B00416D9F /* PromiseLateInfoResponseModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD3072252C3C0F0B00416D9F /* PromiseLateInfoResponseModel.swift */; }; + DD3072262C3C0F0B00416D9F /* TardyInfoModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD3072252C3C0F0B00416D9F /* TardyInfoModel.swift */; }; DD3072282C3C104D00416D9F /* ArrivalCompletionResponseModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD3072272C3C104D00416D9F /* ArrivalCompletionResponseModel.swift */; }; DD3976682C41769400E2A4C4 /* CreateMeetingViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD3976672C41769400E2A4C4 /* CreateMeetingViewModel.swift */; }; DD39766B2C41995A00E2A4C4 /* FinishCreateNavigationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD39766A2C41995A00E2A4C4 /* FinishCreateNavigationView.swift */; }; @@ -95,6 +95,10 @@ DD3976892C41C2AD00E2A4C4 /* TodayEmptyView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD3976802C41C2AD00E2A4C4 /* TodayEmptyView.swift */; }; DD39768A2C41C2AD00E2A4C4 /* HomeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD3976822C41C2AD00E2A4C4 /* HomeViewController.swift */; }; DD39768C2C41C36B00E2A4C4 /* Color.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DD39768B2C41C36B00E2A4C4 /* Color.xcassets */; }; + DD41BEFA2C41D4160095A068 /* TardyView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD41BEF92C41D4160095A068 /* TardyView.swift */; }; + DD41BEFC2C41D54D0095A068 /* TardyPenaltyView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD41BEFB2C41D54D0095A068 /* TardyPenaltyView.swift */; }; + DD41BEFF2C41DAA40095A068 /* TardyEmptyView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD41BEFE2C41DAA40095A068 /* TardyEmptyView.swift */; }; + DD41BF012C41DE4F0095A068 /* TardyCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD41BF002C41DE4F0095A068 /* TardyCollectionViewCell.swift */; }; DD4393762C412F4500EC1799 /* InviteCodeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD43936D2C412F4500EC1799 /* InviteCodeView.swift */; }; DD4393772C412F4500EC1799 /* CreateMeetingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD43936E2C412F4500EC1799 /* CreateMeetingView.swift */; }; DD4393782C412F4500EC1799 /* CheckInviteCodeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD43936F2C412F4500EC1799 /* CheckInviteCodeView.swift */; }; @@ -104,25 +108,28 @@ DD43937C2C412F4500EC1799 /* InviteCodeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD4393742C412F4500EC1799 /* InviteCodeViewController.swift */; }; DD43937D2C412F4500EC1799 /* CheckInviteCodeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD4393752C412F4500EC1799 /* CheckInviteCodeViewController.swift */; }; DD43937F2C41357800EC1799 /* InviteCodeViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD43937E2C41357800EC1799 /* InviteCodeViewModel.swift */; }; - DD7698192C443D7E00EB09FA /* ReadyStatusProgressView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD7698182C443D7E00EB09FA /* ReadyStatusProgressView.swift */; }; - DD76981B2C44402A00EB09FA /* ReadyStatusButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD76981A2C44402A00EB09FA /* ReadyStatusButton.swift */; }; - DD76981D2C44767E00EB09FA /* OurReadyStatusTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD76981C2C44767E00EB09FA /* OurReadyStatusTableViewCell.swift */; }; - DD931B6B2C3D9EBB00526452 /* ReadyStatusView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD931B6A2C3D9EBB00526452 /* ReadyStatusView.swift */; }; + DD4909962C440CDC003ED304 /* ArriveView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD4909952C440CDC003ED304 /* ArriveView.swift */; }; + DD4909982C441215003ED304 /* TardyViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD4909972C441215003ED304 /* TardyViewModel.swift */; }; + DD49099C2C441719003ED304 /* TardyService.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD49099B2C441719003ED304 /* TardyService.swift */; }; + DD86262B2C44811100E4F980 /* OurReadyStatusTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD8626222C44811100E4F980 /* OurReadyStatusTableViewCell.swift */; }; + DD86262C2C44811100E4F980 /* EnterReadyInfoButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD8626242C44811100E4F980 /* EnterReadyInfoButtonView.swift */; }; + DD86262D2C44811100E4F980 /* ReadyPlanInfoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD8626252C44811100E4F980 /* ReadyPlanInfoView.swift */; }; + DD86262E2C44811100E4F980 /* ReadyStatusView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD8626262C44811100E4F980 /* ReadyStatusView.swift */; }; + DD86262F2C44811100E4F980 /* ReadyStatusButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD8626272C44811100E4F980 /* ReadyStatusButton.swift */; }; + DD8626302C44811100E4F980 /* ReadyStatusProgressView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD8626282C44811100E4F980 /* ReadyStatusProgressView.swift */; }; + DD8626312C44811100E4F980 /* ReadyStatusViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD86262A2C44811100E4F980 /* ReadyStatusViewController.swift */; }; DD931B6E2C3DA27F00526452 /* ParticipantCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD931B6D2C3DA27F00526452 /* ParticipantCollectionViewCell.swift */; }; - DD931B722C3DA92700526452 /* EnterReadyInfoButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD931B712C3DA92700526452 /* EnterReadyInfoButtonView.swift */; }; - DD931B742C3DAB9A00526452 /* ReadyPlanInfoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD931B732C3DAB9A00526452 /* ReadyPlanInfoView.swift */; }; DD931B762C3DC16100526452 /* PromiseInfoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD931B752C3DC16100526452 /* PromiseInfoView.swift */; }; DDA2EE732C385EB9007C6059 /* MainTabBarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDA2EE722C385EB9007C6059 /* MainTabBarController.swift */; }; DDAF1C7C2C3D5B86008A37D3 /* RxCocoa in Frameworks */ = {isa = PBXBuildFile; productRef = DDAF1C7B2C3D5B86008A37D3 /* RxCocoa */; }; DDAF1C7E2C3D5B86008A37D3 /* RxRelay in Frameworks */ = {isa = PBXBuildFile; productRef = DDAF1C7D2C3D5B86008A37D3 /* RxRelay */; }; DDAF1C812C3D5BD5008A37D3 /* Kingfisher in Frameworks */ = {isa = PBXBuildFile; productRef = DDAF1C802C3D5BD5008A37D3 /* Kingfisher */; }; DDAF1C842C3D5D19008A37D3 /* ViewModelType.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDAF1C832C3D5D19008A37D3 /* ViewModelType.swift */; }; - DDAF1C8E2C3D6E3D008A37D3 /* ReadyStatusViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDAF1C882C3D6E3D008A37D3 /* ReadyStatusViewController.swift */; }; - DDAF1C8F2C3D6E3D008A37D3 /* BasePromiseSegmentedControl.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDAF1C892C3D6E3D008A37D3 /* BasePromiseSegmentedControl.swift */; }; - DDAF1C902C3D6E3D008A37D3 /* BasePromiseViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDAF1C8A2C3D6E3D008A37D3 /* BasePromiseViewModel.swift */; }; + DDAF1C8F2C3D6E3D008A37D3 /* PagePromiseSegmentedControl.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDAF1C892C3D6E3D008A37D3 /* PagePromiseSegmentedControl.swift */; }; + DDAF1C902C3D6E3D008A37D3 /* PagePromiseViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDAF1C8A2C3D6E3D008A37D3 /* PagePromiseViewModel.swift */; }; DDAF1C912C3D6E3D008A37D3 /* TardyViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDAF1C8B2C3D6E3D008A37D3 /* TardyViewController.swift */; }; DDAF1C922C3D6E3D008A37D3 /* PromiseInfoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDAF1C8C2C3D6E3D008A37D3 /* PromiseInfoViewController.swift */; }; - DDAF1C932C3D6E3D008A37D3 /* BasePromiseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDAF1C8D2C3D6E3D008A37D3 /* BasePromiseViewController.swift */; }; + DDAF1C932C3D6E3D008A37D3 /* PagePromiseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDAF1C8D2C3D6E3D008A37D3 /* PagePromiseViewController.swift */; }; DE0137D32C43C5E50088C777 /* MyPageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE0137D22C43C5E50088C777 /* MyPageView.swift */; }; DE159D322C406E1600425101 /* MyPageAlarmSettingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE159D2A2C406E1600425101 /* MyPageAlarmSettingView.swift */; }; DE159D332C406E1600425101 /* MyPageContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE159D2B2C406E1600425101 /* MyPageContentView.swift */; }; @@ -217,7 +224,7 @@ DD30721F2C3C0D4500416D9F /* MyReadyStatusResponseModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyReadyStatusResponseModel.swift; sourceTree = ""; }; DD3072212C3C0DA300416D9F /* PromiseParticipantListResponseModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PromiseParticipantListResponseModel.swift; sourceTree = ""; }; DD3072232C3C0EB200416D9F /* MyPromiseReadyInfoRequestModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyPromiseReadyInfoRequestModel.swift; sourceTree = ""; }; - DD3072252C3C0F0B00416D9F /* PromiseLateInfoResponseModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PromiseLateInfoResponseModel.swift; sourceTree = ""; }; + DD3072252C3C0F0B00416D9F /* TardyInfoModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TardyInfoModel.swift; sourceTree = ""; }; DD3072272C3C104D00416D9F /* ArrivalCompletionResponseModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrivalCompletionResponseModel.swift; sourceTree = ""; }; DD3976672C41769400E2A4C4 /* CreateMeetingViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreateMeetingViewModel.swift; sourceTree = ""; }; DD39766A2C41995A00E2A4C4 /* FinishCreateNavigationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FinishCreateNavigationView.swift; sourceTree = ""; }; @@ -232,6 +239,10 @@ DD3976802C41C2AD00E2A4C4 /* TodayEmptyView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TodayEmptyView.swift; sourceTree = ""; }; DD3976822C41C2AD00E2A4C4 /* HomeViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HomeViewController.swift; sourceTree = ""; }; DD39768B2C41C36B00E2A4C4 /* Color.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Color.xcassets; sourceTree = ""; }; + DD41BEF92C41D4160095A068 /* TardyView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TardyView.swift; sourceTree = ""; }; + DD41BEFB2C41D54D0095A068 /* TardyPenaltyView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TardyPenaltyView.swift; sourceTree = ""; }; + DD41BEFE2C41DAA40095A068 /* TardyEmptyView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TardyEmptyView.swift; sourceTree = ""; }; + DD41BF002C41DE4F0095A068 /* TardyCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TardyCollectionViewCell.swift; sourceTree = ""; }; DD43936D2C412F4500EC1799 /* InviteCodeView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InviteCodeView.swift; sourceTree = ""; }; DD43936E2C412F4500EC1799 /* CreateMeetingView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CreateMeetingView.swift; sourceTree = ""; }; DD43936F2C412F4500EC1799 /* CheckInviteCodeView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CheckInviteCodeView.swift; sourceTree = ""; }; @@ -241,22 +252,25 @@ DD4393742C412F4500EC1799 /* InviteCodeViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InviteCodeViewController.swift; sourceTree = ""; }; DD4393752C412F4500EC1799 /* CheckInviteCodeViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CheckInviteCodeViewController.swift; sourceTree = ""; }; DD43937E2C41357800EC1799 /* InviteCodeViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InviteCodeViewModel.swift; sourceTree = ""; }; - DD7698182C443D7E00EB09FA /* ReadyStatusProgressView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadyStatusProgressView.swift; sourceTree = ""; }; - DD76981A2C44402A00EB09FA /* ReadyStatusButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadyStatusButton.swift; sourceTree = ""; }; - DD76981C2C44767E00EB09FA /* OurReadyStatusTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OurReadyStatusTableViewCell.swift; sourceTree = ""; }; - DD931B6A2C3D9EBB00526452 /* ReadyStatusView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadyStatusView.swift; sourceTree = ""; }; + DD4909952C440CDC003ED304 /* ArriveView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArriveView.swift; sourceTree = ""; }; + DD4909972C441215003ED304 /* TardyViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TardyViewModel.swift; sourceTree = ""; }; + DD49099B2C441719003ED304 /* TardyService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TardyService.swift; sourceTree = ""; }; + DD8626222C44811100E4F980 /* OurReadyStatusTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OurReadyStatusTableViewCell.swift; sourceTree = ""; }; + DD8626242C44811100E4F980 /* EnterReadyInfoButtonView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EnterReadyInfoButtonView.swift; sourceTree = ""; }; + DD8626252C44811100E4F980 /* ReadyPlanInfoView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReadyPlanInfoView.swift; sourceTree = ""; }; + DD8626262C44811100E4F980 /* ReadyStatusView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReadyStatusView.swift; sourceTree = ""; }; + DD8626272C44811100E4F980 /* ReadyStatusButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReadyStatusButton.swift; sourceTree = ""; }; + DD8626282C44811100E4F980 /* ReadyStatusProgressView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReadyStatusProgressView.swift; sourceTree = ""; }; + DD86262A2C44811100E4F980 /* ReadyStatusViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReadyStatusViewController.swift; sourceTree = ""; }; DD931B6D2C3DA27F00526452 /* ParticipantCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ParticipantCollectionViewCell.swift; sourceTree = ""; }; - DD931B712C3DA92700526452 /* EnterReadyInfoButtonView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnterReadyInfoButtonView.swift; sourceTree = ""; }; - DD931B732C3DAB9A00526452 /* ReadyPlanInfoView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadyPlanInfoView.swift; sourceTree = ""; }; DD931B752C3DC16100526452 /* PromiseInfoView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PromiseInfoView.swift; sourceTree = ""; }; DDA2EE722C385EB9007C6059 /* MainTabBarController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainTabBarController.swift; sourceTree = ""; }; DDAF1C832C3D5D19008A37D3 /* ViewModelType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewModelType.swift; sourceTree = ""; }; - DDAF1C882C3D6E3D008A37D3 /* ReadyStatusViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReadyStatusViewController.swift; sourceTree = ""; }; - DDAF1C892C3D6E3D008A37D3 /* BasePromiseSegmentedControl.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BasePromiseSegmentedControl.swift; sourceTree = ""; }; - DDAF1C8A2C3D6E3D008A37D3 /* BasePromiseViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BasePromiseViewModel.swift; sourceTree = ""; }; + DDAF1C892C3D6E3D008A37D3 /* PagePromiseSegmentedControl.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PagePromiseSegmentedControl.swift; sourceTree = ""; }; + DDAF1C8A2C3D6E3D008A37D3 /* PagePromiseViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PagePromiseViewModel.swift; sourceTree = ""; }; DDAF1C8B2C3D6E3D008A37D3 /* TardyViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TardyViewController.swift; sourceTree = ""; }; DDAF1C8C2C3D6E3D008A37D3 /* PromiseInfoViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PromiseInfoViewController.swift; sourceTree = ""; }; - DDAF1C8D2C3D6E3D008A37D3 /* BasePromiseViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BasePromiseViewController.swift; sourceTree = ""; }; + DDAF1C8D2C3D6E3D008A37D3 /* PagePromiseViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PagePromiseViewController.swift; sourceTree = ""; }; DE0137D22C43C5E50088C777 /* MyPageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyPageView.swift; sourceTree = ""; }; DE159D2A2C406E1600425101 /* MyPageAlarmSettingView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MyPageAlarmSettingView.swift; sourceTree = ""; }; DE159D2B2C406E1600425101 /* MyPageContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MyPageContentView.swift; sourceTree = ""; }; @@ -661,20 +675,20 @@ path = ViewController; sourceTree = ""; }; - DD39768D2C41CA0700E2A4C4 /* BasePromise */ = { + DD39768D2C41CA0700E2A4C4 /* PagePromise */ = { isa = PBXGroup; children = ( DD39768E2C41CABE00E2A4C4 /* ViewController */, DD39768F2C41CAC700E2A4C4 /* ViewModel */, DD3976902C41CACF00E2A4C4 /* View */, ); - path = BasePromise; + path = PagePromise; sourceTree = ""; }; DD39768E2C41CABE00E2A4C4 /* ViewController */ = { isa = PBXGroup; children = ( - DDAF1C8D2C3D6E3D008A37D3 /* BasePromiseViewController.swift */, + DDAF1C8D2C3D6E3D008A37D3 /* PagePromiseViewController.swift */, ); path = ViewController; sourceTree = ""; @@ -682,7 +696,7 @@ DD39768F2C41CAC700E2A4C4 /* ViewModel */ = { isa = PBXGroup; children = ( - DDAF1C8A2C3D6E3D008A37D3 /* BasePromiseViewModel.swift */, + DDAF1C8A2C3D6E3D008A37D3 /* PagePromiseViewModel.swift */, ); path = ViewModel; sourceTree = ""; @@ -690,7 +704,7 @@ DD3976902C41CACF00E2A4C4 /* View */ = { isa = PBXGroup; children = ( - DDAF1C892C3D6E3D008A37D3 /* BasePromiseSegmentedControl.swift */, + DDAF1C892C3D6E3D008A37D3 /* PagePromiseSegmentedControl.swift */, ); path = View; sourceTree = ""; @@ -729,32 +743,31 @@ path = Cell; sourceTree = ""; }; - DD3976952C41CC2200E2A4C4 /* ViewController */ = { + DD3976972C41CC3300E2A4C4 /* ViewController */ = { isa = PBXGroup; children = ( - DDAF1C882C3D6E3D008A37D3 /* ReadyStatusViewController.swift */, + DDAF1C8B2C3D6E3D008A37D3 /* TardyViewController.swift */, ); path = ViewController; sourceTree = ""; }; - DD3976962C41CC2C00E2A4C4 /* View */ = { + DD41BEFD2C41D85F0095A068 /* View */ = { isa = PBXGroup; children = ( - DD931B6A2C3D9EBB00526452 /* ReadyStatusView.swift */, - DD931B712C3DA92700526452 /* EnterReadyInfoButtonView.swift */, - DD931B732C3DAB9A00526452 /* ReadyPlanInfoView.swift */, - DD7698182C443D7E00EB09FA /* ReadyStatusProgressView.swift */, - DD76981A2C44402A00EB09FA /* ReadyStatusButton.swift */, + DD41BEF92C41D4160095A068 /* TardyView.swift */, + DD41BEFB2C41D54D0095A068 /* TardyPenaltyView.swift */, + DD41BEFE2C41DAA40095A068 /* TardyEmptyView.swift */, + DD4909952C440CDC003ED304 /* ArriveView.swift */, ); path = View; sourceTree = ""; }; - DD3976972C41CC3300E2A4C4 /* ViewController */ = { + DD41BF022C41DE530095A068 /* Cell */ = { isa = PBXGroup; children = ( - DDAF1C8B2C3D6E3D008A37D3 /* TardyViewController.swift */, + DD41BF002C41DE4F0095A068 /* TardyCollectionViewCell.swift */, ); - path = ViewController; + path = Cell; sourceTree = ""; }; DD43936B2C412F4500EC1799 /* MeetingCreate */ = { @@ -865,14 +878,61 @@ path = ViewModel; sourceTree = ""; }; - DD76981E2C44768100EB09FA /* Cell */ = { + DD4909992C441228003ED304 /* ViewModel */ = { + isa = PBXGroup; + children = ( + DD4909972C441215003ED304 /* TardyViewModel.swift */, + ); + path = ViewModel; + sourceTree = ""; + }; + DD49099A2C441709003ED304 /* Service */ = { + isa = PBXGroup; + children = ( + DD49099B2C441719003ED304 /* TardyService.swift */, + ); + path = Service; + sourceTree = ""; + }; + DD8626202C44811100E4F980 /* ReadyStatus */ = { + isa = PBXGroup; + children = ( + DD8626212C44811100E4F980 /* Cell */, + DD8626232C44811100E4F980 /* View */, + DD8626292C44811100E4F980 /* ViewController */, + ); + name = ReadyStatus; + path = ../../../../../Desktop/ReadyStatus; + sourceTree = ""; + }; + DD8626212C44811100E4F980 /* Cell */ = { isa = PBXGroup; children = ( - DD76981C2C44767E00EB09FA /* OurReadyStatusTableViewCell.swift */, + DD8626222C44811100E4F980 /* OurReadyStatusTableViewCell.swift */, ); path = Cell; sourceTree = ""; }; + DD8626232C44811100E4F980 /* View */ = { + isa = PBXGroup; + children = ( + DD8626242C44811100E4F980 /* EnterReadyInfoButtonView.swift */, + DD8626252C44811100E4F980 /* ReadyPlanInfoView.swift */, + DD8626262C44811100E4F980 /* ReadyStatusView.swift */, + DD8626272C44811100E4F980 /* ReadyStatusButton.swift */, + DD8626282C44811100E4F980 /* ReadyStatusProgressView.swift */, + ); + path = View; + sourceTree = ""; + }; + DD8626292C44811100E4F980 /* ViewController */ = { + isa = PBXGroup; + children = ( + DD86262A2C44811100E4F980 /* ReadyStatusViewController.swift */, + ); + path = ViewController; + sourceTree = ""; + }; DD865B652C3920F600C351A2 /* Onboarding */ = { isa = PBXGroup; children = ( @@ -894,20 +954,14 @@ path = Login; sourceTree = ""; }; - DD931B672C3D9D9C00526452 /* ReadyStatus */ = { - isa = PBXGroup; - children = ( - DD3976952C41CC2200E2A4C4 /* ViewController */, - DD3976962C41CC2C00E2A4C4 /* View */, - DD76981E2C44768100EB09FA /* Cell */, - ); - path = ReadyStatus; - sourceTree = ""; - }; DD931B682C3D9DAD00526452 /* Tardy */ = { isa = PBXGroup; children = ( + DD49099A2C441709003ED304 /* Service */, DD3976972C41CC3300E2A4C4 /* ViewController */, + DD41BEFD2C41D85F0095A068 /* View */, + DD4909992C441228003ED304 /* ViewModel */, + DD41BF022C41DE530095A068 /* Cell */, ); path = Tardy; sourceTree = ""; @@ -931,9 +985,9 @@ DDAF1C872C3D6E3D008A37D3 /* Promise */ = { isa = PBXGroup; children = ( - DD39768D2C41CA0700E2A4C4 /* BasePromise */, + DD39768D2C41CA0700E2A4C4 /* PagePromise */, DD3976912C41CAF900E2A4C4 /* PromiseInfo */, - DD931B672C3D9D9C00526452 /* ReadyStatus */, + DD8626202C44811100E4F980 /* ReadyStatus */, DD931B682C3D9DAD00526452 /* Tardy */, ); path = Promise; @@ -1199,7 +1253,7 @@ DD30721F2C3C0D4500416D9F /* MyReadyStatusResponseModel.swift */, DD3072212C3C0DA300416D9F /* PromiseParticipantListResponseModel.swift */, DD3072232C3C0EB200416D9F /* MyPromiseReadyInfoRequestModel.swift */, - DD3072252C3C0F0B00416D9F /* PromiseLateInfoResponseModel.swift */, + DD3072252C3C0F0B00416D9F /* TardyInfoModel.swift */, DD3072272C3C104D00416D9F /* ArrivalCompletionResponseModel.swift */, ); path = Promises; @@ -1375,20 +1429,21 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - DDAF1C8E2C3D6E3D008A37D3 /* ReadyStatusViewController.swift in Sources */, DED5DBF22C34534A006ECE7E /* BaseCollectionReusableView.swift in Sources */, DED5DBEC2C345210006ECE7E /* BaseViewController.swift in Sources */, DE6D4D142C3F14D80005584B /* MeetingPromiseCell.swift in Sources */, DD3976892C41C2AD00E2A4C4 /* TodayEmptyView.swift in Sources */, DD43937C2C412F4500EC1799 /* InviteCodeViewController.swift in Sources */, DD4393782C412F4500EC1799 /* CheckInviteCodeView.swift in Sources */, + DD8626302C44811100E4F980 /* ReadyStatusProgressView.swift in Sources */, DE6D4D102C3F14D80005584B /* InvitationCodePopUpView.swift in Sources */, + DD8626312C44811100E4F980 /* ReadyStatusViewController.swift in Sources */, DD30721A2C3C011600416D9F /* AddPromiseRequestModel.swift in Sources */, DE159D332C406E1600425101 /* MyPageContentView.swift in Sources */, DE6D4D112C3F14D80005584B /* MeetingInfoBannerView.swift in Sources */, DE6D4D122C3F14D80005584B /* MeetingInfoView.swift in Sources */, DD30721E2C3C0CC800416D9F /* PromiseInfoResponseModel.swift in Sources */, - DD931B722C3DA92700526452 /* EnterReadyInfoButtonView.swift in Sources */, + DD41BEFF2C41DAA40095A068 /* TardyEmptyView.swift in Sources */, A3FB18512C3BF531001483E5 /* RegisterMeetingsResponseModel.swift in Sources */, 789AD4B32C3C0093002E2688 /* SocialLoginResponseModel.swift in Sources */, DD43937F2C41357800EC1799 /* InviteCodeViewModel.swift in Sources */, @@ -1398,12 +1453,12 @@ DD3976842C41C2AD00E2A4C4 /* UpcomingPromiseCollecitonViewCell.swift in Sources */, DEBA03312C3C2972002ED8F2 /* ViewController.swift in Sources */, DD43937D2C412F4500EC1799 /* CheckInviteCodeViewController.swift in Sources */, - DD931B742C3DAB9A00526452 /* ReadyPlanInfoView.swift in Sources */, DD4393772C412F4500EC1799 /* CreateMeetingView.swift in Sources */, 789873342C3D1A7B00435E96 /* LoginView.swift in Sources */, 782B40822C3E4925008B0CA7 /* NicknameViewModel.swift in Sources */, 782B406F2C3DBF93008B0CA7 /* ProfileViewController.swift in Sources */, A3FB18592C3BF77D001483E5 /* MeetingInfoResponseModel.swift in Sources */, + DD4909982C441215003ED304 /* TardyViewModel.swift in Sources */, DEA932182C3F180800FDF637 /* MeetingPromisesModel.swift in Sources */, DE159D342C406E1600425101 /* MyPageEtcSettingView.swift in Sources */, DE9E18842C3BA84500DB76B4 /* CustomTextField.swift in Sources */, @@ -1413,7 +1468,6 @@ DD43937A2C412F4500EC1799 /* FinishCreateViewController.swift in Sources */, DE254AAC2C31192400A4015E /* UILabel+.swift in Sources */, DE254AB72C3119D000A4015E /* ReuseIdentifiable.swift in Sources */, - DD7698192C443D7E00EB09FA /* ReadyStatusProgressView.swift in Sources */, A3DD9C412C41BAD000E58A13 /* MeetingListViewModel.swift in Sources */, DDAF1C922C3D6E3D008A37D3 /* PromiseInfoViewController.swift in Sources */, 78AED1342C3D951F000AD80A /* NicknameViewController.swift in Sources */, @@ -1421,14 +1475,14 @@ DDAF1C912C3D6E3D008A37D3 /* TardyViewController.swift in Sources */, 782B407D2C3E3984008B0CA7 /* WelcomeViewController.swift in Sources */, DE8248002C36E857000601BC /* ObservablePattern.swift in Sources */, - DDAF1C902C3D6E3D008A37D3 /* BasePromiseViewModel.swift in Sources */, + DDAF1C902C3D6E3D008A37D3 /* PagePromiseViewModel.swift in Sources */, DE254AAA2C31190E00A4015E /* UIStackView+.swift in Sources */, DE159D362C406E1600425101 /* MyPageViewController.swift in Sources */, DD4393762C412F4500EC1799 /* InviteCodeView.swift in Sources */, DED5DBF02C345317006ECE7E /* BaseCollectionViewCell.swift in Sources */, DE32D1D42C3BFB56006848DF /* UpdateProfileNameModel.swift in Sources */, DE6D4D132C3F14D80005584B /* MeetingMemberCell.swift in Sources */, - DDAF1C932C3D6E3D008A37D3 /* BasePromiseViewController.swift in Sources */, + DDAF1C932C3D6E3D008A37D3 /* PagePromiseViewController.swift in Sources */, DE9E18922C3BCC9D00DB76B4 /* SocialLoginRequestModel.swift in Sources */, DE254AA82C3118EA00A4015E /* UIView+.swift in Sources */, DD3976732C41B6C800E2A4C4 /* CreateMeetingService.swift in Sources */, @@ -1437,13 +1491,16 @@ DD4393792C412F4500EC1799 /* JoinButtonView.swift in Sources */, A3DD9C3E2C41BAD000E58A13 /* MeetingDummyModel.swift in Sources */, DD3976832C41C2AD00E2A4C4 /* HomeViewModel.swift in Sources */, + DD41BF012C41DE4F0095A068 /* TardyCollectionViewCell.swift in Sources */, DE9E189A2C3BCCBE00DB76B4 /* UtilsTemp.swift in Sources */, 782B407B2C3E395A008B0CA7 /* WelcomeView.swift in Sources */, DD3072142C3BF87A00416D9F /* NearestPromiseResponseModel.swift in Sources */, 782B407F2C3E44B7008B0CA7 /* WelcomeViewModel.swift in Sources */, + DD41BEFA2C41D4160095A068 /* TardyView.swift in Sources */, DD3072162C3BFE4E00416D9F /* UpcomingPromiseListResponseModel.swift in Sources */, A3FB18572C3BF704001483E5 /* MeetingListResponseModel.swift in Sources */, DE254AB22C31197B00A4015E /* UIButton+.swift in Sources */, + DD86262D2C44811100E4F980 /* ReadyPlanInfoView.swift in Sources */, DE6D4D162C3F14D80005584B /* MeetingInfoViewController.swift in Sources */, DE159D322C406E1600425101 /* MyPageAlarmSettingView.swift in Sources */, 78B9286C2C29402C006D9942 /* AppDelegate.swift in Sources */, @@ -1459,14 +1516,17 @@ A3FB185B2C3BF7DF001483E5 /* MeetingMembersResponseModel.swift in Sources */, DD3072222C3C0DA300416D9F /* PromiseParticipantListResponseModel.swift in Sources */, DD3976862C41C2AD00E2A4C4 /* HomeView.swift in Sources */, + DD41BEFC2C41D54D0095A068 /* TardyPenaltyView.swift in Sources */, 789873322C3D1A7B00435E96 /* LoginViewController.swift in Sources */, + DD49099C2C441719003ED304 /* TardyService.swift in Sources */, 782B40722C3DBFA3008B0CA7 /* ProfileViewModel.swift in Sources */, - DDAF1C8F2C3D6E3D008A37D3 /* BasePromiseSegmentedControl.swift in Sources */, + DDAF1C8F2C3D6E3D008A37D3 /* PagePromiseSegmentedControl.swift in Sources */, DE32D1D22C3BF703006848DF /* LoginUserResponseModel.swift in Sources */, + DD86262C2C44811100E4F980 /* EnterReadyInfoButtonView.swift in Sources */, DE9E18892C3BC91000DB76B4 /* ResponseBodyDTO.swift in Sources */, - DD931B6B2C3D9EBB00526452 /* ReadyStatusView.swift in Sources */, DD3976682C41769400E2A4C4 /* CreateMeetingViewModel.swift in Sources */, A3DD9C3D2C41BAD000E58A13 /* MeetingTableViewCell.swift in Sources */, + DD86262F2C44811100E4F980 /* ReadyStatusButton.swift in Sources */, DD39766B2C41995A00E2A4C4 /* FinishCreateNavigationView.swift in Sources */, DD3072202C3C0D4500416D9F /* MyReadyStatusResponseModel.swift in Sources */, DD3072282C3C104D00416D9F /* ArrivalCompletionResponseModel.swift in Sources */, @@ -1474,22 +1534,23 @@ DD3976882C41C2AD00E2A4C4 /* UpcomingEmptyView.swift in Sources */, DD931B762C3DC16100526452 /* PromiseInfoView.swift in Sources */, DD3072242C3C0EB200416D9F /* MyPromiseReadyInfoRequestModel.swift in Sources */, - DD76981D2C44767E00EB09FA /* OurReadyStatusTableViewCell.swift in Sources */, DD3976872C41C2AD00E2A4C4 /* TodayPromiseView.swift in Sources */, 789873332C3D1A7B00435E96 /* LoginViewModel.swift in Sources */, 782B40752C3DBFBA008B0CA7 /* ProfileView.swift in Sources */, + DD86262E2C44811100E4F980 /* ReadyStatusView.swift in Sources */, DED5DBEE2C34529A006ECE7E /* BaseView.swift in Sources */, A3DD9C402C41BAD000E58A13 /* MeetingListViewController.swift in Sources */, A3DD9C3F2C41BAD000E58A13 /* MeetingListView.swift in Sources */, DE9E18802C3BA4AA00DB76B4 /* CustomButton.swift in Sources */, DE0137D32C43C5E50088C777 /* MyPageView.swift in Sources */, + DD4909962C440CDC003ED304 /* ArriveView.swift in Sources */, DE254AB02C31195B00A4015E /* NSAttributedString+.swift in Sources */, DD43937B2C412F4500EC1799 /* CreateMeetingViewController.swift in Sources */, DE8247FD2C36E7C7000601BC /* MoyaLoggingPlugin.swift in Sources */, DDAF1C842C3D5D19008A37D3 /* ViewModelType.swift in Sources */, - DD3072262C3C0F0B00416D9F /* PromiseLateInfoResponseModel.swift in Sources */, + DD3072262C3C0F0B00416D9F /* TardyInfoModel.swift in Sources */, + DD86262B2C44811100E4F980 /* OurReadyStatusTableViewCell.swift in Sources */, DE254AB92C311AB300A4015E /* Screen.swift in Sources */, - DD76981B2C44402A00EB09FA /* ReadyStatusButton.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/KkuMulKum/Network/DTO/Model/Promises/PromiseLateInfoResponseModel.swift b/KkuMulKum/Network/DTO/Model/Promises/PromiseLateInfoResponseModel.swift deleted file mode 100644 index 2c8e7ad1..00000000 --- a/KkuMulKum/Network/DTO/Model/Promises/PromiseLateInfoResponseModel.swift +++ /dev/null @@ -1,38 +0,0 @@ -// -// PromiseLateInfoResponseModel.swift -// KkuMulKum -// -// Created by YOUJIM on 7/8/24. -// - - -// MARK: 약속 지각 상세 조회 - -import Foundation - -struct PromiseLateInfoModel: ResponseModelType { - let penalty, name, profileImageURL: String - let isPastDue: Bool - let lateComers: [Comer] - let id: Int - - enum CodingKeys: String, CodingKey { - case penalty - case name - case profileImageURL = "profileImg" - case isPastDue - case lateComers - case id - } -} - -struct Comer: Codable { - let id: Int - let name, profileImageURL: String - - enum CodingKeys: String, CodingKey { - case id - case name - case profileImageURL = "profileImg" - } -} diff --git a/KkuMulKum/Resource/Base/BaseViewController.swift b/KkuMulKum/Resource/Base/BaseViewController.swift index 8dece247..9e80cb62 100644 --- a/KkuMulKum/Resource/Base/BaseViewController.swift +++ b/KkuMulKum/Resource/Base/BaseViewController.swift @@ -46,6 +46,11 @@ extension BaseViewController { $0.horizontalEdges.bottom.equalToSuperview() $0.height.equalTo(Screen.height(1)) } + + let barAppearance = UINavigationBarAppearance() + barAppearance.backgroundColor = .white + navigationItem.standardAppearance = barAppearance + navigationItem.scrollEdgeAppearance = barAppearance } /// 네비게이션 바 BackButton 구성 diff --git a/KkuMulKum/Source/Core/MainTabBarController.swift b/KkuMulKum/Source/Core/MainTabBarController.swift index 2ac18646..ff5f7b67 100644 --- a/KkuMulKum/Source/Core/MainTabBarController.swift +++ b/KkuMulKum/Source/Core/MainTabBarController.swift @@ -49,20 +49,17 @@ final class MainTabBarController: UITabBarController { tabBar.standardAppearance = tabBarAppearance tabBar.scrollEdgeAppearance = tabBarAppearance - let homeNavigationController = UINavigationController(rootViewController: homeViewController).then { - $0.navigationBar.topItem?.backButtonDisplayMode = .minimal - $0.navigationBar.tintColor = .black - } + let homeNavigationController = UINavigationController( + rootViewController: homeViewController + ) - let meetingListNavigationController = UINavigationController(rootViewController: meetingListViewController).then { - $0.navigationBar.topItem?.backButtonDisplayMode = .minimal - $0.navigationBar.tintColor = .black - } + let meetingListNavigationController = UINavigationController( + rootViewController: meetingListViewController + ) - let myPageViewNavigationController = UINavigationController(rootViewController: myPageViewController).then { - $0.navigationBar.topItem?.backButtonDisplayMode = .minimal - $0.navigationBar.tintColor = .black - } + let myPageViewNavigationController = UINavigationController( + rootViewController: myPageViewController + ) setViewControllers([ homeNavigationController, diff --git a/KkuMulKum/Source/MeetingCreate/InviteCode/ViewController/InviteCodeViewController.swift b/KkuMulKum/Source/MeetingCreate/InviteCode/ViewController/InviteCodeViewController.swift index 011b9063..5ea68c74 100644 --- a/KkuMulKum/Source/MeetingCreate/InviteCode/ViewController/InviteCodeViewController.swift +++ b/KkuMulKum/Source/MeetingCreate/InviteCode/ViewController/InviteCodeViewController.swift @@ -87,11 +87,9 @@ class InviteCodeViewController: BaseViewController { @objc private func nextButtonTapped() { // TODO: 서버 연결할 때 데이터 바인딩해서 화면 전환 시키기 - let promiseViewController = BasePromiseViewController() + let basePromiseViewController = PagePromiseViewController() - promiseViewController.modalPresentationStyle = .fullScreen - - navigationController?.pushViewController(promiseViewController, animated: true) + navigationController?.pushViewController(basePromiseViewController, animated: true) } @objc private func textFieldDidChange(_ textField: UITextField) { diff --git a/KkuMulKum/Source/MeetingList/View/MeetingListView.swift b/KkuMulKum/Source/MeetingList/View/MeetingListView.swift index 6e15f301..bbdf5438 100644 --- a/KkuMulKum/Source/MeetingList/View/MeetingListView.swift +++ b/KkuMulKum/Source/MeetingList/View/MeetingListView.swift @@ -21,7 +21,7 @@ final class MeetingListView: BaseView { $0.setText("꾸물리안이 가입한 모임은\n총 3개예요!", style: .head01, color: .gray8) } - private let addButton = UIButton().then { + let addButton = UIButton().then { $0.backgroundColor = .green2 $0.layer.cornerRadius = 8 } diff --git a/KkuMulKum/Source/MeetingList/ViewController/MeetingListViewController.swift b/KkuMulKum/Source/MeetingList/ViewController/MeetingListViewController.swift index 1b8bab56..9370527c 100644 --- a/KkuMulKum/Source/MeetingList/ViewController/MeetingListViewController.swift +++ b/KkuMulKum/Source/MeetingList/ViewController/MeetingListViewController.swift @@ -77,4 +77,13 @@ extension MeetingListViewController: UITableViewDataSource { cell.selectionStyle = .none return cell } + + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + let basePromiseViewController = PagePromiseViewController() + + basePromiseViewController.modalPresentationStyle = .fullScreen + + // TODO: 추후 네비게이션 여부 정해지면 맞춰서 수정 + present(basePromiseViewController, animated: false) + } } diff --git a/KkuMulKum/Source/Onboarding/Login/ViewController/LoginViewController.swift b/KkuMulKum/Source/Onboarding/Login/ViewController/LoginViewController.swift index 4be171fa..87314318 100644 --- a/KkuMulKum/Source/Onboarding/Login/ViewController/LoginViewController.swift +++ b/KkuMulKum/Source/Onboarding/Login/ViewController/LoginViewController.swift @@ -81,11 +81,11 @@ class LoginViewController: BaseViewController { // TODO: 프로필 설정부터 네비게이션으로 플로우 동작 - let viewController = NicknameViewController() - let navigationController = UINavigationController(rootViewController: viewController) - navigationController.modalTransitionStyle = .crossDissolve - navigationController.modalPresentationStyle = .fullScreen - present(navigationController, animated: true) + let viewController = MainTabBarController() + + viewController.modalPresentationStyle = .fullScreen + + present(viewController, animated: true) } } diff --git a/KkuMulKum/Source/Promise/BasePromise/View/BasePromiseSegmentedControl.swift b/KkuMulKum/Source/Promise/BasePromise/View/BasePromiseSegmentedControl.swift deleted file mode 100644 index 014a6d5a..00000000 --- a/KkuMulKum/Source/Promise/BasePromise/View/BasePromiseSegmentedControl.swift +++ /dev/null @@ -1,74 +0,0 @@ -// -// PromiseSegmentedControl.swift -// KkuMulKum -// -// Created by YOUJIM on 7/9/24. -// - -import UIKit - -import SnapKit - -class BasePromiseSegmentedControl: UISegmentedControl { - private let backgroundLineView: UIView = UIView(backgroundColor: .gray2) - - let selectedUnderLineView: UIView = UIView(backgroundColor: .black).then { - $0.layer.cornerRadius = 1 - } - - override init(items: [Any]?) { - super.init(items: items) - - setupSegment() - setupTextAttribute() - setupBackgroundLineView() - setupBackgroundAndDivider() - } - - required init?(coder: NSCoder) { - fatalError() - } - - private func setupSegment() { - addSubviews(backgroundLineView, selectedUnderLineView) - - selectedSegmentIndex = 0 - } - - private func setupBackgroundAndDivider() { - setBackgroundImage(UIImage(), for: .normal, barMetrics: .default) - setBackgroundImage(UIImage(), for: .selected, barMetrics: .default) - setBackgroundImage(UIImage(), for: .highlighted, barMetrics: .default) - - setDividerImage( - UIImage(), - forLeftSegmentState: .selected, - rightSegmentState: .normal, - barMetrics: .default - ) - } - - private func setupTextAttribute() { - setTitleTextAttributes([ - NSAttributedString.Key.foregroundColor: UIColor.gray3, - NSAttributedString.Key.font: UIFont.pretendard(.body05) - ], for: .normal) - setTitleTextAttributes([ - NSAttributedString.Key.foregroundColor: UIColor.black, - NSAttributedString.Key.font: UIFont.pretendard(.body05) - ], for: .selected) - } - - private func setupBackgroundLineView() { - backgroundLineView.snp.makeConstraints { - $0.bottom.leading.trailing.equalToSuperview() - $0.height.equalTo(2) - } - - selectedUnderLineView.snp.makeConstraints { - $0.bottom.leading.equalToSuperview() - $0.width.equalToSuperview().dividedBy(numberOfSegments) - $0.height.equalTo(backgroundLineView) - } - } -} diff --git a/KkuMulKum/Source/Promise/BasePromise/ViewController/BasePromiseViewController.swift b/KkuMulKum/Source/Promise/BasePromise/ViewController/BasePromiseViewController.swift deleted file mode 100644 index 93e42215..00000000 --- a/KkuMulKum/Source/Promise/BasePromise/ViewController/BasePromiseViewController.swift +++ /dev/null @@ -1,110 +0,0 @@ -// -// PromiseViewController.swift -// KkuMulKum -// -// Created by YOUJIM on 7/9/24. -// - -import UIKit - -class BasePromiseViewController: BaseViewController { - private let promiseViewModel = BasePromiseViewModel() - - private let promiseViewControllerList: [BaseViewController] = [ - PromiseInfoViewController(), - ReadyStatusViewController(), - TardyViewController() - ] - - private lazy var promiseSegmentedControl = BasePromiseSegmentedControl( - items: ["약속 정보", "준비 현황", "지각 꾸물이"] - ) - - private let promisePageViewController = UIPageViewController( - transitionStyle: .scroll, - navigationOrientation: .vertical - ) - - override func viewDidLoad() { - super.viewDidLoad() - - setupNavigationBarTitle(with: "기말고사 모각작") - } - - override func setupView() { - view.backgroundColor = .white - - addChild(promisePageViewController) - view.addSubviews( - promiseSegmentedControl, - promisePageViewController.view - ) - - promisePageViewController.setViewControllers( - [promiseViewControllerList[0]], - direction: .forward, - animated: true - ) - - promiseSegmentedControl.snp.makeConstraints { - $0.top.equalTo(view.safeAreaLayoutGuide) - $0.leading.trailing.equalToSuperview().inset(-6) - $0.height.equalTo(61) - } - - promisePageViewController.view.snp.makeConstraints { - $0.top.equalTo(promiseSegmentedControl.snp.bottom) - $0.leading.trailing.bottom.equalToSuperview() - } - } - - override func setupAction() { - promiseSegmentedControl.addTarget( - self, - action: #selector(didSegmentedControlIndexUpdated), - for: .valueChanged - ) - } - - override func setupDelegate() { - promisePageViewController.delegate = self - promisePageViewController.dataSource = self - } - - @objc private func didSegmentedControlIndexUpdated() { - let condition = promiseViewModel.currentPage.value <= promiseSegmentedControl.selectedSegmentIndex - let direction: UIPageViewController.NavigationDirection = condition ? .forward : .reverse - let (width, count, selectedIndex) = ( - promiseSegmentedControl.bounds.width, - promiseSegmentedControl.numberOfSegments, - promiseSegmentedControl.selectedSegmentIndex - ) - - promiseSegmentedControl.selectedUnderLineView.snp.updateConstraints { - $0.leading.equalToSuperview().offset((width / CGFloat(count)) * CGFloat(selectedIndex)) - } - - promiseViewModel.didSegmentIndexChanged(index: promiseSegmentedControl.selectedSegmentIndex) - - promisePageViewController.setViewControllers([ - promiseViewControllerList[promiseViewModel.currentPage.value] - ], direction: direction, animated: false) - } -} - - -extension BasePromiseViewController: UIPageViewControllerDelegate, UIPageViewControllerDataSource { - func pageViewController( - _ pageViewController: UIPageViewController, - viewControllerAfter viewController: UIViewController - ) -> UIViewController? { - return nil - } - - func pageViewController( - _ pageViewController: UIPageViewController, - viewControllerBefore viewController: UIViewController - ) -> UIViewController? { - return nil - } -} diff --git a/KkuMulKum/Source/Promise/BasePromise/ViewModel/BasePromiseViewModel.swift b/KkuMulKum/Source/Promise/BasePromise/ViewModel/BasePromiseViewModel.swift deleted file mode 100644 index 7d59578b..00000000 --- a/KkuMulKum/Source/Promise/BasePromise/ViewModel/BasePromiseViewModel.swift +++ /dev/null @@ -1,17 +0,0 @@ -// -// PromiseViewModel.swift -// KkuMulKum -// -// Created by YOUJIM on 7/9/24. -// - -import Foundation - - -class BasePromiseViewModel { - var currentPage = ObservablePattern(0) - - func didSegmentIndexChanged(index: Int) { - currentPage.value = index - } -} diff --git a/KkuMulKum/Source/Promise/PromiseInfo/View/PromiseInfoView.swift b/KkuMulKum/Source/Promise/PromiseInfo/View/PromiseInfoView.swift index 9fce12d2..ff067ceb 100644 --- a/KkuMulKum/Source/Promise/PromiseInfo/View/PromiseInfoView.swift +++ b/KkuMulKum/Source/Promise/PromiseInfo/View/PromiseInfoView.swift @@ -128,7 +128,7 @@ class PromiseInfoView: BaseView { $0.centerY.equalTo(participantNumberLabel) $0.trailing.equalToSuperview().inset(20) $0.height.equalTo(Screen.height(24)) - $0.width.equalTo(Screen.width(70)) + $0.width.equalTo(chevronButton.snp.height) } participantCollectionView.snp.makeConstraints { diff --git a/KkuMulKum/Source/Promise/ReadyStatus/View/EnterReadyInfoButtonView.swift b/KkuMulKum/Source/Promise/ReadyStatus/View/EnterReadyInfoButtonView.swift deleted file mode 100644 index 46c21e86..00000000 --- a/KkuMulKum/Source/Promise/ReadyStatus/View/EnterReadyInfoButtonView.swift +++ /dev/null @@ -1,49 +0,0 @@ -// -// EnterReadyInfoButtonView.swift -// KkuMulKum -// -// Created by YOUJIM on 7/10/24. -// - -import UIKit - -class EnterReadyInfoButtonView: BaseView { - private let descriptionLabel: UILabel = UILabel().then { - $0.setText("준비 정보 입력하기", style: .body03) - } - - private let chevronButton: UIButton = UIButton().then { - $0.setImage(.iconRight, for: .normal) - $0.contentMode = .scaleAspectFill - } - - override func setupView() { - backgroundColor = .white - addSubviews(descriptionLabel, chevronButton) - } - - override func setupAutoLayout() { - descriptionLabel.snp.makeConstraints { - $0.centerY.equalToSuperview() - $0.leading.equalToSuperview().offset(20) - } - - chevronButton.snp.makeConstraints { - $0.trailing.equalToSuperview().inset(17) - $0.centerY.equalToSuperview() - } - } - - - // TODO: 빼야됨 - - private func setupAction() { - let tapGesture = UITapGestureRecognizer(target: self, action: #selector(didTapped)) - - self.addGestureRecognizer(tapGesture) - } - - @objc private func didTapped() { - - } -} diff --git a/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyPlanInfoView.swift b/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyPlanInfoView.swift deleted file mode 100644 index 16a40326..00000000 --- a/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyPlanInfoView.swift +++ /dev/null @@ -1,65 +0,0 @@ -// -// ReadyPlanInfoView.swift -// KkuMulKum -// -// Created by YOUJIM on 7/10/24. -// - -import UIKit - -class ReadyPlanInfoView: BaseView { - private let readyTimeLabel: UILabel = UILabel().then { - $0.setText("12시 30분에 준비하고,\n1시에 이동을 시작해야 해요", style: .body03) - $0.setHighlightText("12시 30분", "1시", style: .body03, color: .maincolor) - } - - private let requestReadyTimeLabel: UILabel = UILabel().then { - $0.setText("준비 소요 시간: 30분", style: .label02, color: .gray8) - } - - private let requestMoveTimeLabel: UILabel = UILabel().then { - $0.setText("이동 소요 시간: 1시간 30분", style: .label02, color: .gray8) - } - - private let editButton: UIButton = UIButton().then { - $0.setTitle("수정", for: .normal) - $0.setTitleColor(.gray6, for: .normal) - $0.titleLabel?.font = .pretendard(.caption01) - $0.backgroundColor = .gray0 - $0.layer.cornerRadius = 50 - $0.clipsToBounds = true - } - - override func setupView() { - addSubviews( - readyTimeLabel, - requestReadyTimeLabel, - requestMoveTimeLabel, - editButton - ) - } - - override func setupAutoLayout() { - readyTimeLabel.snp.makeConstraints { - $0.top.equalToSuperview().offset(16) - $0.leading.equalToSuperview().offset(20) - } - - requestReadyTimeLabel.snp.makeConstraints { - $0.top.equalTo(readyTimeLabel.snp.bottom).offset(12) - $0.leading.equalToSuperview().offset(20) - } - - requestMoveTimeLabel.snp.makeConstraints { - $0.top.equalTo(requestReadyTimeLabel.snp.bottom).offset(8) - $0.leading.equalToSuperview().offset(20) - $0.bottom.equalToSuperview().inset(18) - } - - editButton.snp.makeConstraints { - $0.trailing.equalToSuperview().inset(22) - $0.bottom.equalToSuperview().inset(18) - $0.height.equalTo(Screen.height(28)) - } - } -} diff --git a/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusView.swift b/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusView.swift deleted file mode 100644 index 039ecd2c..00000000 --- a/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusView.swift +++ /dev/null @@ -1,61 +0,0 @@ -// -// ReadyStatusView.swift -// KkuMulKum -// -// Created by YOUJIM on 7/10/24. -// - -import UIKit - -class ReadyStatusView: BaseView { - private let baseStackView: UIStackView = UIStackView(axis: .vertical).then { - $0.spacing = 24 - } - - private let enterReadyButtonView: EnterReadyInfoButtonView = EnterReadyInfoButtonView() - - private let readyPlanInfoView: ReadyPlanInfoView = ReadyPlanInfoView() - - private let myReadyStatusTitleLabel: UILabel = UILabel().then { - $0.setText("나의 준비 현황", style: .body01, color: .gray8) - } - - private let myReadyStatusProgressView: ReadyStatusProgressView = ReadyStatusProgressView() - - private let popUpImageView: UIImageView = UIImageView(image: .imgTextPopup).then { - $0.contentMode = .scaleAspectFit - } - - private let ourReadyStatusLabel: UILabel = UILabel().then { - $0.setText( - "우리들의 준비 현황", - style: .body01, - color: .gray8 - ) - } - - private let ourReadyStatusTableView: UITableView = UITableView().then { - $0.register(OurReadyStatusTableViewCell.self, forCellReuseIdentifier: OurReadyStatusTableViewCell.reuseIdentifier) - } - - override func setupView() { - baseStackView.addArrangedSubviews( - enterReadyButtonView, - readyPlanInfoView, - myReadyStatusTitleLabel, - myReadyStatusProgressView, - popUpImageView, - ourReadyStatusLabel - ) - - addSubview(baseStackView) - } - - override func setupAutoLayout() { - baseStackView.snp.makeConstraints { - $0.top.equalToSuperview().offset(24) - $0.horizontalEdges.equalToSuperview().inset(20) - $0.bottom.equalToSuperview() - } - } -} diff --git a/KkuMulKum/Source/Promise/ReadyStatus/ViewController/ReadyStatusViewController.swift b/KkuMulKum/Source/Promise/ReadyStatus/ViewController/ReadyStatusViewController.swift deleted file mode 100644 index 90857442..00000000 --- a/KkuMulKum/Source/Promise/ReadyStatus/ViewController/ReadyStatusViewController.swift +++ /dev/null @@ -1,16 +0,0 @@ -// -// ReadyStatusViewController.swift -// KkuMulKum -// -// Created by YOUJIM on 7/9/24. -// - -import UIKit - -class ReadyStatusViewController: BaseViewController { - private let rootView: ReadyStatusView = ReadyStatusView() - - override func loadView() { - view = rootView - } -} diff --git a/KkuMulKum/Source/Promise/Tardy/ViewController/TardyViewController.swift b/KkuMulKum/Source/Promise/Tardy/ViewController/TardyViewController.swift index dfeb5c40..2a6571e0 100644 --- a/KkuMulKum/Source/Promise/Tardy/ViewController/TardyViewController.swift +++ b/KkuMulKum/Source/Promise/Tardy/ViewController/TardyViewController.swift @@ -8,9 +8,73 @@ import UIKit class TardyViewController: BaseViewController { - override func viewDidLoad() { - super.viewDidLoad() + private let tardyViewModel: TardyViewModel + private let tardyView: TardyView = TardyView() + private let arriveView: ArriveView = ArriveView() + + init(tardyViewModel: TardyViewModel) { + self.tardyViewModel = tardyViewModel + + super.init(nibName: nil, bundle: nil) + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + override func loadView() { + view = tardyViewModel.hasTardy.value ? tardyView : arriveView + } + + override func setupAction() { + tardyView.finishMeetingButton.addTarget( + self, + action: #selector(finishMeetingButtonDidTapped), + for: .touchUpInside + ) + } + + override func setupDelegate() { + tardyView.tardyCollectionView.delegate = self + tardyView.tardyCollectionView.dataSource = self + } +} + - view.backgroundColor = .green +private extension TardyViewController { + @objc + func finishMeetingButtonDidTapped() { + + } +} + + +// MARK: UICollectionViewDelegate + +extension TardyViewController: UICollectionViewDelegate { + +} + + +// MARK: UICollectionViewDataSource + +extension TardyViewController: UICollectionViewDataSource { + func collectionView( + _ collectionView: UICollectionView, + numberOfItemsInSection section: Int + ) -> Int { + return 10 + } + + func collectionView( + _ collectionView: UICollectionView, + cellForItemAt indexPath: IndexPath + ) -> UICollectionViewCell { + guard let cell = collectionView.dequeueReusableCell( + withReuseIdentifier: TardyCollectionViewCell.reuseIdentifier, + for: indexPath + ) as? TardyCollectionViewCell else { return UICollectionViewCell() } + + return cell } } From ce7ef60212b6ea66ed4a89e1a47694f91b64b6f6 Mon Sep 17 00:00:00 2001 From: youz2me Date: Mon, 15 Jul 2024 06:59:25 +0900 Subject: [PATCH 10/22] =?UTF-8?q?fix/#176=20=EC=B6=A9=EB=8F=8C=20=ED=95=B4?= =?UTF-8?q?=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- KkuMulKum.xcodeproj/project.pbxproj | 66 +++++++++++-------- .../Cell/OurReadyStatusTableViewCell.swift | 0 .../View/EnterReadyInfoButtonView.swift | 49 ++++++++++++++ .../ReadyStatus/View/ReadyPlanInfoView.swift | 65 ++++++++++++++++++ .../ReadyStatus/View/ReadyStatusButton.swift | 0 .../View/ReadyStatusProgressView.swift | 0 .../ReadyStatus/View/ReadyStatusView.swift | 61 +++++++++++++++++ .../ReadyStatusViewController.swift | 16 +++++ 8 files changed, 228 insertions(+), 29 deletions(-) rename KkuMulKum/Source/{Promise => }/ReadyStatus/Cell/OurReadyStatusTableViewCell.swift (100%) create mode 100644 KkuMulKum/Source/ReadyStatus/View/EnterReadyInfoButtonView.swift create mode 100644 KkuMulKum/Source/ReadyStatus/View/ReadyPlanInfoView.swift rename KkuMulKum/Source/{Promise => }/ReadyStatus/View/ReadyStatusButton.swift (100%) rename KkuMulKum/Source/{Promise => }/ReadyStatus/View/ReadyStatusProgressView.swift (100%) create mode 100644 KkuMulKum/Source/ReadyStatus/View/ReadyStatusView.swift create mode 100644 KkuMulKum/Source/ReadyStatus/ViewController/ReadyStatusViewController.swift diff --git a/KkuMulKum.xcodeproj/project.pbxproj b/KkuMulKum.xcodeproj/project.pbxproj index 6a530459..eacbfad9 100644 --- a/KkuMulKum.xcodeproj/project.pbxproj +++ b/KkuMulKum.xcodeproj/project.pbxproj @@ -111,7 +111,13 @@ DD4909962C440CDC003ED304 /* ArriveView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD4909952C440CDC003ED304 /* ArriveView.swift */; }; DD4909982C441215003ED304 /* TardyViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD4909972C441215003ED304 /* TardyViewModel.swift */; }; DD49099C2C441719003ED304 /* TardyService.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD49099B2C441719003ED304 /* TardyService.swift */; }; - DD931B6B2C3D9EBB00526452 /* ReadyStatusView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD931B6A2C3D9EBB00526452 /* ReadyStatusView.swift */; }; + DD86263D2C4481A700E4F980 /* OurReadyStatusTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD8626342C4481A700E4F980 /* OurReadyStatusTableViewCell.swift */; }; + DD86263E2C4481A700E4F980 /* EnterReadyInfoButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD8626362C4481A700E4F980 /* EnterReadyInfoButtonView.swift */; }; + DD86263F2C4481A700E4F980 /* ReadyPlanInfoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD8626372C4481A700E4F980 /* ReadyPlanInfoView.swift */; }; + DD8626402C4481A700E4F980 /* ReadyStatusView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD8626382C4481A700E4F980 /* ReadyStatusView.swift */; }; + DD8626412C4481A700E4F980 /* ReadyStatusButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD8626392C4481A700E4F980 /* ReadyStatusButton.swift */; }; + DD8626422C4481A700E4F980 /* ReadyStatusProgressView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD86263A2C4481A700E4F980 /* ReadyStatusProgressView.swift */; }; + DD8626432C4481A700E4F980 /* ReadyStatusViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD86263C2C4481A700E4F980 /* ReadyStatusViewController.swift */; }; DD931B6E2C3DA27F00526452 /* ParticipantCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD931B6D2C3DA27F00526452 /* ParticipantCollectionViewCell.swift */; }; DD931B762C3DC16100526452 /* PromiseInfoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD931B752C3DC16100526452 /* PromiseInfoView.swift */; }; DDA2EE732C385EB9007C6059 /* MainTabBarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDA2EE722C385EB9007C6059 /* MainTabBarController.swift */; }; @@ -119,7 +125,6 @@ DDAF1C7E2C3D5B86008A37D3 /* RxRelay in Frameworks */ = {isa = PBXBuildFile; productRef = DDAF1C7D2C3D5B86008A37D3 /* RxRelay */; }; DDAF1C812C3D5BD5008A37D3 /* Kingfisher in Frameworks */ = {isa = PBXBuildFile; productRef = DDAF1C802C3D5BD5008A37D3 /* Kingfisher */; }; DDAF1C842C3D5D19008A37D3 /* ViewModelType.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDAF1C832C3D5D19008A37D3 /* ViewModelType.swift */; }; - DDAF1C8E2C3D6E3D008A37D3 /* ReadyStatusViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDAF1C882C3D6E3D008A37D3 /* ReadyStatusViewController.swift */; }; DDAF1C8F2C3D6E3D008A37D3 /* PagePromiseSegmentedControl.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDAF1C892C3D6E3D008A37D3 /* PagePromiseSegmentedControl.swift */; }; DDAF1C902C3D6E3D008A37D3 /* PagePromiseViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDAF1C8A2C3D6E3D008A37D3 /* PagePromiseViewModel.swift */; }; DDAF1C912C3D6E3D008A37D3 /* TardyViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDAF1C8B2C3D6E3D008A37D3 /* TardyViewController.swift */; }; @@ -250,12 +255,17 @@ DD4909952C440CDC003ED304 /* ArriveView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArriveView.swift; sourceTree = ""; }; DD4909972C441215003ED304 /* TardyViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TardyViewModel.swift; sourceTree = ""; }; DD49099B2C441719003ED304 /* TardyService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TardyService.swift; sourceTree = ""; }; - DD931B6A2C3D9EBB00526452 /* ReadyStatusView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadyStatusView.swift; sourceTree = ""; }; + DD8626342C4481A700E4F980 /* OurReadyStatusTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OurReadyStatusTableViewCell.swift; sourceTree = ""; }; + DD8626362C4481A700E4F980 /* EnterReadyInfoButtonView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EnterReadyInfoButtonView.swift; sourceTree = ""; }; + DD8626372C4481A700E4F980 /* ReadyPlanInfoView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReadyPlanInfoView.swift; sourceTree = ""; }; + DD8626382C4481A700E4F980 /* ReadyStatusView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReadyStatusView.swift; sourceTree = ""; }; + DD8626392C4481A700E4F980 /* ReadyStatusButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReadyStatusButton.swift; sourceTree = ""; }; + DD86263A2C4481A700E4F980 /* ReadyStatusProgressView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReadyStatusProgressView.swift; sourceTree = ""; }; + DD86263C2C4481A700E4F980 /* ReadyStatusViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReadyStatusViewController.swift; sourceTree = ""; }; DD931B6D2C3DA27F00526452 /* ParticipantCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ParticipantCollectionViewCell.swift; sourceTree = ""; }; DD931B752C3DC16100526452 /* PromiseInfoView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PromiseInfoView.swift; sourceTree = ""; }; DDA2EE722C385EB9007C6059 /* MainTabBarController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainTabBarController.swift; sourceTree = ""; }; DDAF1C832C3D5D19008A37D3 /* ViewModelType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewModelType.swift; sourceTree = ""; }; - DDAF1C882C3D6E3D008A37D3 /* ReadyStatusViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReadyStatusViewController.swift; sourceTree = ""; }; DDAF1C892C3D6E3D008A37D3 /* PagePromiseSegmentedControl.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PagePromiseSegmentedControl.swift; sourceTree = ""; }; DDAF1C8A2C3D6E3D008A37D3 /* PagePromiseViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PagePromiseViewModel.swift; sourceTree = ""; }; DDAF1C8B2C3D6E3D008A37D3 /* TardyViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TardyViewController.swift; sourceTree = ""; }; @@ -884,41 +894,40 @@ path = Service; sourceTree = ""; }; - DD8626202C44811100E4F980 /* ReadyStatus */ = { + DD8626322C4481A700E4F980 /* ReadyStatus */ = { isa = PBXGroup; children = ( - DD8626212C44811100E4F980 /* Cell */, - DD8626232C44811100E4F980 /* View */, - DD8626292C44811100E4F980 /* ViewController */, + DD8626332C4481A700E4F980 /* Cell */, + DD8626352C4481A700E4F980 /* View */, + DD86263B2C4481A700E4F980 /* ViewController */, ); - name = ReadyStatus; - path = ../../../../../Desktop/ReadyStatus; + path = ReadyStatus; sourceTree = ""; }; - DD8626212C44811100E4F980 /* Cell */ = { + DD8626332C4481A700E4F980 /* Cell */ = { isa = PBXGroup; children = ( - DD8626222C44811100E4F980 /* OurReadyStatusTableViewCell.swift */, + DD8626342C4481A700E4F980 /* OurReadyStatusTableViewCell.swift */, ); path = Cell; sourceTree = ""; }; - DD8626232C44811100E4F980 /* View */ = { + DD8626352C4481A700E4F980 /* View */ = { isa = PBXGroup; children = ( - DD8626242C44811100E4F980 /* EnterReadyInfoButtonView.swift */, - DD8626252C44811100E4F980 /* ReadyPlanInfoView.swift */, - DD8626262C44811100E4F980 /* ReadyStatusView.swift */, - DD8626272C44811100E4F980 /* ReadyStatusButton.swift */, - DD8626282C44811100E4F980 /* ReadyStatusProgressView.swift */, + DD8626362C4481A700E4F980 /* EnterReadyInfoButtonView.swift */, + DD8626372C4481A700E4F980 /* ReadyPlanInfoView.swift */, + DD8626382C4481A700E4F980 /* ReadyStatusView.swift */, + DD8626392C4481A700E4F980 /* ReadyStatusButton.swift */, + DD86263A2C4481A700E4F980 /* ReadyStatusProgressView.swift */, ); path = View; sourceTree = ""; }; - DD8626292C44811100E4F980 /* ViewController */ = { + DD86263B2C4481A700E4F980 /* ViewController */ = { isa = PBXGroup; children = ( - DD86262A2C44811100E4F980 /* ReadyStatusViewController.swift */, + DD86263C2C4481A700E4F980 /* ReadyStatusViewController.swift */, ); path = ViewController; sourceTree = ""; @@ -977,7 +986,6 @@ children = ( DD39768D2C41CA0700E2A4C4 /* PagePromise */, DD3976912C41CAF900E2A4C4 /* PromiseInfo */, - DD8626202C44811100E4F980 /* ReadyStatus */, DD931B682C3D9DAD00526452 /* Tardy */, ); path = Promise; @@ -1029,6 +1037,7 @@ DD43936B2C412F4500EC1799 /* MeetingCreate */, A3DD9C3C2C41BAD000E58A13 /* MeetingList */, DE6D4D0E2C3F14D80005584B /* MeetingInfo */, + DD8626322C4481A700E4F980 /* ReadyStatus */, DDAF1C872C3D6E3D008A37D3 /* Promise */, DE159D312C406E1600425101 /* MyPage */, ); @@ -1425,15 +1434,14 @@ DD3976892C41C2AD00E2A4C4 /* TodayEmptyView.swift in Sources */, DD43937C2C412F4500EC1799 /* InviteCodeViewController.swift in Sources */, DD4393782C412F4500EC1799 /* CheckInviteCodeView.swift in Sources */, - DD8626302C44811100E4F980 /* ReadyStatusProgressView.swift in Sources */, + DD8626422C4481A700E4F980 /* ReadyStatusProgressView.swift in Sources */, DE6D4D102C3F14D80005584B /* InvitationCodePopUpView.swift in Sources */, - DD8626312C44811100E4F980 /* ReadyStatusViewController.swift in Sources */, + DD8626432C4481A700E4F980 /* ReadyStatusViewController.swift in Sources */, DD30721A2C3C011600416D9F /* AddPromiseRequestModel.swift in Sources */, DE159D332C406E1600425101 /* MyPageContentView.swift in Sources */, DE6D4D112C3F14D80005584B /* MeetingInfoBannerView.swift in Sources */, DE6D4D122C3F14D80005584B /* MeetingInfoView.swift in Sources */, DD30721E2C3C0CC800416D9F /* PromiseInfoResponseModel.swift in Sources */, - DD931B722C3DA92700526452 /* EnterReadyInfoButtonView.swift in Sources */, DD41BEFF2C41DAA40095A068 /* TardyEmptyView.swift in Sources */, A3FB18512C3BF531001483E5 /* RegisterMeetingsResponseModel.swift in Sources */, 789AD4B32C3C0093002E2688 /* SocialLoginResponseModel.swift in Sources */, @@ -1491,7 +1499,7 @@ DD3072162C3BFE4E00416D9F /* UpcomingPromiseListResponseModel.swift in Sources */, A3FB18572C3BF704001483E5 /* MeetingListResponseModel.swift in Sources */, DE254AB22C31197B00A4015E /* UIButton+.swift in Sources */, - DD86262D2C44811100E4F980 /* ReadyPlanInfoView.swift in Sources */, + DD86263F2C4481A700E4F980 /* ReadyPlanInfoView.swift in Sources */, DE6D4D162C3F14D80005584B /* MeetingInfoViewController.swift in Sources */, DE159D322C406E1600425101 /* MyPageAlarmSettingView.swift in Sources */, 78B9286C2C29402C006D9942 /* AppDelegate.swift in Sources */, @@ -1513,11 +1521,11 @@ 782B40722C3DBFA3008B0CA7 /* ProfileViewModel.swift in Sources */, DDAF1C8F2C3D6E3D008A37D3 /* PagePromiseSegmentedControl.swift in Sources */, DE32D1D22C3BF703006848DF /* LoginUserResponseModel.swift in Sources */, - DD86262C2C44811100E4F980 /* EnterReadyInfoButtonView.swift in Sources */, + DD86263E2C4481A700E4F980 /* EnterReadyInfoButtonView.swift in Sources */, DE9E18892C3BC91000DB76B4 /* ResponseBodyDTO.swift in Sources */, DD3976682C41769400E2A4C4 /* CreateMeetingViewModel.swift in Sources */, A3DD9C3D2C41BAD000E58A13 /* MeetingTableViewCell.swift in Sources */, - DD86262F2C44811100E4F980 /* ReadyStatusButton.swift in Sources */, + DD8626412C4481A700E4F980 /* ReadyStatusButton.swift in Sources */, DD39766B2C41995A00E2A4C4 /* FinishCreateNavigationView.swift in Sources */, DD3072202C3C0D4500416D9F /* MyReadyStatusResponseModel.swift in Sources */, DD3072282C3C104D00416D9F /* ArrivalCompletionResponseModel.swift in Sources */, @@ -1528,7 +1536,7 @@ DD3976872C41C2AD00E2A4C4 /* TodayPromiseView.swift in Sources */, 789873332C3D1A7B00435E96 /* LoginViewModel.swift in Sources */, 782B40752C3DBFBA008B0CA7 /* ProfileView.swift in Sources */, - DD86262E2C44811100E4F980 /* ReadyStatusView.swift in Sources */, + DD8626402C4481A700E4F980 /* ReadyStatusView.swift in Sources */, DED5DBEE2C34529A006ECE7E /* BaseView.swift in Sources */, A3DD9C402C41BAD000E58A13 /* MeetingListViewController.swift in Sources */, A3DD9C3F2C41BAD000E58A13 /* MeetingListView.swift in Sources */, @@ -1540,7 +1548,7 @@ DE8247FD2C36E7C7000601BC /* MoyaLoggingPlugin.swift in Sources */, DDAF1C842C3D5D19008A37D3 /* ViewModelType.swift in Sources */, DD3072262C3C0F0B00416D9F /* TardyInfoModel.swift in Sources */, - DD86262B2C44811100E4F980 /* OurReadyStatusTableViewCell.swift in Sources */, + DD86263D2C4481A700E4F980 /* OurReadyStatusTableViewCell.swift in Sources */, DE254AB92C311AB300A4015E /* Screen.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/KkuMulKum/Source/Promise/ReadyStatus/Cell/OurReadyStatusTableViewCell.swift b/KkuMulKum/Source/ReadyStatus/Cell/OurReadyStatusTableViewCell.swift similarity index 100% rename from KkuMulKum/Source/Promise/ReadyStatus/Cell/OurReadyStatusTableViewCell.swift rename to KkuMulKum/Source/ReadyStatus/Cell/OurReadyStatusTableViewCell.swift diff --git a/KkuMulKum/Source/ReadyStatus/View/EnterReadyInfoButtonView.swift b/KkuMulKum/Source/ReadyStatus/View/EnterReadyInfoButtonView.swift new file mode 100644 index 00000000..46c21e86 --- /dev/null +++ b/KkuMulKum/Source/ReadyStatus/View/EnterReadyInfoButtonView.swift @@ -0,0 +1,49 @@ +// +// EnterReadyInfoButtonView.swift +// KkuMulKum +// +// Created by YOUJIM on 7/10/24. +// + +import UIKit + +class EnterReadyInfoButtonView: BaseView { + private let descriptionLabel: UILabel = UILabel().then { + $0.setText("준비 정보 입력하기", style: .body03) + } + + private let chevronButton: UIButton = UIButton().then { + $0.setImage(.iconRight, for: .normal) + $0.contentMode = .scaleAspectFill + } + + override func setupView() { + backgroundColor = .white + addSubviews(descriptionLabel, chevronButton) + } + + override func setupAutoLayout() { + descriptionLabel.snp.makeConstraints { + $0.centerY.equalToSuperview() + $0.leading.equalToSuperview().offset(20) + } + + chevronButton.snp.makeConstraints { + $0.trailing.equalToSuperview().inset(17) + $0.centerY.equalToSuperview() + } + } + + + // TODO: 빼야됨 + + private func setupAction() { + let tapGesture = UITapGestureRecognizer(target: self, action: #selector(didTapped)) + + self.addGestureRecognizer(tapGesture) + } + + @objc private func didTapped() { + + } +} diff --git a/KkuMulKum/Source/ReadyStatus/View/ReadyPlanInfoView.swift b/KkuMulKum/Source/ReadyStatus/View/ReadyPlanInfoView.swift new file mode 100644 index 00000000..16a40326 --- /dev/null +++ b/KkuMulKum/Source/ReadyStatus/View/ReadyPlanInfoView.swift @@ -0,0 +1,65 @@ +// +// ReadyPlanInfoView.swift +// KkuMulKum +// +// Created by YOUJIM on 7/10/24. +// + +import UIKit + +class ReadyPlanInfoView: BaseView { + private let readyTimeLabel: UILabel = UILabel().then { + $0.setText("12시 30분에 준비하고,\n1시에 이동을 시작해야 해요", style: .body03) + $0.setHighlightText("12시 30분", "1시", style: .body03, color: .maincolor) + } + + private let requestReadyTimeLabel: UILabel = UILabel().then { + $0.setText("준비 소요 시간: 30분", style: .label02, color: .gray8) + } + + private let requestMoveTimeLabel: UILabel = UILabel().then { + $0.setText("이동 소요 시간: 1시간 30분", style: .label02, color: .gray8) + } + + private let editButton: UIButton = UIButton().then { + $0.setTitle("수정", for: .normal) + $0.setTitleColor(.gray6, for: .normal) + $0.titleLabel?.font = .pretendard(.caption01) + $0.backgroundColor = .gray0 + $0.layer.cornerRadius = 50 + $0.clipsToBounds = true + } + + override func setupView() { + addSubviews( + readyTimeLabel, + requestReadyTimeLabel, + requestMoveTimeLabel, + editButton + ) + } + + override func setupAutoLayout() { + readyTimeLabel.snp.makeConstraints { + $0.top.equalToSuperview().offset(16) + $0.leading.equalToSuperview().offset(20) + } + + requestReadyTimeLabel.snp.makeConstraints { + $0.top.equalTo(readyTimeLabel.snp.bottom).offset(12) + $0.leading.equalToSuperview().offset(20) + } + + requestMoveTimeLabel.snp.makeConstraints { + $0.top.equalTo(requestReadyTimeLabel.snp.bottom).offset(8) + $0.leading.equalToSuperview().offset(20) + $0.bottom.equalToSuperview().inset(18) + } + + editButton.snp.makeConstraints { + $0.trailing.equalToSuperview().inset(22) + $0.bottom.equalToSuperview().inset(18) + $0.height.equalTo(Screen.height(28)) + } + } +} diff --git a/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusButton.swift b/KkuMulKum/Source/ReadyStatus/View/ReadyStatusButton.swift similarity index 100% rename from KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusButton.swift rename to KkuMulKum/Source/ReadyStatus/View/ReadyStatusButton.swift diff --git a/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusProgressView.swift b/KkuMulKum/Source/ReadyStatus/View/ReadyStatusProgressView.swift similarity index 100% rename from KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusProgressView.swift rename to KkuMulKum/Source/ReadyStatus/View/ReadyStatusProgressView.swift diff --git a/KkuMulKum/Source/ReadyStatus/View/ReadyStatusView.swift b/KkuMulKum/Source/ReadyStatus/View/ReadyStatusView.swift new file mode 100644 index 00000000..039ecd2c --- /dev/null +++ b/KkuMulKum/Source/ReadyStatus/View/ReadyStatusView.swift @@ -0,0 +1,61 @@ +// +// ReadyStatusView.swift +// KkuMulKum +// +// Created by YOUJIM on 7/10/24. +// + +import UIKit + +class ReadyStatusView: BaseView { + private let baseStackView: UIStackView = UIStackView(axis: .vertical).then { + $0.spacing = 24 + } + + private let enterReadyButtonView: EnterReadyInfoButtonView = EnterReadyInfoButtonView() + + private let readyPlanInfoView: ReadyPlanInfoView = ReadyPlanInfoView() + + private let myReadyStatusTitleLabel: UILabel = UILabel().then { + $0.setText("나의 준비 현황", style: .body01, color: .gray8) + } + + private let myReadyStatusProgressView: ReadyStatusProgressView = ReadyStatusProgressView() + + private let popUpImageView: UIImageView = UIImageView(image: .imgTextPopup).then { + $0.contentMode = .scaleAspectFit + } + + private let ourReadyStatusLabel: UILabel = UILabel().then { + $0.setText( + "우리들의 준비 현황", + style: .body01, + color: .gray8 + ) + } + + private let ourReadyStatusTableView: UITableView = UITableView().then { + $0.register(OurReadyStatusTableViewCell.self, forCellReuseIdentifier: OurReadyStatusTableViewCell.reuseIdentifier) + } + + override func setupView() { + baseStackView.addArrangedSubviews( + enterReadyButtonView, + readyPlanInfoView, + myReadyStatusTitleLabel, + myReadyStatusProgressView, + popUpImageView, + ourReadyStatusLabel + ) + + addSubview(baseStackView) + } + + override func setupAutoLayout() { + baseStackView.snp.makeConstraints { + $0.top.equalToSuperview().offset(24) + $0.horizontalEdges.equalToSuperview().inset(20) + $0.bottom.equalToSuperview() + } + } +} diff --git a/KkuMulKum/Source/ReadyStatus/ViewController/ReadyStatusViewController.swift b/KkuMulKum/Source/ReadyStatus/ViewController/ReadyStatusViewController.swift new file mode 100644 index 00000000..90857442 --- /dev/null +++ b/KkuMulKum/Source/ReadyStatus/ViewController/ReadyStatusViewController.swift @@ -0,0 +1,16 @@ +// +// ReadyStatusViewController.swift +// KkuMulKum +// +// Created by YOUJIM on 7/9/24. +// + +import UIKit + +class ReadyStatusViewController: BaseViewController { + private let rootView: ReadyStatusView = ReadyStatusView() + + override func loadView() { + view = rootView + } +} From a66e0bd0605f92642f005118c7817f183c6007d6 Mon Sep 17 00:00:00 2001 From: youz2me Date: Mon, 15 Jul 2024 08:26:19 +0900 Subject: [PATCH 11/22] =?UTF-8?q?feat/#176=20=EC=A4=80=EB=B9=84=20?= =?UTF-8?q?=ED=98=84=ED=99=A9=20=EB=B7=B0=20=EA=B5=AC=ED=98=84=20=EC=99=84?= =?UTF-8?q?=EB=A3=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- KkuMulKum.xcodeproj/project.pbxproj | 22 +--- .../View/EnterReadyInfoButtonView.swift | 5 +- .../View/OurReadyStatusView.swift} | 17 ++- .../ReadyStatus/View/ReadyPlanInfoView.swift | 2 + .../ReadyStatus/View/ReadyStatusButton.swift | 0 .../View/ReadyStatusProgressView.swift | 35 +++-- .../ReadyStatus/View/ReadyStatusView.swift | 120 ++++++++++++++++++ .../ReadyStatusViewController.swift | 54 ++++++++ .../ReadyStatus/View/ReadyStatusView.swift | 61 --------- .../ReadyStatusViewController.swift | 16 --- 10 files changed, 223 insertions(+), 109 deletions(-) rename KkuMulKum/Source/{ => Promise}/ReadyStatus/View/EnterReadyInfoButtonView.swift (88%) rename KkuMulKum/Source/{ReadyStatus/Cell/OurReadyStatusTableViewCell.swift => Promise/ReadyStatus/View/OurReadyStatusView.swift} (76%) rename KkuMulKum/Source/{ => Promise}/ReadyStatus/View/ReadyPlanInfoView.swift (98%) rename KkuMulKum/Source/{ => Promise}/ReadyStatus/View/ReadyStatusButton.swift (100%) rename KkuMulKum/Source/{ => Promise}/ReadyStatus/View/ReadyStatusProgressView.swift (89%) create mode 100644 KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusView.swift create mode 100644 KkuMulKum/Source/Promise/ReadyStatus/ViewController/ReadyStatusViewController.swift delete mode 100644 KkuMulKum/Source/ReadyStatus/View/ReadyStatusView.swift delete mode 100644 KkuMulKum/Source/ReadyStatus/ViewController/ReadyStatusViewController.swift diff --git a/KkuMulKum.xcodeproj/project.pbxproj b/KkuMulKum.xcodeproj/project.pbxproj index eacbfad9..71fc7392 100644 --- a/KkuMulKum.xcodeproj/project.pbxproj +++ b/KkuMulKum.xcodeproj/project.pbxproj @@ -111,13 +111,13 @@ DD4909962C440CDC003ED304 /* ArriveView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD4909952C440CDC003ED304 /* ArriveView.swift */; }; DD4909982C441215003ED304 /* TardyViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD4909972C441215003ED304 /* TardyViewModel.swift */; }; DD49099C2C441719003ED304 /* TardyService.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD49099B2C441719003ED304 /* TardyService.swift */; }; - DD86263D2C4481A700E4F980 /* OurReadyStatusTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD8626342C4481A700E4F980 /* OurReadyStatusTableViewCell.swift */; }; DD86263E2C4481A700E4F980 /* EnterReadyInfoButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD8626362C4481A700E4F980 /* EnterReadyInfoButtonView.swift */; }; DD86263F2C4481A700E4F980 /* ReadyPlanInfoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD8626372C4481A700E4F980 /* ReadyPlanInfoView.swift */; }; DD8626402C4481A700E4F980 /* ReadyStatusView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD8626382C4481A700E4F980 /* ReadyStatusView.swift */; }; DD8626412C4481A700E4F980 /* ReadyStatusButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD8626392C4481A700E4F980 /* ReadyStatusButton.swift */; }; DD8626422C4481A700E4F980 /* ReadyStatusProgressView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD86263A2C4481A700E4F980 /* ReadyStatusProgressView.swift */; }; DD8626432C4481A700E4F980 /* ReadyStatusViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD86263C2C4481A700E4F980 /* ReadyStatusViewController.swift */; }; + DD8626452C4492EC00E4F980 /* OurReadyStatusView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD8626442C4492EC00E4F980 /* OurReadyStatusView.swift */; }; DD931B6E2C3DA27F00526452 /* ParticipantCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD931B6D2C3DA27F00526452 /* ParticipantCollectionViewCell.swift */; }; DD931B762C3DC16100526452 /* PromiseInfoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD931B752C3DC16100526452 /* PromiseInfoView.swift */; }; DDA2EE732C385EB9007C6059 /* MainTabBarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDA2EE722C385EB9007C6059 /* MainTabBarController.swift */; }; @@ -255,13 +255,13 @@ DD4909952C440CDC003ED304 /* ArriveView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArriveView.swift; sourceTree = ""; }; DD4909972C441215003ED304 /* TardyViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TardyViewModel.swift; sourceTree = ""; }; DD49099B2C441719003ED304 /* TardyService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TardyService.swift; sourceTree = ""; }; - DD8626342C4481A700E4F980 /* OurReadyStatusTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OurReadyStatusTableViewCell.swift; sourceTree = ""; }; DD8626362C4481A700E4F980 /* EnterReadyInfoButtonView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EnterReadyInfoButtonView.swift; sourceTree = ""; }; DD8626372C4481A700E4F980 /* ReadyPlanInfoView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReadyPlanInfoView.swift; sourceTree = ""; }; DD8626382C4481A700E4F980 /* ReadyStatusView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReadyStatusView.swift; sourceTree = ""; }; DD8626392C4481A700E4F980 /* ReadyStatusButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReadyStatusButton.swift; sourceTree = ""; }; DD86263A2C4481A700E4F980 /* ReadyStatusProgressView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReadyStatusProgressView.swift; sourceTree = ""; }; DD86263C2C4481A700E4F980 /* ReadyStatusViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReadyStatusViewController.swift; sourceTree = ""; }; + DD8626442C4492EC00E4F980 /* OurReadyStatusView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OurReadyStatusView.swift; sourceTree = ""; }; DD931B6D2C3DA27F00526452 /* ParticipantCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ParticipantCollectionViewCell.swift; sourceTree = ""; }; DD931B752C3DC16100526452 /* PromiseInfoView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PromiseInfoView.swift; sourceTree = ""; }; DDA2EE722C385EB9007C6059 /* MainTabBarController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainTabBarController.swift; sourceTree = ""; }; @@ -897,29 +897,21 @@ DD8626322C4481A700E4F980 /* ReadyStatus */ = { isa = PBXGroup; children = ( - DD8626332C4481A700E4F980 /* Cell */, - DD8626352C4481A700E4F980 /* View */, DD86263B2C4481A700E4F980 /* ViewController */, + DD8626352C4481A700E4F980 /* View */, ); path = ReadyStatus; sourceTree = ""; }; - DD8626332C4481A700E4F980 /* Cell */ = { - isa = PBXGroup; - children = ( - DD8626342C4481A700E4F980 /* OurReadyStatusTableViewCell.swift */, - ); - path = Cell; - sourceTree = ""; - }; DD8626352C4481A700E4F980 /* View */ = { isa = PBXGroup; children = ( + DD8626382C4481A700E4F980 /* ReadyStatusView.swift */, DD8626362C4481A700E4F980 /* EnterReadyInfoButtonView.swift */, DD8626372C4481A700E4F980 /* ReadyPlanInfoView.swift */, - DD8626382C4481A700E4F980 /* ReadyStatusView.swift */, DD8626392C4481A700E4F980 /* ReadyStatusButton.swift */, DD86263A2C4481A700E4F980 /* ReadyStatusProgressView.swift */, + DD8626442C4492EC00E4F980 /* OurReadyStatusView.swift */, ); path = View; sourceTree = ""; @@ -985,6 +977,7 @@ isa = PBXGroup; children = ( DD39768D2C41CA0700E2A4C4 /* PagePromise */, + DD8626322C4481A700E4F980 /* ReadyStatus */, DD3976912C41CAF900E2A4C4 /* PromiseInfo */, DD931B682C3D9DAD00526452 /* Tardy */, ); @@ -1037,7 +1030,6 @@ DD43936B2C412F4500EC1799 /* MeetingCreate */, A3DD9C3C2C41BAD000E58A13 /* MeetingList */, DE6D4D0E2C3F14D80005584B /* MeetingInfo */, - DD8626322C4481A700E4F980 /* ReadyStatus */, DDAF1C872C3D6E3D008A37D3 /* Promise */, DE159D312C406E1600425101 /* MyPage */, ); @@ -1478,6 +1470,7 @@ DE254AAA2C31190E00A4015E /* UIStackView+.swift in Sources */, DE159D362C406E1600425101 /* MyPageViewController.swift in Sources */, DD4393762C412F4500EC1799 /* InviteCodeView.swift in Sources */, + DD8626452C4492EC00E4F980 /* OurReadyStatusView.swift in Sources */, DED5DBF02C345317006ECE7E /* BaseCollectionViewCell.swift in Sources */, DE32D1D42C3BFB56006848DF /* UpdateProfileNameModel.swift in Sources */, DE6D4D132C3F14D80005584B /* MeetingMemberCell.swift in Sources */, @@ -1548,7 +1541,6 @@ DE8247FD2C36E7C7000601BC /* MoyaLoggingPlugin.swift in Sources */, DDAF1C842C3D5D19008A37D3 /* ViewModelType.swift in Sources */, DD3072262C3C0F0B00416D9F /* TardyInfoModel.swift in Sources */, - DD86263D2C4481A700E4F980 /* OurReadyStatusTableViewCell.swift in Sources */, DE254AB92C311AB300A4015E /* Screen.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/KkuMulKum/Source/ReadyStatus/View/EnterReadyInfoButtonView.swift b/KkuMulKum/Source/Promise/ReadyStatus/View/EnterReadyInfoButtonView.swift similarity index 88% rename from KkuMulKum/Source/ReadyStatus/View/EnterReadyInfoButtonView.swift rename to KkuMulKum/Source/Promise/ReadyStatus/View/EnterReadyInfoButtonView.swift index 46c21e86..30fbbf44 100644 --- a/KkuMulKum/Source/ReadyStatus/View/EnterReadyInfoButtonView.swift +++ b/KkuMulKum/Source/Promise/ReadyStatus/View/EnterReadyInfoButtonView.swift @@ -24,13 +24,14 @@ class EnterReadyInfoButtonView: BaseView { override func setupAutoLayout() { descriptionLabel.snp.makeConstraints { - $0.centerY.equalToSuperview() + $0.top.equalToSuperview().offset(21) $0.leading.equalToSuperview().offset(20) } chevronButton.snp.makeConstraints { $0.trailing.equalToSuperview().inset(17) - $0.centerY.equalToSuperview() + $0.centerY.equalTo(descriptionLabel) + $0.bottom.equalToSuperview().inset(21) } } diff --git a/KkuMulKum/Source/ReadyStatus/Cell/OurReadyStatusTableViewCell.swift b/KkuMulKum/Source/Promise/ReadyStatus/View/OurReadyStatusView.swift similarity index 76% rename from KkuMulKum/Source/ReadyStatus/Cell/OurReadyStatusTableViewCell.swift rename to KkuMulKum/Source/Promise/ReadyStatus/View/OurReadyStatusView.swift index f5a99835..8ad5f892 100644 --- a/KkuMulKum/Source/ReadyStatus/Cell/OurReadyStatusTableViewCell.swift +++ b/KkuMulKum/Source/Promise/ReadyStatus/View/OurReadyStatusView.swift @@ -1,5 +1,5 @@ // -// OurReadyStatusTableViewCell.swift +// OurReadyStatusView.swift // KkuMulKum // // Created by YOUJIM on 7/15/24. @@ -7,7 +7,7 @@ import UIKit -class OurReadyStatusTableViewCell: BaseTableViewCell { +class OurReadyStatusView: BaseView { private let profileImageView: UIImageView = UIImageView(image: .imgProfile).then { $0.contentMode = .scaleAspectFill } @@ -22,12 +22,21 @@ class OurReadyStatusTableViewCell: BaseTableViewCell { ) override func setupView() { - addSubviews(profileImageView, nameLabel, readyStatusButton) + backgroundColor = .white + layer.cornerRadius = 8 + clipsToBounds = true + + addSubviews( + profileImageView, + nameLabel, + readyStatusButton + ) } override func setupAutoLayout() { profileImageView.snp.makeConstraints { - $0.centerY.equalToSuperview() + $0.top.equalToSuperview().offset(14) + $0.bottom.equalToSuperview().inset(14) $0.leading.equalToSuperview().offset(12) $0.height.equalTo(Screen.height(44)) $0.width.equalTo(profileImageView.snp.height) diff --git a/KkuMulKum/Source/ReadyStatus/View/ReadyPlanInfoView.swift b/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyPlanInfoView.swift similarity index 98% rename from KkuMulKum/Source/ReadyStatus/View/ReadyPlanInfoView.swift rename to KkuMulKum/Source/Promise/ReadyStatus/View/ReadyPlanInfoView.swift index 16a40326..1df89ab5 100644 --- a/KkuMulKum/Source/ReadyStatus/View/ReadyPlanInfoView.swift +++ b/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyPlanInfoView.swift @@ -31,6 +31,8 @@ class ReadyPlanInfoView: BaseView { } override func setupView() { + backgroundColor = .white + addSubviews( readyTimeLabel, requestReadyTimeLabel, diff --git a/KkuMulKum/Source/ReadyStatus/View/ReadyStatusButton.swift b/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusButton.swift similarity index 100% rename from KkuMulKum/Source/ReadyStatus/View/ReadyStatusButton.swift rename to KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusButton.swift diff --git a/KkuMulKum/Source/ReadyStatus/View/ReadyStatusProgressView.swift b/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusProgressView.swift similarity index 89% rename from KkuMulKum/Source/ReadyStatus/View/ReadyStatusProgressView.swift rename to KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusProgressView.swift index d61ab8bd..257b6493 100644 --- a/KkuMulKum/Source/ReadyStatus/View/ReadyStatusProgressView.swift +++ b/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusProgressView.swift @@ -25,7 +25,10 @@ class ReadyStatusProgressView: BaseView { private let readyStartButton: ReadyStatusButton = ReadyStatusButton( title: "준비 중", readyStatus: .none - ) + ).then { + $0.layer.cornerRadius = 16 + $0.layer.borderWidth = 1 + } private let readyStartTitleLabel: UILabel = UILabel().then { $0.setText("준비를 시작 시 눌러주세요", style: .label02, color: .gray5) @@ -43,7 +46,10 @@ class ReadyStatusProgressView: BaseView { private let moveStartButton: ReadyStatusButton = ReadyStatusButton( title: "이동 시작", readyStatus: .none - ) + ).then { + $0.layer.cornerRadius = 16 + $0.layer.borderWidth = 1 + } private let moveStartTitleLabel: UILabel = UILabel().then { $0.setText("이동을 시작 시 눌러주세요", style: .label02, color: .gray5) @@ -61,21 +67,27 @@ class ReadyStatusProgressView: BaseView { private let arrivalButton: ReadyStatusButton = ReadyStatusButton( title: "도착 완료", readyStatus: .none - ) + ).then { + $0.layer.cornerRadius = 16 + $0.layer.borderWidth = 1 + } private let arrivalTitleLabel: UILabel = UILabel().then { $0.setText("도착 시작 시 눌러주세요", style: .label02, color: .gray5) } override func setupView() { + backgroundColor = .white + addSubviews( statusProgressView, readyStartTimeLabel, readyStartCheckImageView, readyStartButton, - readyStartTimeLabel, + readyStartTitleLabel, moveStartTimeLabel, moveStartCheckImageView, + moveStartButton, moveStartTitleLabel, arrivalTimeLabel, arrivalCheckImageView, @@ -86,16 +98,11 @@ class ReadyStatusProgressView: BaseView { override func setupAutoLayout() { statusProgressView.snp.makeConstraints { - $0.top.equalToSuperview().offset(31.5) - $0.horizontalEdges.equalToSuperview() + $0.top.equalToSuperview().offset(50) + $0.horizontalEdges.equalToSuperview().inset(-4) $0.height.equalTo(Screen.height(5)) } - readyStartTimeLabel.snp.makeConstraints { - $0.top.equalToSuperview().offset(23) - $0.leading.equalToSuperview().offset(38) - } - readyStartCheckImageView.snp.makeConstraints { $0.centerY.equalTo(statusProgressView) $0.leading.equalToSuperview().offset(53.5) @@ -110,6 +117,11 @@ class ReadyStatusProgressView: BaseView { $0.width.equalTo(Screen.width(84)) } + readyStartTimeLabel.snp.makeConstraints { + $0.bottom.equalTo(statusProgressView).offset(-18.5) + $0.centerX.equalTo(readyStartCheckImageView) + } + readyStartTitleLabel.snp.makeConstraints { $0.top.equalTo(readyStartButton.snp.bottom).offset(9) $0.centerX.equalTo(readyStartCheckImageView) @@ -161,6 +173,7 @@ class ReadyStatusProgressView: BaseView { arrivalTitleLabel.snp.makeConstraints { $0.centerX.equalTo(arrivalCheckImageView) $0.centerY.equalTo(readyStartTitleLabel) + $0.bottom.equalToSuperview().inset(17) } } } diff --git a/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusView.swift b/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusView.swift new file mode 100644 index 00000000..9146c942 --- /dev/null +++ b/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusView.swift @@ -0,0 +1,120 @@ +// +// ReadyStatusView.swift +// KkuMulKum +// +// Created by YOUJIM on 7/10/24. +// + +import UIKit + +class ReadyStatusView: BaseView { + private var ourReadyStatusViews: [OurReadyStatusView] = [ + OurReadyStatusView(), + OurReadyStatusView(), + OurReadyStatusView(), + OurReadyStatusView(), + OurReadyStatusView() + ] + + private let scrollView: UIScrollView = UIScrollView().then { + $0.showsVerticalScrollIndicator = false + } + + private let contentView: UIView = UIView() + + private let baseStackView: UIStackView = UIStackView(axis: .vertical).then { + $0.spacing = 24 + $0.backgroundColor = .gray0 + } + + private let enterReadyButtonView: EnterReadyInfoButtonView = EnterReadyInfoButtonView().then { + $0.layer.cornerRadius = 8 + $0.clipsToBounds = true + } + + private let readyPlanInfoView: ReadyPlanInfoView = ReadyPlanInfoView().then { + $0.layer.cornerRadius = 8 + $0.clipsToBounds = true + } + + private let myReadyStatusTitleLabel: UILabel = UILabel().then { + $0.setText("나의 준비 현황", style: .body01, color: .gray8) + } + + private let readyBaseView: UIStackView = UIStackView(axis: .vertical).then { + $0.spacing = 4 + } + + private let myReadyStatusProgressView: ReadyStatusProgressView = ReadyStatusProgressView().then { + $0.layer.cornerRadius = 8 + $0.clipsToBounds = true + } + + private let popUpImageView: UIImageView = UIImageView(image: .imgTextPopup).then { + $0.contentMode = .scaleAspectFit + } + + private let ourReadyStatusLabel: UILabel = UILabel().then { + $0.setText( + "우리들의 준비 현황", + style: .body01, + color: .gray8 + ) + } + + let ourReadyStatusStackView: UIStackView = UIStackView(axis: .vertical).then { + $0.spacing = 8 + } + + let ourReadyStatusTableView: UITableView = UITableView().then { + $0.register( + OurReadyStatusTableViewCell.self, + forCellReuseIdentifier: OurReadyStatusTableViewCell.reuseIdentifier + ) + $0.backgroundColor = .clear + } + + override func setupView() { + ourReadyStatusViews.forEach { + ourReadyStatusStackView.addArrangedSubview($0) + } + + readyBaseView.addArrangedSubviews( + myReadyStatusProgressView, + popUpImageView + ) + + baseStackView.addArrangedSubviews( + enterReadyButtonView, + readyPlanInfoView, + myReadyStatusTitleLabel, + readyBaseView, + ourReadyStatusLabel, + ourReadyStatusStackView + ) + + contentView.addSubview(baseStackView) + + scrollView.addSubview(contentView) + + addSubviews( + scrollView + ) + } + + override func setupAutoLayout() { + scrollView.snp.makeConstraints { + $0.edges.equalToSuperview() + } + + contentView.snp.makeConstraints { + $0.edges.equalToSuperview() + } + + baseStackView.snp.makeConstraints { + $0.top.equalToSuperview().offset(24) + $0.horizontalEdges.equalToSuperview().inset(20) + $0.bottom.equalToSuperview().inset(24) + } + } +} diff --git a/KkuMulKum/Source/Promise/ReadyStatus/ViewController/ReadyStatusViewController.swift b/KkuMulKum/Source/Promise/ReadyStatus/ViewController/ReadyStatusViewController.swift new file mode 100644 index 00000000..7069d325 --- /dev/null +++ b/KkuMulKum/Source/Promise/ReadyStatus/ViewController/ReadyStatusViewController.swift @@ -0,0 +1,54 @@ +// +// ReadyStatusViewController.swift +// KkuMulKum +// +// Created by YOUJIM on 7/9/24. +// + +import UIKit + +class ReadyStatusViewController: BaseViewController { + private let rootView: ReadyStatusView = ReadyStatusView() + + override func loadView() { + view = rootView + } + + override func viewDidLoad() { + view.backgroundColor = .gray0 + } + + override func setupDelegate() { + rootView.ourReadyStatusTableView.delegate = self + rootView.ourReadyStatusTableView.dataSource = self + } +} + + +// MARK: UITableViewDelegate + +extension ReadyStatusViewController: UITableViewDelegate { + +} + + +// MARK: UITableViewDataSource + +extension ReadyStatusViewController: UITableViewDataSource { + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return 10 + } + + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + guard let cell = tableView.dequeueReusableCell( + withIdentifier: OurReadyStatusTableViewCell.reuseIdentifier, + for: indexPath + ) as? OurReadyStatusTableViewCell else { return UITableViewCell() } + + return cell + } + + func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { + return Screen.height(72) + } +} diff --git a/KkuMulKum/Source/ReadyStatus/View/ReadyStatusView.swift b/KkuMulKum/Source/ReadyStatus/View/ReadyStatusView.swift deleted file mode 100644 index 039ecd2c..00000000 --- a/KkuMulKum/Source/ReadyStatus/View/ReadyStatusView.swift +++ /dev/null @@ -1,61 +0,0 @@ -// -// ReadyStatusView.swift -// KkuMulKum -// -// Created by YOUJIM on 7/10/24. -// - -import UIKit - -class ReadyStatusView: BaseView { - private let baseStackView: UIStackView = UIStackView(axis: .vertical).then { - $0.spacing = 24 - } - - private let enterReadyButtonView: EnterReadyInfoButtonView = EnterReadyInfoButtonView() - - private let readyPlanInfoView: ReadyPlanInfoView = ReadyPlanInfoView() - - private let myReadyStatusTitleLabel: UILabel = UILabel().then { - $0.setText("나의 준비 현황", style: .body01, color: .gray8) - } - - private let myReadyStatusProgressView: ReadyStatusProgressView = ReadyStatusProgressView() - - private let popUpImageView: UIImageView = UIImageView(image: .imgTextPopup).then { - $0.contentMode = .scaleAspectFit - } - - private let ourReadyStatusLabel: UILabel = UILabel().then { - $0.setText( - "우리들의 준비 현황", - style: .body01, - color: .gray8 - ) - } - - private let ourReadyStatusTableView: UITableView = UITableView().then { - $0.register(OurReadyStatusTableViewCell.self, forCellReuseIdentifier: OurReadyStatusTableViewCell.reuseIdentifier) - } - - override func setupView() { - baseStackView.addArrangedSubviews( - enterReadyButtonView, - readyPlanInfoView, - myReadyStatusTitleLabel, - myReadyStatusProgressView, - popUpImageView, - ourReadyStatusLabel - ) - - addSubview(baseStackView) - } - - override func setupAutoLayout() { - baseStackView.snp.makeConstraints { - $0.top.equalToSuperview().offset(24) - $0.horizontalEdges.equalToSuperview().inset(20) - $0.bottom.equalToSuperview() - } - } -} diff --git a/KkuMulKum/Source/ReadyStatus/ViewController/ReadyStatusViewController.swift b/KkuMulKum/Source/ReadyStatus/ViewController/ReadyStatusViewController.swift deleted file mode 100644 index 90857442..00000000 --- a/KkuMulKum/Source/ReadyStatus/ViewController/ReadyStatusViewController.swift +++ /dev/null @@ -1,16 +0,0 @@ -// -// ReadyStatusViewController.swift -// KkuMulKum -// -// Created by YOUJIM on 7/9/24. -// - -import UIKit - -class ReadyStatusViewController: BaseViewController { - private let rootView: ReadyStatusView = ReadyStatusView() - - override func loadView() { - view = rootView - } -} From a04c646aaea971b703440fb05d56a0129a238f27 Mon Sep 17 00:00:00 2001 From: youz2me Date: Mon, 15 Jul 2024 08:33:04 +0900 Subject: [PATCH 12/22] =?UTF-8?q?feat/#176=20tableView=20=EC=BD=94?= =?UTF-8?q?=EB=93=9C=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ReadyStatusViewController.swift | 34 ------------------- 1 file changed, 34 deletions(-) diff --git a/KkuMulKum/Source/Promise/ReadyStatus/ViewController/ReadyStatusViewController.swift b/KkuMulKum/Source/Promise/ReadyStatus/ViewController/ReadyStatusViewController.swift index 7069d325..5ef1a97a 100644 --- a/KkuMulKum/Source/Promise/ReadyStatus/ViewController/ReadyStatusViewController.swift +++ b/KkuMulKum/Source/Promise/ReadyStatus/ViewController/ReadyStatusViewController.swift @@ -17,38 +17,4 @@ class ReadyStatusViewController: BaseViewController { override func viewDidLoad() { view.backgroundColor = .gray0 } - - override func setupDelegate() { - rootView.ourReadyStatusTableView.delegate = self - rootView.ourReadyStatusTableView.dataSource = self - } -} - - -// MARK: UITableViewDelegate - -extension ReadyStatusViewController: UITableViewDelegate { - -} - - -// MARK: UITableViewDataSource - -extension ReadyStatusViewController: UITableViewDataSource { - func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { - return 10 - } - - func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { - guard let cell = tableView.dequeueReusableCell( - withIdentifier: OurReadyStatusTableViewCell.reuseIdentifier, - for: indexPath - ) as? OurReadyStatusTableViewCell else { return UITableViewCell() } - - return cell - } - - func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { - return Screen.height(72) - } } From 8c38be1a6d76278db753f43e770f7687b0f4fff7 Mon Sep 17 00:00:00 2001 From: youz2me Date: Tue, 16 Jul 2024 08:48:49 +0900 Subject: [PATCH 13/22] =?UTF-8?q?feat/#176=20OurReadyStatusCollectionViewC?= =?UTF-8?q?ell=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ArrivalCompletionResponseModel.swift | 26 -------- .../Service/MockReadyStatusService.swift | 63 +++++++++++++++++++ ...=> OurReadyStatusCollectionViewCell.swift} | 17 ++--- .../ViewModel/ReadyStatusViewModel.swift | 8 +++ 4 files changed, 81 insertions(+), 33 deletions(-) delete mode 100644 KkuMulKum/Network/DTO/Model/Promises/ArrivalCompletionResponseModel.swift create mode 100644 KkuMulKum/Source/Promise/ReadyStatus/Service/MockReadyStatusService.swift rename KkuMulKum/Source/Promise/ReadyStatus/View/{OurReadyStatusView.swift => OurReadyStatusCollectionViewCell.swift} (74%) create mode 100644 KkuMulKum/Source/Promise/ReadyStatus/ViewModel/ReadyStatusViewModel.swift diff --git a/KkuMulKum/Network/DTO/Model/Promises/ArrivalCompletionResponseModel.swift b/KkuMulKum/Network/DTO/Model/Promises/ArrivalCompletionResponseModel.swift deleted file mode 100644 index 1942d2be..00000000 --- a/KkuMulKum/Network/DTO/Model/Promises/ArrivalCompletionResponseModel.swift +++ /dev/null @@ -1,26 +0,0 @@ -// -// ArrivalCompletionResponseModel.swift -// KkuMulKum -// -// Created by YOUJIM on 7/8/24. -// - -import Foundation - - -// MARK: 도착 완료 업데이트 -// TODO: 서버에서 정확한 API 맞는지 답변 필요 (질문해둠) - -struct ArrivalCompletionModel: ResponseModelType { - let name, profileImageURL: String - let level, promiseCount, tardyCount, tardySum: Int - - enum CodingKeys: String, CodingKey { - case name - case profileImageURL = "profileImg" - case level - case promiseCount - case tardyCount - case tardySum - } -} diff --git a/KkuMulKum/Source/Promise/ReadyStatus/Service/MockReadyStatusService.swift b/KkuMulKum/Source/Promise/ReadyStatus/Service/MockReadyStatusService.swift new file mode 100644 index 00000000..4ff2390e --- /dev/null +++ b/KkuMulKum/Source/Promise/ReadyStatus/Service/MockReadyStatusService.swift @@ -0,0 +1,63 @@ +// +// ReadyStatusService.swift +// KkuMulKum +// +// Created by YOUJIM on 7/15/24. +// + +import Foundation + +protocol ReadyStatusServiceType { + func getMyPromiseStatus(with promiseID: Int) -> MyReadyStatusModel? + func patchMyReadyStatus(with myInfo: MyPromiseReadyInfoModel) + func getParticipantList(with promiseID: Int) -> PromiseParticipantListModel? +} + +final class MockReadyStatusService: CreateMeetingServiceType { + func getMyPromiseStatus(with promiseID: Int) -> MyReadyStatusModel? { + let mockData = MyReadyStatusModel( + preparationTime: 300, + travelTime: 230, + preparationStartAt: "AM 11:00", + departureAt: "PM 1:30", + arrivalAt: "PM 2:00" + ) + + return mockData + } + + func patchMyReadyStatus(with myInfo: MyPromiseReadyInfoModel) { + + } + + func getParticipantList(with promiseID: Int) -> PromiseParticipantListModel? { + let mockData = PromiseParticipantListModel( + participantCount: 3, + participants: [ + Participant( + participantId: 1, + memberId: 3, + name: "안꾸물이", + profileImg: "imageUrl", + state: "도착" + ), + Participant( + participantId: 2, + memberId: 4, + name: "꾸우우우웅물이", + profileImg: "imageUrl", + state: "도착" + ), + Participant( + participantId: 3, + memberId: 5, + name: "꾸물이", + profileImg: "imageUrl", + state: "이동중" + ) + ] + ) + + return mockData + } +} diff --git a/KkuMulKum/Source/Promise/ReadyStatus/View/OurReadyStatusView.swift b/KkuMulKum/Source/Promise/ReadyStatus/View/OurReadyStatusCollectionViewCell.swift similarity index 74% rename from KkuMulKum/Source/Promise/ReadyStatus/View/OurReadyStatusView.swift rename to KkuMulKum/Source/Promise/ReadyStatus/View/OurReadyStatusCollectionViewCell.swift index 8ad5f892..73ae6b7f 100644 --- a/KkuMulKum/Source/Promise/ReadyStatus/View/OurReadyStatusView.swift +++ b/KkuMulKum/Source/Promise/ReadyStatus/View/OurReadyStatusCollectionViewCell.swift @@ -1,25 +1,28 @@ // -// OurReadyStatusView.swift +// OurReadyStatusCollectionViewCell.swift // KkuMulKum // -// Created by YOUJIM on 7/15/24. +// Created by YOUJIM on 7/16/24. // import UIKit -class OurReadyStatusView: BaseView { - private let profileImageView: UIImageView = UIImageView(image: .imgProfile).then { +class OurReadyStatusCollectionViewCell: BaseCollectionViewCell { + var profileImageView: UIImageView = UIImageView(image: .imgProfile).then { $0.contentMode = .scaleAspectFill } - private let nameLabel: UILabel = UILabel().then { + let nameLabel: UILabel = UILabel().then { $0.setText("유짐이", style: .body03, color: .gray8) } - private let readyStatusButton: ReadyStatusButton = ReadyStatusButton( + var readyStatusButton: ReadyStatusButton = ReadyStatusButton( title: "준비중", readyStatus: .ready - ) + ).then { + $0.layer.cornerRadius = Screen.height(14) + $0.layer.borderWidth = 0.5 + } override func setupView() { backgroundColor = .white diff --git a/KkuMulKum/Source/Promise/ReadyStatus/ViewModel/ReadyStatusViewModel.swift b/KkuMulKum/Source/Promise/ReadyStatus/ViewModel/ReadyStatusViewModel.swift new file mode 100644 index 00000000..4f131121 --- /dev/null +++ b/KkuMulKum/Source/Promise/ReadyStatus/ViewModel/ReadyStatusViewModel.swift @@ -0,0 +1,8 @@ +// +// ReadyStatusViewModel.swift +// KkuMulKum +// +// Created by YOUJIM on 7/15/24. +// + +import Foundation From b94cf2d775302937c18995cedd442a368ac015e3 Mon Sep 17 00:00:00 2001 From: youz2me Date: Tue, 16 Jul 2024 10:33:29 +0900 Subject: [PATCH 14/22] =?UTF-8?q?feat/#176=20ReadyStatusProgressView=20?= =?UTF-8?q?=EA=B5=AC=ED=98=84=20=EC=99=84=EB=A3=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../View/ReadyStatusProgressView.swift | 35 +++++++++++-------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusProgressView.swift b/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusProgressView.swift index 257b6493..e6cd6e21 100644 --- a/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusProgressView.swift +++ b/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusProgressView.swift @@ -8,42 +8,44 @@ import UIKit class ReadyStatusProgressView: BaseView { - private let statusProgressView: UIProgressView = UIProgressView().then { + let statusProgressView: UIProgressView = UIProgressView().then { $0.trackTintColor = .gray2 $0.progressTintColor = .maincolor } - private let readyStartTimeLabel: UILabel = UILabel().then { + let readyStartTimeLabel: UILabel = UILabel().then { $0.setText("AM hh:mm", style: .caption02, color: .gray8) + $0.isHidden = true } - private let readyStartCheckImageView: UIImageView = UIImageView(backgroundColor: .gray2).then { + let readyStartCheckImageView: UIImageView = UIImageView(backgroundColor: .gray2).then { $0.layer.cornerRadius = Screen.height(16 / 2) $0.clipsToBounds = true } - private let readyStartButton: ReadyStatusButton = ReadyStatusButton( - title: "준비 중", - readyStatus: .none + let readyStartButton: ReadyStatusButton = ReadyStatusButton( + title: "준비 시작", + readyStatus: .ready ).then { $0.layer.cornerRadius = 16 $0.layer.borderWidth = 1 } - private let readyStartTitleLabel: UILabel = UILabel().then { + let readyStartTitleLabel: UILabel = UILabel().then { $0.setText("준비를 시작 시 눌러주세요", style: .label02, color: .gray5) } - private let moveStartTimeLabel: UILabel = UILabel().then { + let moveStartTimeLabel: UILabel = UILabel().then { $0.setText("AM hh:mm", style: .caption02, color: .gray8) + $0.isHidden = true } - private let moveStartCheckImageView: UIImageView = UIImageView(backgroundColor: .gray2).then { + let moveStartCheckImageView: UIImageView = UIImageView(backgroundColor: .gray2).then { $0.layer.cornerRadius = Screen.height(16 / 2) $0.clipsToBounds = true } - private let moveStartButton: ReadyStatusButton = ReadyStatusButton( + let moveStartButton: ReadyStatusButton = ReadyStatusButton( title: "이동 시작", readyStatus: .none ).then { @@ -51,20 +53,22 @@ class ReadyStatusProgressView: BaseView { $0.layer.borderWidth = 1 } - private let moveStartTitleLabel: UILabel = UILabel().then { + let moveStartTitleLabel: UILabel = UILabel().then { $0.setText("이동을 시작 시 눌러주세요", style: .label02, color: .gray5) + $0.isHidden = true } - private let arrivalTimeLabel: UILabel = UILabel().then { + let arrivalTimeLabel: UILabel = UILabel().then { $0.setText("AM hh:mm", style: .caption02, color: .gray8) + $0.isHidden = true } - private let arrivalCheckImageView: UIImageView = UIImageView(backgroundColor: .gray2).then { + let arrivalCheckImageView: UIImageView = UIImageView(backgroundColor: .gray2).then { $0.layer.cornerRadius = Screen.height(16 / 2) $0.clipsToBounds = true } - private let arrivalButton: ReadyStatusButton = ReadyStatusButton( + let arrivalButton: ReadyStatusButton = ReadyStatusButton( title: "도착 완료", readyStatus: .none ).then { @@ -72,8 +76,9 @@ class ReadyStatusProgressView: BaseView { $0.layer.borderWidth = 1 } - private let arrivalTitleLabel: UILabel = UILabel().then { + let arrivalTitleLabel: UILabel = UILabel().then { $0.setText("도착 시작 시 눌러주세요", style: .label02, color: .gray5) + $0.isHidden = true } override func setupView() { From 4ff8dab41d5678e8efa7576cc30b7839d8f312b0 Mon Sep 17 00:00:00 2001 From: youz2me Date: Tue, 16 Jul 2024 10:33:53 +0900 Subject: [PATCH 15/22] =?UTF-8?q?feat/#176=20ReadyStatusButton=20=EA=B5=AC?= =?UTF-8?q?=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ReadyStatus/View/ReadyStatusButton.swift | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusButton.swift b/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusButton.swift index ed77f4a4..911de64b 100644 --- a/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusButton.swift +++ b/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusButton.swift @@ -15,7 +15,7 @@ enum ReadyStatus { } class ReadyStatusButton: UIButton { - init(title: String,readyStatus: ReadyStatus) { + init(title: String, readyStatus: ReadyStatus) { super.init(frame: .zero) setupButton(title, readyStatus) @@ -30,7 +30,7 @@ class ReadyStatusButton: UIButton { } } -private extension ReadyStatusButton { +extension ReadyStatusButton { func setupButton( _ title: String, _ readyStatus: ReadyStatus @@ -42,7 +42,7 @@ private extension ReadyStatusButton { setTitle(title, style: .body05, color: .gray3) case .ready: self.backgroundColor = .white - self.layer.borderColor = UIColor.gray3.cgColor + self.layer.borderColor = UIColor.maincolor.cgColor setTitle(title, style: .body05, color: .maincolor) case .move: self.backgroundColor = .green2 @@ -54,17 +54,4 @@ private extension ReadyStatusButton { setTitle(title, style: .body05, color: .white) } } - - func updateButtonColor() { - backgroundColor = isEnabled ? .maincolor : .gray2 - } - - @objc - func buttonPressed() { - } - - @objc - func buttonReleased() { - updateButtonColor() - } } From 5c5093bab855375df6997b4581b757b05180016f Mon Sep 17 00:00:00 2001 From: youz2me Date: Tue, 16 Jul 2024 10:34:46 +0900 Subject: [PATCH 16/22] =?UTF-8?q?fix/#176=20=EC=84=9C=EB=B2=84=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=EB=90=9C=20=EB=B6=80=EB=B6=84=EC=97=90=20=EB=A7=9E?= =?UTF-8?q?=EA=B2=8C=20=EB=AA=A8=EB=8D=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DTO/Model/Promises/AddPromiseRequestModel.swift | 3 ++- .../Promises/NearestPromiseResponseModel.swift | 2 +- .../Model/Promises/PromiseInfoResponseModel.swift | 1 + .../PromiseParticipantListResponseModel.swift | 13 ++++--------- .../Promises/UpcomingPromiseListResponseModel.swift | 2 +- 5 files changed, 9 insertions(+), 12 deletions(-) diff --git a/KkuMulKum/Network/DTO/Model/Promises/AddPromiseRequestModel.swift b/KkuMulKum/Network/DTO/Model/Promises/AddPromiseRequestModel.swift index 179abeb8..d9fd59ed 100644 --- a/KkuMulKum/Network/DTO/Model/Promises/AddPromiseRequestModel.swift +++ b/KkuMulKum/Network/DTO/Model/Promises/AddPromiseRequestModel.swift @@ -11,7 +11,8 @@ import Foundation struct AddPromiseModel: RequestModelType { - let name, placeName, x, y, address, roadAddress, time, dressUpLevel, penalty: String + let name, placeName, address, roadAddress, time, dressUpLevel, penalty: String + let x, y: Double let id: Int let participants: [Int] } diff --git a/KkuMulKum/Network/DTO/Model/Promises/NearestPromiseResponseModel.swift b/KkuMulKum/Network/DTO/Model/Promises/NearestPromiseResponseModel.swift index 11d17f90..ac6108c2 100644 --- a/KkuMulKum/Network/DTO/Model/Promises/NearestPromiseResponseModel.swift +++ b/KkuMulKum/Network/DTO/Model/Promises/NearestPromiseResponseModel.swift @@ -11,6 +11,6 @@ import Foundation // MARK: 오늘 가장 가까운 약속 조회 (1개) struct NearestPromiseModel: ResponseModelType { - let id, dDay: Int + let promiseId, dDay: Int let name, meetingName, dressUpLevel, date, time, placeName: String } diff --git a/KkuMulKum/Network/DTO/Model/Promises/PromiseInfoResponseModel.swift b/KkuMulKum/Network/DTO/Model/Promises/PromiseInfoResponseModel.swift index d506226d..34f3869c 100644 --- a/KkuMulKum/Network/DTO/Model/Promises/PromiseInfoResponseModel.swift +++ b/KkuMulKum/Network/DTO/Model/Promises/PromiseInfoResponseModel.swift @@ -11,5 +11,6 @@ import Foundation struct PromiseInfoModel: ResponseModelType { + let promiseId: Int let placeName, address, roadAddress, time, dressUpLevel, penalty: String } diff --git a/KkuMulKum/Network/DTO/Model/Promises/PromiseParticipantListResponseModel.swift b/KkuMulKum/Network/DTO/Model/Promises/PromiseParticipantListResponseModel.swift index 3221ee54..d68591ff 100644 --- a/KkuMulKum/Network/DTO/Model/Promises/PromiseParticipantListResponseModel.swift +++ b/KkuMulKum/Network/DTO/Model/Promises/PromiseParticipantListResponseModel.swift @@ -11,17 +11,12 @@ import Foundation // MARK: 약속 참여자 목록 struct PromiseParticipantListModel: ResponseModelType { + let participantCount: Int let participants: [Participant] } struct Participant: Codable { - let id: Int - let name, profileImageURL, state: String - - enum CodingKeys: String, CodingKey { - case id - case name - case profileImageURL = "profileImg" - case state - } + let participantId, memberId: Int + let name, state: String + let profileImg: String? } diff --git a/KkuMulKum/Network/DTO/Model/Promises/UpcomingPromiseListResponseModel.swift b/KkuMulKum/Network/DTO/Model/Promises/UpcomingPromiseListResponseModel.swift index 75786e0a..b460ff27 100644 --- a/KkuMulKum/Network/DTO/Model/Promises/UpcomingPromiseListResponseModel.swift +++ b/KkuMulKum/Network/DTO/Model/Promises/UpcomingPromiseListResponseModel.swift @@ -15,6 +15,6 @@ struct UpcomingPromiseListModel: ResponseModelType { } struct UpcomingPromise: Codable { - let id, dDay: Int + let promiseId, dDay: Int let name, meetingName, dressUpLevel, date, time, placeName: String } From 6187c619c99e67e9a48ed91d82555ea5e59bd78e Mon Sep 17 00:00:00 2001 From: youz2me Date: Tue, 16 Jul 2024 10:35:17 +0900 Subject: [PATCH 17/22] =?UTF-8?q?feat/#176=20=ED=85=8C=EC=8A=A4=ED=8A=B8?= =?UTF-8?q?=EC=9A=A9=20ReadyStatusService=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/MockReadyStatusService.swift | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/KkuMulKum/Source/Promise/ReadyStatus/Service/MockReadyStatusService.swift b/KkuMulKum/Source/Promise/ReadyStatus/Service/MockReadyStatusService.swift index 4ff2390e..d0f7b8ac 100644 --- a/KkuMulKum/Source/Promise/ReadyStatus/Service/MockReadyStatusService.swift +++ b/KkuMulKum/Source/Promise/ReadyStatus/Service/MockReadyStatusService.swift @@ -26,11 +26,7 @@ final class MockReadyStatusService: CreateMeetingServiceType { return mockData } - func patchMyReadyStatus(with myInfo: MyPromiseReadyInfoModel) { - - } - - func getParticipantList(with promiseID: Int) -> PromiseParticipantListModel? { + func getParticipantList(with promiseID: Int) -> PromiseParticipantListModel { let mockData = PromiseParticipantListModel( participantCount: 3, participants: [ @@ -38,22 +34,22 @@ final class MockReadyStatusService: CreateMeetingServiceType { participantId: 1, memberId: 3, name: "안꾸물이", - profileImg: "imageUrl", - state: "도착" + state: "도착", + profileImg: nil ), Participant( participantId: 2, memberId: 4, name: "꾸우우우웅물이", - profileImg: "imageUrl", - state: "도착" + state: "도착", + profileImg: nil ), Participant( participantId: 3, memberId: 5, name: "꾸물이", - profileImg: "imageUrl", - state: "이동중" + state: "이동중", + profileImg: nil ) ] ) From 71f2130c4cc11a3c3e7838f6dfd3d100bfbf39fa Mon Sep 17 00:00:00 2001 From: youz2me Date: Tue, 16 Jul 2024 10:35:48 +0900 Subject: [PATCH 18/22] =?UTF-8?q?feat/#176=20=EC=A4=80=EB=B9=84=20?= =?UTF-8?q?=ED=98=84=ED=99=A9=20=EB=B7=B0=20=EB=B0=8F=20=EB=B6=84=EA=B8=B0?= =?UTF-8?q?=EC=B2=98=EB=A6=AC,=20=EA=B8=B0=EB=8A=A5=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ReadyStatus/View/ReadyStatusView.swift | 62 ++-- .../ReadyStatusViewController.swift | 272 +++++++++++++++++- .../ViewModel/ReadyStatusViewModel.swift | 40 +++ 3 files changed, 339 insertions(+), 35 deletions(-) diff --git a/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusView.swift b/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusView.swift index 9146c942..652215b6 100644 --- a/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusView.swift +++ b/KkuMulKum/Source/Promise/ReadyStatus/View/ReadyStatusView.swift @@ -8,14 +8,6 @@ import UIKit class ReadyStatusView: BaseView { - private var ourReadyStatusViews: [OurReadyStatusView] = [ - OurReadyStatusView(), - OurReadyStatusView(), - OurReadyStatusView(), - OurReadyStatusView(), - OurReadyStatusView() - ] - private let scrollView: UIScrollView = UIScrollView().then { $0.showsVerticalScrollIndicator = false } @@ -27,12 +19,12 @@ class ReadyStatusView: BaseView { $0.backgroundColor = .gray0 } - private let enterReadyButtonView: EnterReadyInfoButtonView = EnterReadyInfoButtonView().then { + let enterReadyButtonView: EnterReadyInfoButtonView = EnterReadyInfoButtonView().then { $0.layer.cornerRadius = 8 $0.clipsToBounds = true } - private let readyPlanInfoView: ReadyPlanInfoView = ReadyPlanInfoView().then { + let readyPlanInfoView: ReadyPlanInfoView = ReadyPlanInfoView().then { $0.layer.cornerRadius = 8 $0.clipsToBounds = true } @@ -45,7 +37,7 @@ class ReadyStatusView: BaseView { $0.spacing = 4 } - private let myReadyStatusProgressView: ReadyStatusProgressView = ReadyStatusProgressView().then { + let myReadyStatusProgressView: ReadyStatusProgressView = ReadyStatusProgressView().then { $0.layer.cornerRadius = 8 $0.clipsToBounds = true } @@ -62,23 +54,20 @@ class ReadyStatusView: BaseView { ) } - let ourReadyStatusStackView: UIStackView = UIStackView(axis: .vertical).then { - $0.spacing = 8 - } - - let ourReadyStatusTableView: UITableView = UITableView().then { - $0.register( - OurReadyStatusTableViewCell.self, - forCellReuseIdentifier: OurReadyStatusTableViewCell.reuseIdentifier - ) - $0.backgroundColor = .clear - } + let ourReadyStatusCollectionView: UICollectionView = UICollectionView( + frame: .zero, + collectionViewLayout: UICollectionViewFlowLayout().then { + $0.scrollDirection = .vertical + $0.estimatedItemSize = .init(width: Screen.width(335), height: Screen.height(72)) + }).then { + $0.backgroundColor = .clear + $0.register( + OurReadyStatusCollectionViewCell.self, + forCellWithReuseIdentifier: OurReadyStatusCollectionViewCell.reuseIdentifier + ) + } override func setupView() { - ourReadyStatusViews.forEach { - ourReadyStatusStackView.addArrangedSubview($0) - } - readyBaseView.addArrangedSubviews( myReadyStatusProgressView, popUpImageView @@ -89,17 +78,17 @@ class ReadyStatusView: BaseView { readyPlanInfoView, myReadyStatusTitleLabel, readyBaseView, - ourReadyStatusLabel, - ourReadyStatusStackView + ourReadyStatusLabel ) - contentView.addSubview(baseStackView) + contentView.addSubviews( + baseStackView, + ourReadyStatusCollectionView + ) scrollView.addSubview(contentView) - addSubviews( - scrollView - ) + addSubviews(scrollView) } override func setupAutoLayout() { @@ -108,13 +97,18 @@ class ReadyStatusView: BaseView { } contentView.snp.makeConstraints { - $0.edges.equalToSuperview() + $0.edges.width.height.equalToSuperview() } baseStackView.snp.makeConstraints { $0.top.equalToSuperview().offset(24) $0.horizontalEdges.equalToSuperview().inset(20) - $0.bottom.equalToSuperview().inset(24) + } + + ourReadyStatusCollectionView.snp.makeConstraints { + $0.top.equalTo(baseStackView.snp.bottom).offset(22) + $0.horizontalEdges.equalToSuperview().inset(20) + $0.bottom.equalToSuperview().inset(20) } } } diff --git a/KkuMulKum/Source/Promise/ReadyStatus/ViewController/ReadyStatusViewController.swift b/KkuMulKum/Source/Promise/ReadyStatus/ViewController/ReadyStatusViewController.swift index 5ef1a97a..633f9a63 100644 --- a/KkuMulKum/Source/Promise/ReadyStatus/ViewController/ReadyStatusViewController.swift +++ b/KkuMulKum/Source/Promise/ReadyStatus/ViewController/ReadyStatusViewController.swift @@ -7,14 +7,284 @@ import UIKit +import Kingfisher + class ReadyStatusViewController: BaseViewController { + private let readyStatusViewModel: ReadyStatusViewModel + private let rootView: ReadyStatusView = ReadyStatusView() - + + init(readyStatusViewModel: ReadyStatusViewModel) { + self.readyStatusViewModel = readyStatusViewModel + + super.init(nibName: nil, bundle: nil) + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + override func loadView() { view = rootView } override func viewDidLoad() { + super.viewDidLoad() + view.backgroundColor = .gray0 + + setupBinding() + } + + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + + DispatchQueue.main.async { + self.updateReadyInfoView(flag: self.readyStatusViewModel.isReadyInfoEntered.value) + self.rootView.ourReadyStatusCollectionView.reloadData() + } + } + + override func setupDelegate() { + rootView.ourReadyStatusCollectionView.dataSource = self + rootView.ourReadyStatusCollectionView.delegate = self + } + + override func setupAction() { + rootView.myReadyStatusProgressView.readyStartButton.addTarget( + self, + action: #selector(readyStartButtonDidTapped), + for: .touchUpInside + ) + rootView.myReadyStatusProgressView.moveStartButton.addTarget( + self, + action: #selector(moveStartButtonDidTapped), + for: .touchUpInside + ) + rootView.myReadyStatusProgressView.arrivalButton.addTarget( + self, + action: #selector(arrivalButtonDidTapped), + for: .touchUpInside + ) + } + + @objc + func readyStartButtonDidTapped() { + readyStatusViewModel.myReadyStatus.value = .ready + rootView.myReadyStatusProgressView.readyStartButton.isEnabled.toggle() + } + + @objc + func moveStartButtonDidTapped() { + readyStatusViewModel.myReadyStatus.value = .move + rootView.myReadyStatusProgressView.moveStartButton.isEnabled.toggle() + } + + @objc + func arrivalButtonDidTapped() { + readyStatusViewModel.myReadyStatus.value = .done + rootView.myReadyStatusProgressView.arrivalButton.isEnabled.toggle() + } +} + +extension ReadyStatusViewController: UICollectionViewDelegate { + +} + +extension ReadyStatusViewController: UICollectionViewDataSource { + func collectionView( + _ collectionView: UICollectionView, + numberOfItemsInSection section: Int + ) -> Int { + return readyStatusViewModel.participantInfos.value.count + } + + func collectionView( + _ collectionView: UICollectionView, + cellForItemAt indexPath: IndexPath + ) -> UICollectionViewCell { + guard let cell = collectionView.dequeueReusableCell( + withReuseIdentifier: OurReadyStatusCollectionViewCell.reuseIdentifier, + for: indexPath + ) as? OurReadyStatusCollectionViewCell + else { return UICollectionViewCell() } + + cell.nameLabel.setText( + readyStatusViewModel.participantInfos.value[indexPath.row].name, + style: .body03, + color: .gray8 + ) + + if let imageURL = readyStatusViewModel.participantInfos.value[indexPath.row].profileImg { + cell.profileImageView.kf.setImage(with: URL(string: imageURL)) + } else { + cell.profileImageView.image = .imgProfile + } + + switch readyStatusViewModel.participantInfos.value[indexPath.row].state { + case "도착": + cell.readyStatusButton.setupButton("도착", .done) + case "이동중": + cell.readyStatusButton.setupButton("이동중", .move) + case "준비중": + cell.readyStatusButton.setupButton("준비중", .ready) + cell.readyStatusButton.layer.borderWidth = 0 + default: + cell.readyStatusButton.setupButton("꾸물중", .none) + } + + return cell + } +} + +private extension ReadyStatusViewController { + func setupBinding() { + readyStatusViewModel.isReadyInfoEntered.bind(with: self) { owner, status in + DispatchQueue.main.async { + owner.readyStatusViewModel.isReadyInfoEntered.value = status + owner.updateReadyInfoView(flag: status) + } + } + + readyStatusViewModel.myReadyStatus.bind(with: self) { owner, status in + DispatchQueue.main.async { + owner.readyStatusViewModel.myReadyStatus.value = status + owner.updateReadyStartButton(status: status) + } + } + + readyStatusViewModel.participantInfos.bind(with: self) { owner, participants in + DispatchQueue.main.async { + owner.readyStatusViewModel.participantInfos.value = participants + owner.rootView.ourReadyStatusCollectionView.reloadData() + } + } + } + + func updateReadyInfoView(flag: Bool) { + rootView.enterReadyButtonView.isHidden = flag + rootView.readyPlanInfoView.isHidden = !flag + } + + func updateReadyStartButton(status: ReadyStatus) { + switch status { + case .none: + rootView.myReadyStatusProgressView.readyStartButton.setupButton( + "준비 시작", + .ready + ) + rootView.myReadyStatusProgressView.moveStartButton.setupButton( + "이동 시작", + .none + ) + rootView.myReadyStatusProgressView.arrivalButton.setupButton( + "도착 완료", + .none + ) + rootView.myReadyStatusProgressView.statusProgressView.setProgress( + 0, + animated: false + ) + case .ready: + rootView.myReadyStatusProgressView.readyStartButton.setupButton( + "준비 중", + .move + ) + rootView.myReadyStatusProgressView.moveStartButton.setupButton( + "이동 시작", + .ready + ) + rootView.myReadyStatusProgressView.arrivalButton.setupButton( + "도착 완료", + .none + ) + rootView.myReadyStatusProgressView.statusProgressView.setProgress( + 0.2, + animated: false + ) + + [ + rootView.myReadyStatusProgressView.moveStartTimeLabel, + rootView.myReadyStatusProgressView.readyStartTitleLabel + ].forEach { $0.isHidden = true } + + [ + rootView.myReadyStatusProgressView.readyStartTimeLabel, + rootView.myReadyStatusProgressView.moveStartTitleLabel + ].forEach { $0.isHidden = false } + + rootView.myReadyStatusProgressView.readyStartTimeLabel.setText( + readyStatusViewModel.updateReadyStatusTime(), + style: .caption02, + color: .gray8 + ) + + rootView.myReadyStatusProgressView.readyStartCheckImageView.backgroundColor = .green2 + case .move: + rootView.myReadyStatusProgressView.readyStartButton.setupButton( + "준비 중", + .done + ) + rootView.myReadyStatusProgressView.moveStartButton.setupButton( + "이동 중", + .move + ) + rootView.myReadyStatusProgressView.arrivalButton.setupButton( + "도착 완료", + .ready + ) + rootView.myReadyStatusProgressView.statusProgressView.setProgress( + 0.5, + animated: false + ) + + [ + rootView.myReadyStatusProgressView.moveStartTimeLabel, + rootView.myReadyStatusProgressView.arrivalTitleLabel + ].forEach { $0.isHidden = false } + + [ + rootView.myReadyStatusProgressView.arrivalTimeLabel, + rootView.myReadyStatusProgressView.moveStartTitleLabel + ].forEach { $0.isHidden = true } + + rootView.myReadyStatusProgressView.moveStartTimeLabel.setText( + readyStatusViewModel.updateReadyStatusTime(), + style: .caption02, + color: .gray8 + ) + + rootView.myReadyStatusProgressView.readyStartCheckImageView.image = .iconCheck + rootView.myReadyStatusProgressView.moveStartCheckImageView.backgroundColor = .green2 + case .done: + rootView.myReadyStatusProgressView.readyStartButton.setupButton( + "준비 중", + .done + ) + rootView.myReadyStatusProgressView.moveStartButton.setupButton( + "이동 중", + .done + ) + rootView.myReadyStatusProgressView.arrivalButton.setupButton( + "도착 완료", + .done + ) + rootView.myReadyStatusProgressView.statusProgressView.setProgress( + 1, + animated: false + ) + + rootView.myReadyStatusProgressView.arrivalTitleLabel.isHidden = true + rootView.myReadyStatusProgressView.arrivalTimeLabel.isHidden = false + + rootView.myReadyStatusProgressView.moveStartCheckImageView.image = .iconCheck + rootView.myReadyStatusProgressView.arrivalCheckImageView.image = .iconCheck + + rootView.myReadyStatusProgressView.arrivalTimeLabel.setText( + readyStatusViewModel.updateReadyStatusTime(), + style: .caption02, + color: .gray8 + ) + } } } diff --git a/KkuMulKum/Source/Promise/ReadyStatus/ViewModel/ReadyStatusViewModel.swift b/KkuMulKum/Source/Promise/ReadyStatus/ViewModel/ReadyStatusViewModel.swift index 4f131121..e41f6d6b 100644 --- a/KkuMulKum/Source/Promise/ReadyStatus/ViewModel/ReadyStatusViewModel.swift +++ b/KkuMulKum/Source/Promise/ReadyStatus/ViewModel/ReadyStatusViewModel.swift @@ -6,3 +6,43 @@ // import Foundation + +class ReadyStatusViewModel { + // 서비스 객체 + var readyStatusService: MockReadyStatusService + + // 준비 정보가 입력되었는지 여부 + var isReadyInfoEntered = ObservablePattern(false) + + // 현재 준비 상태 + var myReadyStatus = ObservablePattern(.none) + + // 우리들의 준비 현황 스택 뷰에 들어갈 정보들 + var participantInfos = ObservablePattern<[Participant]>([]) + + // 현재 시간 받아오기 위한 dateFormatter 구헌 + private let dateFormatter = DateFormatter().then { + $0.dateFormat = "a hh:mm" + $0.amSymbol = "AM" + $0.pmSymbol = "PM" + } + + // 초기화 + init(readyStatusService: MockReadyStatusService) { + self.readyStatusService = readyStatusService + + participantInfos.value = readyStatusService.getParticipantList(with: 1).participants + } + + // 우리들의 준비 현황 변동되었을 때 + func participantInfosDidChanged(infos: [Participant]) { + participantInfos.value = infos + } + + // 준비 현황 버튼 클릭했을 때 + func updateReadyStatusTime() -> String { + let currentTimeString = dateFormatter.string(from: Date()) + + return currentTimeString + } +} From 3374f874d96a5d5b3f26c4a1e723619b2f56d80f Mon Sep 17 00:00:00 2001 From: youz2me Date: Tue, 16 Jul 2024 10:36:01 +0900 Subject: [PATCH 19/22] =?UTF-8?q?feat/#176=20=EC=A4=80=EB=B9=84=20?= =?UTF-8?q?=ED=98=84=ED=99=A9=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- KkuMulKum.xcodeproj/project.pbxproj | 38 ++++++++++++++----- .../ViewController/LoginViewController.swift | 2 +- .../PagePromiseViewController.swift | 8 +++- 3 files changed, 36 insertions(+), 12 deletions(-) diff --git a/KkuMulKum.xcodeproj/project.pbxproj b/KkuMulKum.xcodeproj/project.pbxproj index 71fc7392..f1e7e76d 100644 --- a/KkuMulKum.xcodeproj/project.pbxproj +++ b/KkuMulKum.xcodeproj/project.pbxproj @@ -81,7 +81,6 @@ DD3072222C3C0DA300416D9F /* PromiseParticipantListResponseModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD3072212C3C0DA300416D9F /* PromiseParticipantListResponseModel.swift */; }; DD3072242C3C0EB200416D9F /* MyPromiseReadyInfoRequestModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD3072232C3C0EB200416D9F /* MyPromiseReadyInfoRequestModel.swift */; }; DD3072262C3C0F0B00416D9F /* TardyInfoModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD3072252C3C0F0B00416D9F /* TardyInfoModel.swift */; }; - DD3072282C3C104D00416D9F /* ArrivalCompletionResponseModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD3072272C3C104D00416D9F /* ArrivalCompletionResponseModel.swift */; }; DD3976682C41769400E2A4C4 /* CreateMeetingViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD3976672C41769400E2A4C4 /* CreateMeetingViewModel.swift */; }; DD39766B2C41995A00E2A4C4 /* FinishCreateNavigationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD39766A2C41995A00E2A4C4 /* FinishCreateNavigationView.swift */; }; DD39766F2C41B54400E2A4C4 /* InviteCodeService.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD39766E2C41B54400E2A4C4 /* InviteCodeService.swift */; }; @@ -117,7 +116,9 @@ DD8626412C4481A700E4F980 /* ReadyStatusButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD8626392C4481A700E4F980 /* ReadyStatusButton.swift */; }; DD8626422C4481A700E4F980 /* ReadyStatusProgressView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD86263A2C4481A700E4F980 /* ReadyStatusProgressView.swift */; }; DD8626432C4481A700E4F980 /* ReadyStatusViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD86263C2C4481A700E4F980 /* ReadyStatusViewController.swift */; }; - DD8626452C4492EC00E4F980 /* OurReadyStatusView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD8626442C4492EC00E4F980 /* OurReadyStatusView.swift */; }; + DD8626472C4505A900E4F980 /* ReadyStatusViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD8626462C4505A900E4F980 /* ReadyStatusViewModel.swift */; }; + DD86264A2C45072000E4F980 /* MockReadyStatusService.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD8626492C45072000E4F980 /* MockReadyStatusService.swift */; }; + DD86264D2C45D53D00E4F980 /* OurReadyStatusCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD86264C2C45D53D00E4F980 /* OurReadyStatusCollectionViewCell.swift */; }; DD931B6E2C3DA27F00526452 /* ParticipantCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD931B6D2C3DA27F00526452 /* ParticipantCollectionViewCell.swift */; }; DD931B762C3DC16100526452 /* PromiseInfoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD931B752C3DC16100526452 /* PromiseInfoView.swift */; }; DDA2EE732C385EB9007C6059 /* MainTabBarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDA2EE722C385EB9007C6059 /* MainTabBarController.swift */; }; @@ -225,7 +226,6 @@ DD3072212C3C0DA300416D9F /* PromiseParticipantListResponseModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PromiseParticipantListResponseModel.swift; sourceTree = ""; }; DD3072232C3C0EB200416D9F /* MyPromiseReadyInfoRequestModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyPromiseReadyInfoRequestModel.swift; sourceTree = ""; }; DD3072252C3C0F0B00416D9F /* TardyInfoModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TardyInfoModel.swift; sourceTree = ""; }; - DD3072272C3C104D00416D9F /* ArrivalCompletionResponseModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrivalCompletionResponseModel.swift; sourceTree = ""; }; DD3976672C41769400E2A4C4 /* CreateMeetingViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreateMeetingViewModel.swift; sourceTree = ""; }; DD39766A2C41995A00E2A4C4 /* FinishCreateNavigationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FinishCreateNavigationView.swift; sourceTree = ""; }; DD39766E2C41B54400E2A4C4 /* InviteCodeService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InviteCodeService.swift; sourceTree = ""; }; @@ -261,7 +261,9 @@ DD8626392C4481A700E4F980 /* ReadyStatusButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReadyStatusButton.swift; sourceTree = ""; }; DD86263A2C4481A700E4F980 /* ReadyStatusProgressView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReadyStatusProgressView.swift; sourceTree = ""; }; DD86263C2C4481A700E4F980 /* ReadyStatusViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReadyStatusViewController.swift; sourceTree = ""; }; - DD8626442C4492EC00E4F980 /* OurReadyStatusView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OurReadyStatusView.swift; sourceTree = ""; }; + DD8626462C4505A900E4F980 /* ReadyStatusViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadyStatusViewModel.swift; sourceTree = ""; }; + DD8626492C45072000E4F980 /* MockReadyStatusService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockReadyStatusService.swift; sourceTree = ""; }; + DD86264C2C45D53D00E4F980 /* OurReadyStatusCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OurReadyStatusCollectionViewCell.swift; sourceTree = ""; }; DD931B6D2C3DA27F00526452 /* ParticipantCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ParticipantCollectionViewCell.swift; sourceTree = ""; }; DD931B752C3DC16100526452 /* PromiseInfoView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PromiseInfoView.swift; sourceTree = ""; }; DDA2EE722C385EB9007C6059 /* MainTabBarController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainTabBarController.swift; sourceTree = ""; }; @@ -897,7 +899,9 @@ DD8626322C4481A700E4F980 /* ReadyStatus */ = { isa = PBXGroup; children = ( + DD86264B2C45075A00E4F980 /* Service */, DD86263B2C4481A700E4F980 /* ViewController */, + DD8626482C4505AD00E4F980 /* ViewModel */, DD8626352C4481A700E4F980 /* View */, ); path = ReadyStatus; @@ -909,9 +913,9 @@ DD8626382C4481A700E4F980 /* ReadyStatusView.swift */, DD8626362C4481A700E4F980 /* EnterReadyInfoButtonView.swift */, DD8626372C4481A700E4F980 /* ReadyPlanInfoView.swift */, - DD8626392C4481A700E4F980 /* ReadyStatusButton.swift */, DD86263A2C4481A700E4F980 /* ReadyStatusProgressView.swift */, - DD8626442C4492EC00E4F980 /* OurReadyStatusView.swift */, + DD8626392C4481A700E4F980 /* ReadyStatusButton.swift */, + DD86264C2C45D53D00E4F980 /* OurReadyStatusCollectionViewCell.swift */, ); path = View; sourceTree = ""; @@ -924,6 +928,22 @@ path = ViewController; sourceTree = ""; }; + DD8626482C4505AD00E4F980 /* ViewModel */ = { + isa = PBXGroup; + children = ( + DD8626462C4505A900E4F980 /* ReadyStatusViewModel.swift */, + ); + path = ViewModel; + sourceTree = ""; + }; + DD86264B2C45075A00E4F980 /* Service */ = { + isa = PBXGroup; + children = ( + DD8626492C45072000E4F980 /* MockReadyStatusService.swift */, + ); + path = Service; + sourceTree = ""; + }; DD865B652C3920F600C351A2 /* Onboarding */ = { isa = PBXGroup; children = ( @@ -1245,7 +1265,6 @@ DD3072212C3C0DA300416D9F /* PromiseParticipantListResponseModel.swift */, DD3072232C3C0EB200416D9F /* MyPromiseReadyInfoRequestModel.swift */, DD3072252C3C0F0B00416D9F /* TardyInfoModel.swift */, - DD3072272C3C104D00416D9F /* ArrivalCompletionResponseModel.swift */, ); path = Promises; sourceTree = ""; @@ -1457,6 +1476,7 @@ DD3976852C41C2AD00E2A4C4 /* UpcomingPromiseModel.swift in Sources */, DEF725DB2C3F3BBF008C87C7 /* Toast.swift in Sources */, DD43937A2C412F4500EC1799 /* FinishCreateViewController.swift in Sources */, + DD86264A2C45072000E4F980 /* MockReadyStatusService.swift in Sources */, DE254AAC2C31192400A4015E /* UILabel+.swift in Sources */, DE254AB72C3119D000A4015E /* ReuseIdentifiable.swift in Sources */, A3DD9C412C41BAD000E58A13 /* MeetingListViewModel.swift in Sources */, @@ -1470,7 +1490,6 @@ DE254AAA2C31190E00A4015E /* UIStackView+.swift in Sources */, DE159D362C406E1600425101 /* MyPageViewController.swift in Sources */, DD4393762C412F4500EC1799 /* InviteCodeView.swift in Sources */, - DD8626452C4492EC00E4F980 /* OurReadyStatusView.swift in Sources */, DED5DBF02C345317006ECE7E /* BaseCollectionViewCell.swift in Sources */, DE32D1D42C3BFB56006848DF /* UpdateProfileNameModel.swift in Sources */, DE6D4D132C3F14D80005584B /* MeetingMemberCell.swift in Sources */, @@ -1502,6 +1521,7 @@ DD39768A2C41C2AD00E2A4C4 /* HomeViewController.swift in Sources */, DED5DBF42C34539A006ECE7E /* BaseTableViewCell.swift in Sources */, 78B9286E2C29402C006D9942 /* SceneDelegate.swift in Sources */, + DD8626472C4505A900E4F980 /* ReadyStatusViewModel.swift in Sources */, DD39766F2C41B54400E2A4C4 /* InviteCodeService.swift in Sources */, DE6D4D172C3F14D80005584B /* MeetingInfoViewModel.swift in Sources */, 78AED1372C3D98D1000AD80A /* NicknameView.swift in Sources */, @@ -1521,7 +1541,6 @@ DD8626412C4481A700E4F980 /* ReadyStatusButton.swift in Sources */, DD39766B2C41995A00E2A4C4 /* FinishCreateNavigationView.swift in Sources */, DD3072202C3C0D4500416D9F /* MyReadyStatusResponseModel.swift in Sources */, - DD3072282C3C104D00416D9F /* ArrivalCompletionResponseModel.swift in Sources */, DD931B6E2C3DA27F00526452 /* ParticipantCollectionViewCell.swift in Sources */, DD3976882C41C2AD00E2A4C4 /* UpcomingEmptyView.swift in Sources */, DD931B762C3DC16100526452 /* PromiseInfoView.swift in Sources */, @@ -1538,6 +1557,7 @@ DD4909962C440CDC003ED304 /* ArriveView.swift in Sources */, DE254AB02C31195B00A4015E /* NSAttributedString+.swift in Sources */, DD43937B2C412F4500EC1799 /* CreateMeetingViewController.swift in Sources */, + DD86264D2C45D53D00E4F980 /* OurReadyStatusCollectionViewCell.swift in Sources */, DE8247FD2C36E7C7000601BC /* MoyaLoggingPlugin.swift in Sources */, DDAF1C842C3D5D19008A37D3 /* ViewModelType.swift in Sources */, DD3072262C3C0F0B00416D9F /* TardyInfoModel.swift in Sources */, diff --git a/KkuMulKum/Source/Onboarding/Login/ViewController/LoginViewController.swift b/KkuMulKum/Source/Onboarding/Login/ViewController/LoginViewController.swift index 87314318..8a01f8d3 100644 --- a/KkuMulKum/Source/Onboarding/Login/ViewController/LoginViewController.swift +++ b/KkuMulKum/Source/Onboarding/Login/ViewController/LoginViewController.swift @@ -85,7 +85,7 @@ class LoginViewController: BaseViewController { viewController.modalPresentationStyle = .fullScreen - present(viewController, animated: true) + present(viewController, animated: false) } } diff --git a/KkuMulKum/Source/Promise/PagePromise/ViewController/PagePromiseViewController.swift b/KkuMulKum/Source/Promise/PagePromise/ViewController/PagePromiseViewController.swift index 8bbbf92f..c535439f 100644 --- a/KkuMulKum/Source/Promise/PagePromise/ViewController/PagePromiseViewController.swift +++ b/KkuMulKum/Source/Promise/PagePromise/ViewController/PagePromiseViewController.swift @@ -10,10 +10,14 @@ import UIKit class PagePromiseViewController: BaseViewController { private let promiseViewModel = PagePromiseViewModel() + // TODO: 서버 연결 시 데이터 바인딩 필요 private let promiseViewControllerList: [BaseViewController] = [ PromiseInfoViewController(), - ReadyStatusViewController(), - // TODO: 서버 연결 시 데이터 바인딩 필요 + ReadyStatusViewController( + readyStatusViewModel: ReadyStatusViewModel( + readyStatusService: MockReadyStatusService() + ) + ), TardyViewController( tardyViewModel: TardyViewModel( isPastDue: ObservablePattern(false), From c14a7b861bfafcfad6224dc7008716b90a93df33 Mon Sep 17 00:00:00 2001 From: youz2me Date: Tue, 16 Jul 2024 10:39:09 +0900 Subject: [PATCH 20/22] =?UTF-8?q?fix/#176=20=EC=B6=A9=EB=8F=8C=20=ED=95=B4?= =?UTF-8?q?=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- KkuMulKum.xcodeproj/project.pbxproj | 184 ++++++++++------------------ 1 file changed, 65 insertions(+), 119 deletions(-) diff --git a/KkuMulKum.xcodeproj/project.pbxproj b/KkuMulKum.xcodeproj/project.pbxproj index ab69a73b..89fe6330 100644 --- a/KkuMulKum.xcodeproj/project.pbxproj +++ b/KkuMulKum.xcodeproj/project.pbxproj @@ -68,9 +68,6 @@ A3DD9C3F2C41BAD000E58A13 /* MeetingListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3DD9C362C41BAD000E58A13 /* MeetingListView.swift */; }; A3DD9C402C41BAD000E58A13 /* MeetingListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3DD9C382C41BAD000E58A13 /* MeetingListViewController.swift */; }; A3DD9C412C41BAD000E58A13 /* MeetingListViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3DD9C3A2C41BAD000E58A13 /* MeetingListViewModel.swift */; }; - A3DD9C5A2C43F99800E58A13 /* SetReadyInfoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3DD9C592C43F99700E58A13 /* SetReadyInfoView.swift */; }; - A3DD9C5C2C43F9A800E58A13 /* SetReadyInfoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3DD9C5B2C43F9A800E58A13 /* SetReadyInfoViewController.swift */; }; - A3DD9C5F2C441F8E00E58A13 /* SetReadyInfoViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3DD9C5E2C441F8E00E58A13 /* SetReadyInfoViewModel.swift */; }; A3DD9C622C455E3300E58A13 /* MeetingListService.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3DD9C612C455E3300E58A13 /* MeetingListService.swift */; }; A3FB184D2C3BF45F001483E5 /* MakeMeetingsRequestModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3FB184C2C3BF45F001483E5 /* MakeMeetingsRequestModel.swift */; }; A3FB184F2C3BF4BC001483E5 /* MakeMeetingsResponseModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3FB184E2C3BF4BB001483E5 /* MakeMeetingsResponseModel.swift */; }; @@ -115,15 +112,18 @@ DD4909962C440CDC003ED304 /* ArriveView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD4909952C440CDC003ED304 /* ArriveView.swift */; }; DD4909982C441215003ED304 /* TardyViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD4909972C441215003ED304 /* TardyViewModel.swift */; }; DD49099C2C441719003ED304 /* TardyService.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD49099B2C441719003ED304 /* TardyService.swift */; }; - DD86263E2C4481A700E4F980 /* EnterReadyInfoButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD8626362C4481A700E4F980 /* EnterReadyInfoButtonView.swift */; }; - DD86263F2C4481A700E4F980 /* ReadyPlanInfoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD8626372C4481A700E4F980 /* ReadyPlanInfoView.swift */; }; - DD8626402C4481A700E4F980 /* ReadyStatusView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD8626382C4481A700E4F980 /* ReadyStatusView.swift */; }; - DD8626412C4481A700E4F980 /* ReadyStatusButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD8626392C4481A700E4F980 /* ReadyStatusButton.swift */; }; - DD8626422C4481A700E4F980 /* ReadyStatusProgressView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD86263A2C4481A700E4F980 /* ReadyStatusProgressView.swift */; }; - DD8626432C4481A700E4F980 /* ReadyStatusViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD86263C2C4481A700E4F980 /* ReadyStatusViewController.swift */; }; - DD8626472C4505A900E4F980 /* ReadyStatusViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD8626462C4505A900E4F980 /* ReadyStatusViewModel.swift */; }; - DD86264A2C45072000E4F980 /* MockReadyStatusService.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD8626492C45072000E4F980 /* MockReadyStatusService.swift */; }; - DD86264D2C45D53D00E4F980 /* OurReadyStatusCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD86264C2C45D53D00E4F980 /* OurReadyStatusCollectionViewCell.swift */; }; + DD8626612C4606A300E4F980 /* SetReadyInfoViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD8626522C4606A300E4F980 /* SetReadyInfoViewModel.swift */; }; + DD8626622C4606A300E4F980 /* ReadyStatusViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD8626532C4606A300E4F980 /* ReadyStatusViewModel.swift */; }; + DD8626632C4606A300E4F980 /* EnterReadyInfoButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD8626552C4606A300E4F980 /* EnterReadyInfoButtonView.swift */; }; + DD8626642C4606A300E4F980 /* ReadyPlanInfoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD8626562C4606A300E4F980 /* ReadyPlanInfoView.swift */; }; + DD8626652C4606A300E4F980 /* OurReadyStatusCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD8626572C4606A300E4F980 /* OurReadyStatusCollectionViewCell.swift */; }; + DD8626662C4606A300E4F980 /* ReadyStatusView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD8626582C4606A300E4F980 /* ReadyStatusView.swift */; }; + DD8626672C4606A300E4F980 /* SetReadyInfoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD8626592C4606A300E4F980 /* SetReadyInfoView.swift */; }; + DD8626682C4606A300E4F980 /* ReadyStatusButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD86265A2C4606A300E4F980 /* ReadyStatusButton.swift */; }; + DD8626692C4606A300E4F980 /* ReadyStatusProgressView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD86265B2C4606A300E4F980 /* ReadyStatusProgressView.swift */; }; + DD86266A2C4606A300E4F980 /* MockReadyStatusService.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD86265D2C4606A300E4F980 /* MockReadyStatusService.swift */; }; + DD86266B2C4606A300E4F980 /* ReadyStatusViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD86265F2C4606A300E4F980 /* ReadyStatusViewController.swift */; }; + DD86266C2C4606A300E4F980 /* SetReadyInfoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD8626602C4606A300E4F980 /* SetReadyInfoViewController.swift */; }; DD931B6E2C3DA27F00526452 /* ParticipantCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD931B6D2C3DA27F00526452 /* ParticipantCollectionViewCell.swift */; }; DD931B762C3DC16100526452 /* PromiseInfoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD931B752C3DC16100526452 /* PromiseInfoView.swift */; }; DDA2EE732C385EB9007C6059 /* MainTabBarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDA2EE722C385EB9007C6059 /* MainTabBarController.swift */; }; @@ -218,9 +218,6 @@ A3DD9C362C41BAD000E58A13 /* MeetingListView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MeetingListView.swift; sourceTree = ""; }; A3DD9C382C41BAD000E58A13 /* MeetingListViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MeetingListViewController.swift; sourceTree = ""; }; A3DD9C3A2C41BAD000E58A13 /* MeetingListViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MeetingListViewModel.swift; sourceTree = ""; }; - A3DD9C592C43F99700E58A13 /* SetReadyInfoView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SetReadyInfoView.swift; sourceTree = ""; }; - A3DD9C5B2C43F9A800E58A13 /* SetReadyInfoViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SetReadyInfoViewController.swift; sourceTree = ""; }; - A3DD9C5E2C441F8E00E58A13 /* SetReadyInfoViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SetReadyInfoViewModel.swift; sourceTree = ""; }; A3DD9C612C455E3300E58A13 /* MeetingListService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MeetingListService.swift; sourceTree = ""; }; A3FB184C2C3BF45F001483E5 /* MakeMeetingsRequestModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MakeMeetingsRequestModel.swift; sourceTree = ""; }; A3FB184E2C3BF4BB001483E5 /* MakeMeetingsResponseModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MakeMeetingsResponseModel.swift; sourceTree = ""; }; @@ -265,15 +262,18 @@ DD4909952C440CDC003ED304 /* ArriveView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArriveView.swift; sourceTree = ""; }; DD4909972C441215003ED304 /* TardyViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TardyViewModel.swift; sourceTree = ""; }; DD49099B2C441719003ED304 /* TardyService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TardyService.swift; sourceTree = ""; }; - DD8626362C4481A700E4F980 /* EnterReadyInfoButtonView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EnterReadyInfoButtonView.swift; sourceTree = ""; }; - DD8626372C4481A700E4F980 /* ReadyPlanInfoView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReadyPlanInfoView.swift; sourceTree = ""; }; - DD8626382C4481A700E4F980 /* ReadyStatusView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReadyStatusView.swift; sourceTree = ""; }; - DD8626392C4481A700E4F980 /* ReadyStatusButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReadyStatusButton.swift; sourceTree = ""; }; - DD86263A2C4481A700E4F980 /* ReadyStatusProgressView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReadyStatusProgressView.swift; sourceTree = ""; }; - DD86263C2C4481A700E4F980 /* ReadyStatusViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReadyStatusViewController.swift; sourceTree = ""; }; - DD8626462C4505A900E4F980 /* ReadyStatusViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadyStatusViewModel.swift; sourceTree = ""; }; - DD8626492C45072000E4F980 /* MockReadyStatusService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockReadyStatusService.swift; sourceTree = ""; }; - DD86264C2C45D53D00E4F980 /* OurReadyStatusCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OurReadyStatusCollectionViewCell.swift; sourceTree = ""; }; + DD8626522C4606A300E4F980 /* SetReadyInfoViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SetReadyInfoViewModel.swift; sourceTree = ""; }; + DD8626532C4606A300E4F980 /* ReadyStatusViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReadyStatusViewModel.swift; sourceTree = ""; }; + DD8626552C4606A300E4F980 /* EnterReadyInfoButtonView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EnterReadyInfoButtonView.swift; sourceTree = ""; }; + DD8626562C4606A300E4F980 /* ReadyPlanInfoView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReadyPlanInfoView.swift; sourceTree = ""; }; + DD8626572C4606A300E4F980 /* OurReadyStatusCollectionViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OurReadyStatusCollectionViewCell.swift; sourceTree = ""; }; + DD8626582C4606A300E4F980 /* ReadyStatusView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReadyStatusView.swift; sourceTree = ""; }; + DD8626592C4606A300E4F980 /* SetReadyInfoView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SetReadyInfoView.swift; sourceTree = ""; }; + DD86265A2C4606A300E4F980 /* ReadyStatusButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReadyStatusButton.swift; sourceTree = ""; }; + DD86265B2C4606A300E4F980 /* ReadyStatusProgressView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReadyStatusProgressView.swift; sourceTree = ""; }; + DD86265D2C4606A300E4F980 /* MockReadyStatusService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MockReadyStatusService.swift; sourceTree = ""; }; + DD86265F2C4606A300E4F980 /* ReadyStatusViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReadyStatusViewController.swift; sourceTree = ""; }; + DD8626602C4606A300E4F980 /* SetReadyInfoViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SetReadyInfoViewController.swift; sourceTree = ""; }; DD931B6D2C3DA27F00526452 /* ParticipantCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ParticipantCollectionViewCell.swift; sourceTree = ""; }; DD931B752C3DC16100526452 /* PromiseInfoView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PromiseInfoView.swift; sourceTree = ""; }; DDA2EE722C385EB9007C6059 /* MainTabBarController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainTabBarController.swift; sourceTree = ""; }; @@ -556,22 +556,6 @@ path = Bundle; sourceTree = ""; }; - A3DD9C332C41BAD000E58A13 /* Cell */ = { - isa = PBXGroup; - children = ( - A3DD9C322C41BAD000E58A13 /* MeetingTableViewCell.swift */, - ); - path = Cell; - sourceTree = ""; - }; - A3DD9C352C41BAD000E58A13 /* Model */ = { - isa = PBXGroup; - children = ( - A3DD9C342C41BAD000E58A13 /* MeetingDummyModel.swift */, - ); - path = Model; - sourceTree = ""; - }; A3DD9C372C41BAD000E58A13 /* View */ = { isa = PBXGroup; children = ( @@ -607,14 +591,6 @@ path = MeetingList; sourceTree = ""; }; - A3DD9C5D2C441F6600E58A13 /* ViewModel */ = { - isa = PBXGroup; - children = ( - A3DD9C5E2C441F8E00E58A13 /* SetReadyInfoViewModel.swift */, - ); - path = ViewModel; - sourceTree = ""; - }; A3DD9C642C45B30600E58A13 /* Service */ = { isa = PBXGroup; children = ( @@ -778,26 +754,6 @@ path = Cell; sourceTree = ""; }; - DD3976952C41CC2200E2A4C4 /* ViewController */ = { - isa = PBXGroup; - children = ( - A3DD9C5B2C43F9A800E58A13 /* SetReadyInfoViewController.swift */, - DDAF1C882C3D6E3D008A37D3 /* ReadyStatusViewController.swift */, - ); - path = ViewController; - sourceTree = ""; - }; - DD3976962C41CC2C00E2A4C4 /* View */ = { - isa = PBXGroup; - children = ( - A3DD9C592C43F99700E58A13 /* SetReadyInfoView.swift */, - DD931B6A2C3D9EBB00526452 /* ReadyStatusView.swift */, - DD931B712C3DA92700526452 /* EnterReadyInfoButtonView.swift */, - DD931B732C3DAB9A00526452 /* ReadyPlanInfoView.swift */, - ); - path = View; - sourceTree = ""; - }; DD3976972C41CC3300E2A4C4 /* ViewController */ = { isa = PBXGroup; children = ( @@ -949,52 +905,55 @@ path = Service; sourceTree = ""; }; - DD8626322C4481A700E4F980 /* ReadyStatus */ = { + DD8626502C4606A300E4F980 /* ReadyStatus */ = { isa = PBXGroup; children = ( - DD86264B2C45075A00E4F980 /* Service */, - DD86263B2C4481A700E4F980 /* ViewController */, - DD8626482C4505AD00E4F980 /* ViewModel */, - DD8626352C4481A700E4F980 /* View */, + DD8626512C4606A300E4F980 /* ViewModel */, + DD8626542C4606A300E4F980 /* View */, + DD86265C2C4606A300E4F980 /* Service */, + DD86265E2C4606A300E4F980 /* ViewController */, ); path = ReadyStatus; sourceTree = ""; }; - DD8626352C4481A700E4F980 /* View */ = { + DD8626512C4606A300E4F980 /* ViewModel */ = { isa = PBXGroup; children = ( - DD8626382C4481A700E4F980 /* ReadyStatusView.swift */, - DD8626362C4481A700E4F980 /* EnterReadyInfoButtonView.swift */, - DD8626372C4481A700E4F980 /* ReadyPlanInfoView.swift */, - DD86263A2C4481A700E4F980 /* ReadyStatusProgressView.swift */, - DD8626392C4481A700E4F980 /* ReadyStatusButton.swift */, - DD86264C2C45D53D00E4F980 /* OurReadyStatusCollectionViewCell.swift */, + DD8626522C4606A300E4F980 /* SetReadyInfoViewModel.swift */, + DD8626532C4606A300E4F980 /* ReadyStatusViewModel.swift */, ); - path = View; + path = ViewModel; sourceTree = ""; }; - DD86263B2C4481A700E4F980 /* ViewController */ = { + DD8626542C4606A300E4F980 /* View */ = { isa = PBXGroup; children = ( - DD86263C2C4481A700E4F980 /* ReadyStatusViewController.swift */, + DD8626552C4606A300E4F980 /* EnterReadyInfoButtonView.swift */, + DD8626562C4606A300E4F980 /* ReadyPlanInfoView.swift */, + DD8626572C4606A300E4F980 /* OurReadyStatusCollectionViewCell.swift */, + DD8626582C4606A300E4F980 /* ReadyStatusView.swift */, + DD8626592C4606A300E4F980 /* SetReadyInfoView.swift */, + DD86265A2C4606A300E4F980 /* ReadyStatusButton.swift */, + DD86265B2C4606A300E4F980 /* ReadyStatusProgressView.swift */, ); - path = ViewController; + path = View; sourceTree = ""; }; - DD8626482C4505AD00E4F980 /* ViewModel */ = { + DD86265C2C4606A300E4F980 /* Service */ = { isa = PBXGroup; children = ( - DD8626462C4505A900E4F980 /* ReadyStatusViewModel.swift */, + DD86265D2C4606A300E4F980 /* MockReadyStatusService.swift */, ); - path = ViewModel; + path = Service; sourceTree = ""; }; - DD86264B2C45075A00E4F980 /* Service */ = { + DD86265E2C4606A300E4F980 /* ViewController */ = { isa = PBXGroup; children = ( - DD8626492C45072000E4F980 /* MockReadyStatusService.swift */, + DD86265F2C4606A300E4F980 /* ReadyStatusViewController.swift */, + DD8626602C4606A300E4F980 /* SetReadyInfoViewController.swift */, ); - path = Service; + path = ViewController; sourceTree = ""; }; DD865B652C3920F600C351A2 /* Onboarding */ = { @@ -1011,7 +970,6 @@ DD865B662C39210E00C351A2 /* Login */ = { isa = PBXGroup; children = ( - 78BD61212C440AC8005752FD /* Service */, 789873372C3D1B4800435E96 /* ViewController */, 789873362C3D1B3900435E96 /* VIewModel */, 789873352C3D1B3000435E96 /* View */, @@ -1019,16 +977,6 @@ path = Login; sourceTree = ""; }; - DD931B672C3D9D9C00526452 /* ReadyStatus */ = { - isa = PBXGroup; - children = ( - A3DD9C5D2C441F6600E58A13 /* ViewModel */, - DD3976952C41CC2200E2A4C4 /* ViewController */, - DD3976962C41CC2C00E2A4C4 /* View */, - ); - path = ReadyStatus; - sourceTree = ""; - }; DD931B682C3D9DAD00526452 /* Tardy */ = { isa = PBXGroup; children = ( @@ -1061,8 +1009,8 @@ isa = PBXGroup; children = ( DD39768D2C41CA0700E2A4C4 /* PagePromise */, - DD8626322C4481A700E4F980 /* ReadyStatus */, DD3976912C41CAF900E2A4C4 /* PromiseInfo */, + DD8626502C4606A300E4F980 /* ReadyStatus */, DD931B682C3D9DAD00526452 /* Tardy */, ); path = Promise; @@ -1512,18 +1460,17 @@ DD3976892C41C2AD00E2A4C4 /* TodayEmptyView.swift in Sources */, DD43937C2C412F4500EC1799 /* InviteCodeViewController.swift in Sources */, DD4393782C412F4500EC1799 /* CheckInviteCodeView.swift in Sources */, - DD8626422C4481A700E4F980 /* ReadyStatusProgressView.swift in Sources */, + DD8626622C4606A300E4F980 /* ReadyStatusViewModel.swift in Sources */, DE6D4D102C3F14D80005584B /* InvitationCodePopUpView.swift in Sources */, - DD8626432C4481A700E4F980 /* ReadyStatusViewController.swift in Sources */, DD30721A2C3C011600416D9F /* AddPromiseRequestModel.swift in Sources */, + DD8626682C4606A300E4F980 /* ReadyStatusButton.swift in Sources */, DE159D332C406E1600425101 /* MyPageContentView.swift in Sources */, DE6D4D112C3F14D80005584B /* MeetingInfoBannerView.swift in Sources */, DE6D4D122C3F14D80005584B /* MeetingInfoView.swift in Sources */, DD30721E2C3C0CC800416D9F /* PromiseInfoResponseModel.swift in Sources */, - 78BD61232C440AD5005752FD /* AuthService.swift in Sources */, - DD931B722C3DA92700526452 /* EnterReadyInfoButtonView.swift in Sources */, DD41BEFF2C41DAA40095A068 /* TardyEmptyView.swift in Sources */, A3FB18512C3BF531001483E5 /* RegisterMeetingsResquestModel.swift in Sources */, + DD8626632C4606A300E4F980 /* EnterReadyInfoButtonView.swift in Sources */, 789AD4B32C3C0093002E2688 /* SocialLoginResponseModel.swift in Sources */, DD43937F2C41357800EC1799 /* InviteCodeViewModel.swift in Sources */, DE9E188B2C3BC92500DB76B4 /* EmptyModel.swift in Sources */, @@ -1546,7 +1493,6 @@ DEF725DB2C3F3BBF008C87C7 /* Toast.swift in Sources */, 78BD61272C446A97005752FD /* LoginTargetType.swift in Sources */, DD43937A2C412F4500EC1799 /* FinishCreateViewController.swift in Sources */, - DD86264A2C45072000E4F980 /* MockReadyStatusService.swift in Sources */, DE254AAC2C31192400A4015E /* UILabel+.swift in Sources */, DE254AB72C3119D000A4015E /* ReuseIdentifiable.swift in Sources */, A3DD9C412C41BAD000E58A13 /* MeetingListViewModel.swift in Sources */, @@ -1574,14 +1520,14 @@ DD41BF012C41DE4F0095A068 /* TardyCollectionViewCell.swift in Sources */, DE9E189A2C3BCCBE00DB76B4 /* UtilsTemp.swift in Sources */, 782B407B2C3E395A008B0CA7 /* WelcomeView.swift in Sources */, + DD8626612C4606A300E4F980 /* SetReadyInfoViewModel.swift in Sources */, DD3072142C3BF87A00416D9F /* NearestPromiseResponseModel.swift in Sources */, + DD86266B2C4606A300E4F980 /* ReadyStatusViewController.swift in Sources */, 782B407F2C3E44B7008B0CA7 /* WelcomeViewModel.swift in Sources */, DD41BEFA2C41D4160095A068 /* TardyView.swift in Sources */, DD3072162C3BFE4E00416D9F /* UpcomingPromiseListResponseModel.swift in Sources */, A3FB18572C3BF704001483E5 /* MeetingListResponseModel.swift in Sources */, DE254AB22C31197B00A4015E /* UIButton+.swift in Sources */, - A3DD9C5F2C441F8E00E58A13 /* SetReadyInfoViewModel.swift in Sources */, - DD86263F2C4481A700E4F980 /* ReadyPlanInfoView.swift in Sources */, DE6D4D162C3F14D80005584B /* MeetingInfoViewController.swift in Sources */, DE159D322C406E1600425101 /* MyPageAlarmSettingView.swift in Sources */, 78B9286C2C29402C006D9942 /* AppDelegate.swift in Sources */, @@ -1591,28 +1537,27 @@ DD39768A2C41C2AD00E2A4C4 /* HomeViewController.swift in Sources */, DED5DBF42C34539A006ECE7E /* BaseTableViewCell.swift in Sources */, 78B9286E2C29402C006D9942 /* SceneDelegate.swift in Sources */, - DD8626472C4505A900E4F980 /* ReadyStatusViewModel.swift in Sources */, DD39766F2C41B54400E2A4C4 /* InviteCodeService.swift in Sources */, DE6D4D172C3F14D80005584B /* MeetingInfoViewModel.swift in Sources */, 78AED1372C3D98D1000AD80A /* NicknameView.swift in Sources */, - A3DD9C5C2C43F9A800E58A13 /* SetReadyInfoViewController.swift in Sources */, A3FB185B2C3BF7DF001483E5 /* MeetingMembersResponseModel.swift in Sources */, DD3072222C3C0DA300416D9F /* PromiseParticipantListResponseModel.swift in Sources */, DD3976862C41C2AD00E2A4C4 /* HomeView.swift in Sources */, + DD8626672C4606A300E4F980 /* SetReadyInfoView.swift in Sources */, DD41BEFC2C41D54D0095A068 /* TardyPenaltyView.swift in Sources */, 789873322C3D1A7B00435E96 /* LoginViewController.swift in Sources */, 782B40722C3DBFA3008B0CA7 /* ProfileSetupViewModel.swift in Sources */, - DDAF1C8F2C3D6E3D008A37D3 /* BasePromiseSegmentedControl.swift in Sources */, + DDAF1C8F2C3D6E3D008A37D3 /* PagePromiseSegmentedControl.swift in Sources */, DD49099C2C441719003ED304 /* TardyService.swift in Sources */, - 782B40722C3DBFA3008B0CA7 /* ProfileViewModel.swift in Sources */, + 782B40722C3DBFA3008B0CA7 /* ProfileSetupViewModel.swift in Sources */, DDAF1C8F2C3D6E3D008A37D3 /* PagePromiseSegmentedControl.swift in Sources */, DE32D1D22C3BF703006848DF /* LoginUserResponseModel.swift in Sources */, - DD86263E2C4481A700E4F980 /* EnterReadyInfoButtonView.swift in Sources */, + DD8626692C4606A300E4F980 /* ReadyStatusProgressView.swift in Sources */, DE9E18892C3BC91000DB76B4 /* ResponseBodyDTO.swift in Sources */, + DD8626642C4606A300E4F980 /* ReadyPlanInfoView.swift in Sources */, DD3976682C41769400E2A4C4 /* CreateMeetingViewModel.swift in Sources */, A3DD9C622C455E3300E58A13 /* MeetingListService.swift in Sources */, A3DD9C3D2C41BAD000E58A13 /* MeetingTableViewCell.swift in Sources */, - DD8626412C4481A700E4F980 /* ReadyStatusButton.swift in Sources */, DD39766B2C41995A00E2A4C4 /* FinishCreateNavigationView.swift in Sources */, DD3072202C3C0D4500416D9F /* MyReadyStatusResponseModel.swift in Sources */, DD931B6E2C3DA27F00526452 /* ParticipantCollectionViewCell.swift in Sources */, @@ -1620,24 +1565,25 @@ DD931B762C3DC16100526452 /* PromiseInfoView.swift in Sources */, DD3072242C3C0EB200416D9F /* MyPromiseReadyInfoRequestModel.swift in Sources */, DD3976872C41C2AD00E2A4C4 /* TodayPromiseView.swift in Sources */, - A3DD9C5A2C43F99800E58A13 /* SetReadyInfoView.swift in Sources */, 789873332C3D1A7B00435E96 /* LoginViewModel.swift in Sources */, 782B40752C3DBFBA008B0CA7 /* ProfileSetupView.swift in Sources */, - 782B40752C3DBFBA008B0CA7 /* ProfileView.swift in Sources */, - DD8626402C4481A700E4F980 /* ReadyStatusView.swift in Sources */, + 782B40752C3DBFBA008B0CA7 /* ProfileSetupView.swift in Sources */, DED5DBEE2C34529A006ECE7E /* BaseView.swift in Sources */, A3DD9C402C41BAD000E58A13 /* MeetingListViewController.swift in Sources */, A3DD9C3F2C41BAD000E58A13 /* MeetingListView.swift in Sources */, DE9E18802C3BA4AA00DB76B4 /* CustomButton.swift in Sources */, DE0137D32C43C5E50088C777 /* MyPageView.swift in Sources */, DD4909962C440CDC003ED304 /* ArriveView.swift in Sources */, + DD86266A2C4606A300E4F980 /* MockReadyStatusService.swift in Sources */, DE254AB02C31195B00A4015E /* NSAttributedString+.swift in Sources */, DD43937B2C412F4500EC1799 /* CreateMeetingViewController.swift in Sources */, - DD86264D2C45D53D00E4F980 /* OurReadyStatusCollectionViewCell.swift in Sources */, + DD86266C2C4606A300E4F980 /* SetReadyInfoViewController.swift in Sources */, DE8247FD2C36E7C7000601BC /* MoyaLoggingPlugin.swift in Sources */, + DD8626652C4606A300E4F980 /* OurReadyStatusCollectionViewCell.swift in Sources */, DDAF1C842C3D5D19008A37D3 /* ViewModelType.swift in Sources */, 78BD612B2C4550A6005752FD /* Bundle.swift in Sources */, DD3072262C3C0F0B00416D9F /* TardyInfoModel.swift in Sources */, + DD8626662C4606A300E4F980 /* ReadyStatusView.swift in Sources */, DE254AB92C311AB300A4015E /* Screen.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; From e6db3f7cc03b6d03b568dc979851398d97e06d84 Mon Sep 17 00:00:00 2001 From: youz2me Date: Tue, 16 Jul 2024 15:52:47 +0900 Subject: [PATCH 21/22] =?UTF-8?q?fix/#176=20=EB=A6=AC=EB=B7=B0=20=EB=B0=98?= =?UTF-8?q?=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PromiseParticipantListResponseModel.swift | 10 +- .../DTO/Model/Promises/TardyInfoModel.swift | 8 +- .../Model/Promises/TardyInfoModel.swift~HEAD | 22 ---- .../Promises/TardyInfoModel.swift~suyeon | 22 ---- .../PagePromiseSegmentedControl.swift~HEAD | 74 ------------ .../PagePromiseSegmentedControl.swift~suyeon | 74 ------------ .../PagePromiseViewController.swift~HEAD | 113 ------------------ .../PagePromiseViewController.swift~suyeon | 113 ------------------ .../ViewModel/PagePromiseViewModel.swift~HEAD | 17 --- .../PagePromiseViewModel.swift~suyeon | 17 --- 10 files changed, 16 insertions(+), 454 deletions(-) delete mode 100644 KkuMulKum/Network/DTO/Model/Promises/TardyInfoModel.swift~HEAD delete mode 100644 KkuMulKum/Network/DTO/Model/Promises/TardyInfoModel.swift~suyeon delete mode 100644 KkuMulKum/Source/Promise/PagePromise/View/PagePromiseSegmentedControl.swift~HEAD delete mode 100644 KkuMulKum/Source/Promise/PagePromise/View/PagePromiseSegmentedControl.swift~suyeon delete mode 100644 KkuMulKum/Source/Promise/PagePromise/ViewController/PagePromiseViewController.swift~HEAD delete mode 100644 KkuMulKum/Source/Promise/PagePromise/ViewController/PagePromiseViewController.swift~suyeon delete mode 100644 KkuMulKum/Source/Promise/PagePromise/ViewModel/PagePromiseViewModel.swift~HEAD delete mode 100644 KkuMulKum/Source/Promise/PagePromise/ViewModel/PagePromiseViewModel.swift~suyeon diff --git a/KkuMulKum/Network/DTO/Model/Promises/PromiseParticipantListResponseModel.swift b/KkuMulKum/Network/DTO/Model/Promises/PromiseParticipantListResponseModel.swift index d68591ff..eca46fd1 100644 --- a/KkuMulKum/Network/DTO/Model/Promises/PromiseParticipantListResponseModel.swift +++ b/KkuMulKum/Network/DTO/Model/Promises/PromiseParticipantListResponseModel.swift @@ -18,5 +18,13 @@ struct PromiseParticipantListModel: ResponseModelType { struct Participant: Codable { let participantId, memberId: Int let name, state: String - let profileImg: String? + let profileImageURL: String? + + enum CodingKeys: CodingKey { + case participantId + case memberId + case name + case state + case profileImageURL: "profileImg" + } } diff --git a/KkuMulKum/Network/DTO/Model/Promises/TardyInfoModel.swift b/KkuMulKum/Network/DTO/Model/Promises/TardyInfoModel.swift index fd0c4da5..eefc939d 100644 --- a/KkuMulKum/Network/DTO/Model/Promises/TardyInfoModel.swift +++ b/KkuMulKum/Network/DTO/Model/Promises/TardyInfoModel.swift @@ -18,5 +18,11 @@ struct TardyInfoModel: ResponseModelType { struct Comer: Codable { let participantId: Int - let name, profileImg: String + let name, profileImageURL: String + + enum CodingKeys: CodingKey { + case participantId + case name + case profileImageURL = "profileImg" + } } diff --git a/KkuMulKum/Network/DTO/Model/Promises/TardyInfoModel.swift~HEAD b/KkuMulKum/Network/DTO/Model/Promises/TardyInfoModel.swift~HEAD deleted file mode 100644 index fd0c4da5..00000000 --- a/KkuMulKum/Network/DTO/Model/Promises/TardyInfoModel.swift~HEAD +++ /dev/null @@ -1,22 +0,0 @@ -// -// PromiseLateInfoResponseModel.swift -// KkuMulKum -// -// Created by YOUJIM on 7/8/24. -// - - -// MARK: 약속 지각 상세 조회 - -import Foundation - -struct TardyInfoModel: ResponseModelType { - let penalty: String - let isPastDue: Bool - let lateComers: [Comer] -} - -struct Comer: Codable { - let participantId: Int - let name, profileImg: String -} diff --git a/KkuMulKum/Network/DTO/Model/Promises/TardyInfoModel.swift~suyeon b/KkuMulKum/Network/DTO/Model/Promises/TardyInfoModel.swift~suyeon deleted file mode 100644 index fd0c4da5..00000000 --- a/KkuMulKum/Network/DTO/Model/Promises/TardyInfoModel.swift~suyeon +++ /dev/null @@ -1,22 +0,0 @@ -// -// PromiseLateInfoResponseModel.swift -// KkuMulKum -// -// Created by YOUJIM on 7/8/24. -// - - -// MARK: 약속 지각 상세 조회 - -import Foundation - -struct TardyInfoModel: ResponseModelType { - let penalty: String - let isPastDue: Bool - let lateComers: [Comer] -} - -struct Comer: Codable { - let participantId: Int - let name, profileImg: String -} diff --git a/KkuMulKum/Source/Promise/PagePromise/View/PagePromiseSegmentedControl.swift~HEAD b/KkuMulKum/Source/Promise/PagePromise/View/PagePromiseSegmentedControl.swift~HEAD deleted file mode 100644 index 0fb91d7f..00000000 --- a/KkuMulKum/Source/Promise/PagePromise/View/PagePromiseSegmentedControl.swift~HEAD +++ /dev/null @@ -1,74 +0,0 @@ -// -// PagePromiseSegmentedControl.swift -// KkuMulKum -// -// Created by YOUJIM on 7/9/24. -// - -import UIKit - -import SnapKit - -class PagePromiseSegmentedControl: UISegmentedControl { - private let backgroundLineView: UIView = UIView(backgroundColor: .gray2) - - let selectedUnderLineView: UIView = UIView(backgroundColor: .black).then { - $0.layer.cornerRadius = 1 - } - - override init(items: [Any]?) { - super.init(items: items) - - setupSegment() - setupTextAttribute() - setupBackgroundLineView() - setupBackgroundAndDivider() - } - - required init?(coder: NSCoder) { - fatalError() - } - - private func setupSegment() { - addSubviews(backgroundLineView, selectedUnderLineView) - - selectedSegmentIndex = 0 - } - - private func setupBackgroundAndDivider() { - setBackgroundImage(UIImage(), for: .normal, barMetrics: .default) - setBackgroundImage(UIImage(), for: .selected, barMetrics: .default) - setBackgroundImage(UIImage(), for: .highlighted, barMetrics: .default) - - setDividerImage( - UIImage(), - forLeftSegmentState: .selected, - rightSegmentState: .normal, - barMetrics: .default - ) - } - - private func setupTextAttribute() { - setTitleTextAttributes([ - NSAttributedString.Key.foregroundColor: UIColor.gray3, - NSAttributedString.Key.font: UIFont.pretendard(.body05) - ], for: .normal) - setTitleTextAttributes([ - NSAttributedString.Key.foregroundColor: UIColor.black, - NSAttributedString.Key.font: UIFont.pretendard(.body05) - ], for: .selected) - } - - private func setupBackgroundLineView() { - backgroundLineView.snp.makeConstraints { - $0.bottom.leading.trailing.equalToSuperview() - $0.height.equalTo(2) - } - - selectedUnderLineView.snp.makeConstraints { - $0.bottom.leading.equalToSuperview() - $0.width.equalToSuperview().dividedBy(numberOfSegments) - $0.height.equalTo(backgroundLineView) - } - } -} diff --git a/KkuMulKum/Source/Promise/PagePromise/View/PagePromiseSegmentedControl.swift~suyeon b/KkuMulKum/Source/Promise/PagePromise/View/PagePromiseSegmentedControl.swift~suyeon deleted file mode 100644 index 0fb91d7f..00000000 --- a/KkuMulKum/Source/Promise/PagePromise/View/PagePromiseSegmentedControl.swift~suyeon +++ /dev/null @@ -1,74 +0,0 @@ -// -// PagePromiseSegmentedControl.swift -// KkuMulKum -// -// Created by YOUJIM on 7/9/24. -// - -import UIKit - -import SnapKit - -class PagePromiseSegmentedControl: UISegmentedControl { - private let backgroundLineView: UIView = UIView(backgroundColor: .gray2) - - let selectedUnderLineView: UIView = UIView(backgroundColor: .black).then { - $0.layer.cornerRadius = 1 - } - - override init(items: [Any]?) { - super.init(items: items) - - setupSegment() - setupTextAttribute() - setupBackgroundLineView() - setupBackgroundAndDivider() - } - - required init?(coder: NSCoder) { - fatalError() - } - - private func setupSegment() { - addSubviews(backgroundLineView, selectedUnderLineView) - - selectedSegmentIndex = 0 - } - - private func setupBackgroundAndDivider() { - setBackgroundImage(UIImage(), for: .normal, barMetrics: .default) - setBackgroundImage(UIImage(), for: .selected, barMetrics: .default) - setBackgroundImage(UIImage(), for: .highlighted, barMetrics: .default) - - setDividerImage( - UIImage(), - forLeftSegmentState: .selected, - rightSegmentState: .normal, - barMetrics: .default - ) - } - - private func setupTextAttribute() { - setTitleTextAttributes([ - NSAttributedString.Key.foregroundColor: UIColor.gray3, - NSAttributedString.Key.font: UIFont.pretendard(.body05) - ], for: .normal) - setTitleTextAttributes([ - NSAttributedString.Key.foregroundColor: UIColor.black, - NSAttributedString.Key.font: UIFont.pretendard(.body05) - ], for: .selected) - } - - private func setupBackgroundLineView() { - backgroundLineView.snp.makeConstraints { - $0.bottom.leading.trailing.equalToSuperview() - $0.height.equalTo(2) - } - - selectedUnderLineView.snp.makeConstraints { - $0.bottom.leading.equalToSuperview() - $0.width.equalToSuperview().dividedBy(numberOfSegments) - $0.height.equalTo(backgroundLineView) - } - } -} diff --git a/KkuMulKum/Source/Promise/PagePromise/ViewController/PagePromiseViewController.swift~HEAD b/KkuMulKum/Source/Promise/PagePromise/ViewController/PagePromiseViewController.swift~HEAD deleted file mode 100644 index 8bbbf92f..00000000 --- a/KkuMulKum/Source/Promise/PagePromise/ViewController/PagePromiseViewController.swift~HEAD +++ /dev/null @@ -1,113 +0,0 @@ -// -// PromiseViewController.swift -// KkuMulKum -// -// Created by YOUJIM on 7/9/24. -// - -import UIKit - -class PagePromiseViewController: BaseViewController { - private let promiseViewModel = PagePromiseViewModel() - - private let promiseViewControllerList: [BaseViewController] = [ - PromiseInfoViewController(), - ReadyStatusViewController(), - // TODO: 서버 연결 시 데이터 바인딩 필요 - TardyViewController( - tardyViewModel: TardyViewModel( - isPastDue: ObservablePattern(false), - hasTardy: ObservablePattern(false) - ) - ) - ] - - private lazy var promiseSegmentedControl = PagePromiseSegmentedControl( - items: ["약속 정보", "준비 현황", "지각 꾸물이"] - ) - - private let promisePageViewController = UIPageViewController( - transitionStyle: .scroll, - navigationOrientation: .vertical - ) - - override func setupView() { - view.backgroundColor = .white - - addChild(promisePageViewController) - - view.addSubviews( - promiseSegmentedControl, - promisePageViewController.view - ) - - promisePageViewController.setViewControllers( - [promiseViewControllerList[0]], - direction: .forward, - animated: true - ) - - promiseSegmentedControl.snp.makeConstraints { - $0.top.equalTo(view.safeAreaLayoutGuide) - $0.leading.trailing.equalToSuperview().inset(-6) - $0.height.equalTo(60) - } - - promisePageViewController.view.snp.makeConstraints { - $0.top.equalTo(promiseSegmentedControl.snp.bottom) - $0.leading.trailing.bottom.equalToSuperview() - } - } - - override func setupAction() { - promiseSegmentedControl.addTarget( - self, - action: #selector(didSegmentedControlIndexUpdated), - for: .valueChanged - ) - } - - override func setupDelegate() { - promisePageViewController.delegate = self - promisePageViewController.dataSource = self - } - - @objc private func didSegmentedControlIndexUpdated() { - let condition = promiseViewModel.currentPage.value <= promiseSegmentedControl.selectedSegmentIndex - let direction: UIPageViewController.NavigationDirection = condition ? .forward : .reverse - let (width, count, selectedIndex) = ( - promiseSegmentedControl.bounds.width, - promiseSegmentedControl.numberOfSegments, - promiseSegmentedControl.selectedSegmentIndex - ) - - promiseSegmentedControl.selectedUnderLineView.snp.updateConstraints { - $0.leading.equalToSuperview().offset((width / CGFloat(count)) * CGFloat(selectedIndex)) - } - - promiseViewModel.didSegmentIndexChanged( - index: promiseSegmentedControl.selectedSegmentIndex - ) - - promisePageViewController.setViewControllers([ - promiseViewControllerList[promiseViewModel.currentPage.value] - ], direction: direction, animated: false) - } -} - - -extension PagePromiseViewController: UIPageViewControllerDelegate, UIPageViewControllerDataSource { - func pageViewController( - _ pageViewController: UIPageViewController, - viewControllerAfter viewController: UIViewController - ) -> UIViewController? { - return nil - } - - func pageViewController( - _ pageViewController: UIPageViewController, - viewControllerBefore viewController: UIViewController - ) -> UIViewController? { - return nil - } -} diff --git a/KkuMulKum/Source/Promise/PagePromise/ViewController/PagePromiseViewController.swift~suyeon b/KkuMulKum/Source/Promise/PagePromise/ViewController/PagePromiseViewController.swift~suyeon deleted file mode 100644 index 8bbbf92f..00000000 --- a/KkuMulKum/Source/Promise/PagePromise/ViewController/PagePromiseViewController.swift~suyeon +++ /dev/null @@ -1,113 +0,0 @@ -// -// PromiseViewController.swift -// KkuMulKum -// -// Created by YOUJIM on 7/9/24. -// - -import UIKit - -class PagePromiseViewController: BaseViewController { - private let promiseViewModel = PagePromiseViewModel() - - private let promiseViewControllerList: [BaseViewController] = [ - PromiseInfoViewController(), - ReadyStatusViewController(), - // TODO: 서버 연결 시 데이터 바인딩 필요 - TardyViewController( - tardyViewModel: TardyViewModel( - isPastDue: ObservablePattern(false), - hasTardy: ObservablePattern(false) - ) - ) - ] - - private lazy var promiseSegmentedControl = PagePromiseSegmentedControl( - items: ["약속 정보", "준비 현황", "지각 꾸물이"] - ) - - private let promisePageViewController = UIPageViewController( - transitionStyle: .scroll, - navigationOrientation: .vertical - ) - - override func setupView() { - view.backgroundColor = .white - - addChild(promisePageViewController) - - view.addSubviews( - promiseSegmentedControl, - promisePageViewController.view - ) - - promisePageViewController.setViewControllers( - [promiseViewControllerList[0]], - direction: .forward, - animated: true - ) - - promiseSegmentedControl.snp.makeConstraints { - $0.top.equalTo(view.safeAreaLayoutGuide) - $0.leading.trailing.equalToSuperview().inset(-6) - $0.height.equalTo(60) - } - - promisePageViewController.view.snp.makeConstraints { - $0.top.equalTo(promiseSegmentedControl.snp.bottom) - $0.leading.trailing.bottom.equalToSuperview() - } - } - - override func setupAction() { - promiseSegmentedControl.addTarget( - self, - action: #selector(didSegmentedControlIndexUpdated), - for: .valueChanged - ) - } - - override func setupDelegate() { - promisePageViewController.delegate = self - promisePageViewController.dataSource = self - } - - @objc private func didSegmentedControlIndexUpdated() { - let condition = promiseViewModel.currentPage.value <= promiseSegmentedControl.selectedSegmentIndex - let direction: UIPageViewController.NavigationDirection = condition ? .forward : .reverse - let (width, count, selectedIndex) = ( - promiseSegmentedControl.bounds.width, - promiseSegmentedControl.numberOfSegments, - promiseSegmentedControl.selectedSegmentIndex - ) - - promiseSegmentedControl.selectedUnderLineView.snp.updateConstraints { - $0.leading.equalToSuperview().offset((width / CGFloat(count)) * CGFloat(selectedIndex)) - } - - promiseViewModel.didSegmentIndexChanged( - index: promiseSegmentedControl.selectedSegmentIndex - ) - - promisePageViewController.setViewControllers([ - promiseViewControllerList[promiseViewModel.currentPage.value] - ], direction: direction, animated: false) - } -} - - -extension PagePromiseViewController: UIPageViewControllerDelegate, UIPageViewControllerDataSource { - func pageViewController( - _ pageViewController: UIPageViewController, - viewControllerAfter viewController: UIViewController - ) -> UIViewController? { - return nil - } - - func pageViewController( - _ pageViewController: UIPageViewController, - viewControllerBefore viewController: UIViewController - ) -> UIViewController? { - return nil - } -} diff --git a/KkuMulKum/Source/Promise/PagePromise/ViewModel/PagePromiseViewModel.swift~HEAD b/KkuMulKum/Source/Promise/PagePromise/ViewModel/PagePromiseViewModel.swift~HEAD deleted file mode 100644 index eb68a471..00000000 --- a/KkuMulKum/Source/Promise/PagePromise/ViewModel/PagePromiseViewModel.swift~HEAD +++ /dev/null @@ -1,17 +0,0 @@ -// -// PromiseViewModel.swift -// KkuMulKum -// -// Created by YOUJIM on 7/9/24. -// - -import Foundation - - -class PagePromiseViewModel { - var currentPage = ObservablePattern(0) - - func didSegmentIndexChanged(index: Int) { - currentPage.value = index - } -} diff --git a/KkuMulKum/Source/Promise/PagePromise/ViewModel/PagePromiseViewModel.swift~suyeon b/KkuMulKum/Source/Promise/PagePromise/ViewModel/PagePromiseViewModel.swift~suyeon deleted file mode 100644 index eb68a471..00000000 --- a/KkuMulKum/Source/Promise/PagePromise/ViewModel/PagePromiseViewModel.swift~suyeon +++ /dev/null @@ -1,17 +0,0 @@ -// -// PromiseViewModel.swift -// KkuMulKum -// -// Created by YOUJIM on 7/9/24. -// - -import Foundation - - -class PagePromiseViewModel { - var currentPage = ObservablePattern(0) - - func didSegmentIndexChanged(index: Int) { - currentPage.value = index - } -} From 59c01f211d92d38d04a97465e59e980cb290f692 Mon Sep 17 00:00:00 2001 From: youz2me Date: Tue, 16 Jul 2024 19:15:59 +0900 Subject: [PATCH 22/22] =?UTF-8?q?fix/#186=20=EC=BB=A8=EB=B2=A4=EC=85=98?= =?UTF-8?q?=EC=97=90=20=EB=A7=9E=EA=B2=8C=20=EB=AA=A8=EB=8D=B8=EB=AA=85=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=ED=95=98=EA=B3=A0=20CodingKeys=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- KkuMulKum.xcodeproj/project.pbxproj | 22 +------------------ .../xcshareddata/xcschemes/KkuMulKum.xcscheme | 2 +- .../NearestPromiseResponseModel.swift | 13 ++++++++++- .../Promises/PromiseInfoResponseModel.swift | 12 +++++++++- .../PromiseParticipantListResponseModel.swift | 4 ++-- .../DTO/Model/Promises/TardyInfoModel.swift | 2 +- .../UpcomingPromiseListResponseModel.swift | 13 ++++++++++- .../Service/MockReadyStatusService.swift | 6 ++--- 8 files changed, 43 insertions(+), 31 deletions(-) diff --git a/KkuMulKum.xcodeproj/project.pbxproj b/KkuMulKum.xcodeproj/project.pbxproj index 07ae94ef..becf60a5 100644 --- a/KkuMulKum.xcodeproj/project.pbxproj +++ b/KkuMulKum.xcodeproj/project.pbxproj @@ -579,22 +579,6 @@ path = Service; sourceTree = ""; }; - A3DD9C332C41BAD000E58A13 /* Cell */ = { - isa = PBXGroup; - children = ( - A3DD9C322C41BAD000E58A13 /* MeetingTableViewCell.swift */, - ); - path = Cell; - sourceTree = ""; - }; - A3DD9C352C41BAD000E58A13 /* Model */ = { - isa = PBXGroup; - children = ( - A3DD9C342C41BAD000E58A13 /* MeetingDummyModel.swift */, - ); - path = Model; - sourceTree = ""; - }; A3DD9C372C41BAD000E58A13 /* View */ = { isa = PBXGroup; children = ( @@ -1430,7 +1414,7 @@ attributes = { BuildIndependentTargetsInParallel = 1; LastSwiftUpdateCheck = 1510; - LastUpgradeCheck = 1510; + LastUpgradeCheck = 1520; TargetAttributes = { 78B928672C29402C006D9942 = { CreatedOnToolsVersion = 15.1; @@ -1509,7 +1493,6 @@ DE6D4D112C3F14D80005584B /* MeetingInfoBannerView.swift in Sources */, DE6D4D122C3F14D80005584B /* MeetingInfoView.swift in Sources */, DD30721E2C3C0CC800416D9F /* PromiseInfoResponseModel.swift in Sources */, - DD931B722C3DA92700526452 /* EnterReadyInfoButtonView.swift in Sources */, DD41BEFF2C41DAA40095A068 /* TardyEmptyView.swift in Sources */, A3FB18512C3BF531001483E5 /* RegisterMeetingsResquestModel.swift in Sources */, DD8626632C4606A300E4F980 /* EnterReadyInfoButtonView.swift in Sources */, @@ -1593,8 +1576,6 @@ DDAF1C8F2C3D6E3D008A37D3 /* PagePromiseSegmentedControl.swift in Sources */, DD49099C2C441719003ED304 /* TardyService.swift in Sources */, 78BD61342C45B4A7005752FD /* AuthService.swift in Sources */, - 782B40722C3DBFA3008B0CA7 /* ProfileSetupViewModel.swift in Sources */, - DDAF1C8F2C3D6E3D008A37D3 /* PagePromiseSegmentedControl.swift in Sources */, DE32D1D22C3BF703006848DF /* LoginUserResponseModel.swift in Sources */, DD8626692C4606A300E4F980 /* ReadyStatusProgressView.swift in Sources */, DE9E18892C3BC91000DB76B4 /* ResponseBodyDTO.swift in Sources */, @@ -1612,7 +1593,6 @@ DD3976872C41C2AD00E2A4C4 /* TodayPromiseView.swift in Sources */, 789873332C3D1A7B00435E96 /* LoginViewModel.swift in Sources */, 782B40752C3DBFBA008B0CA7 /* ProfileSetupView.swift in Sources */, - 782B40752C3DBFBA008B0CA7 /* ProfileSetupView.swift in Sources */, DED5DBEE2C34529A006ECE7E /* BaseView.swift in Sources */, A3DD9C402C41BAD000E58A13 /* MeetingListViewController.swift in Sources */, A3DD9C3F2C41BAD000E58A13 /* MeetingListView.swift in Sources */, diff --git a/KkuMulKum.xcodeproj/xcshareddata/xcschemes/KkuMulKum.xcscheme b/KkuMulKum.xcodeproj/xcshareddata/xcschemes/KkuMulKum.xcscheme index 49144fa4..693399e7 100644 --- a/KkuMulKum.xcodeproj/xcshareddata/xcschemes/KkuMulKum.xcscheme +++ b/KkuMulKum.xcodeproj/xcshareddata/xcschemes/KkuMulKum.xcscheme @@ -1,6 +1,6 @@