From 5b710939f4d9e24ce6fd0538deea8d65ffc7defa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=EC=B1=84=EC=9D=80?= Date: Fri, 26 May 2023 14:52:59 +0900 Subject: [PATCH] =?UTF-8?q?Feat=20[#36]=20reviewVC=EC=99=80=20=EC=97=B0?= =?UTF-8?q?=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../project.pbxproj | 8 ++++---- .../Presentation/Chat/View/ChatHeader.swift | 1 - .../Chat/ViewController/ChatViewController.swift | 11 ++++++++++- .../Presentation/Review/ReviewViewController.swift | 14 ++++++++++++++ 4 files changed, 28 insertions(+), 6 deletions(-) create mode 100644 SOPT-32nd-APP4-CarrotiOS/SOPT-32nd-APP4-CarrotiOS/Presentation/Review/ReviewViewController.swift diff --git a/SOPT-32nd-APP4-CarrotiOS/SOPT-32nd-APP4-CarrotiOS.xcodeproj/project.pbxproj b/SOPT-32nd-APP4-CarrotiOS/SOPT-32nd-APP4-CarrotiOS.xcodeproj/project.pbxproj index 78b7341..ac3b57b 100644 --- a/SOPT-32nd-APP4-CarrotiOS/SOPT-32nd-APP4-CarrotiOS.xcodeproj/project.pbxproj +++ b/SOPT-32nd-APP4-CarrotiOS/SOPT-32nd-APP4-CarrotiOS.xcodeproj/project.pbxproj @@ -29,6 +29,7 @@ C32525252A17541A002629E0 /* ReceiveView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C32525242A17541A002629E0 /* ReceiveView.swift */; }; C32525272A176201002629E0 /* SendView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C32525262A176201002629E0 /* SendView.swift */; }; C36D9F9E2A174169006B155F /* GuideView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C36D9F9D2A174169006B155F /* GuideView.swift */; }; + C3D71D732A208075006222A4 /* ReviewViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3D71D722A208075006222A4 /* ReviewViewController.swift */; }; C3FFFB262A13394500FACA8E /* HeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3FFFB252A13394500FACA8E /* HeaderView.swift */; }; C3FFFB2A2A134E8400FACA8E /* ChatViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3FFFB292A134E8400FACA8E /* ChatViewController.swift */; }; C3FFFB2C2A134E9400FACA8E /* ChatHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3FFFB2B2A134E9400FACA8E /* ChatHeader.swift */; }; @@ -39,7 +40,6 @@ DF1841D52A11BD1C001A466A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DF1841D32A11BD1C001A466A /* LaunchScreen.storyboard */; }; DF1841F82A11C405001A466A /* Color.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF1841F72A11C405001A466A /* Color.swift */; }; DF1841FA2A11C40D001A466A /* UIFont+.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF1841F92A11C40D001A466A /* UIFont+.swift */; }; - DF1842022A11C433001A466A /* g.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF1842012A11C433001A466A /* g.swift */; }; DF1842042A11C43A001A466A /* h.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF1842032A11C43A001A466A /* h.swift */; }; DF1842062A11C445001A466A /* i.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF1842052A11C445001A466A /* i.swift */; }; DF18420A2A11C451001A466A /* k.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF1842092A11C451001A466A /* k.swift */; }; @@ -89,6 +89,7 @@ C32525242A17541A002629E0 /* ReceiveView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReceiveView.swift; sourceTree = ""; }; C32525262A176201002629E0 /* SendView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SendView.swift; sourceTree = ""; }; C36D9F9D2A174169006B155F /* GuideView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuideView.swift; sourceTree = ""; }; + C3D71D722A208075006222A4 /* ReviewViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReviewViewController.swift; sourceTree = ""; }; C3FFFB252A13394500FACA8E /* HeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HeaderView.swift; sourceTree = ""; }; C3FFFB292A134E8400FACA8E /* ChatViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatViewController.swift; sourceTree = ""; }; C3FFFB2B2A134E9400FACA8E /* ChatHeader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatHeader.swift; sourceTree = ""; }; @@ -101,7 +102,6 @@ DF1841D62A11BD1C001A466A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; DF1841F72A11C405001A466A /* Color.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Color.swift; sourceTree = ""; }; DF1841F92A11C40D001A466A /* UIFont+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIFont+.swift"; sourceTree = ""; }; - DF1842012A11C433001A466A /* g.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = g.swift; sourceTree = ""; }; DF1842032A11C43A001A466A /* h.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = h.swift; sourceTree = ""; }; DF1842052A11C445001A466A /* i.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = i.swift; sourceTree = ""; }; DF1842092A11C451001A466A /* k.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = k.swift; sourceTree = ""; }; @@ -341,7 +341,7 @@ DF1841E62A11C28F001A466A /* Review */ = { isa = PBXGroup; children = ( - DF1842012A11C433001A466A /* g.swift */, + C3D71D722A208075006222A4 /* ReviewViewController.swift */, ); path = Review; sourceTree = ""; @@ -562,6 +562,7 @@ DF18423A2A178028001A466A /* HomeHeaderView.swift in Sources */, 055970792A17FBE400868C42 /* SaleDummyTableViewCell.swift in Sources */, C3FFFB2A2A134E8400FACA8E /* ChatViewController.swift in Sources */, + C3D71D732A208075006222A4 /* ReviewViewController.swift in Sources */, DF1841FA2A11C40D001A466A /* UIFont+.swift in Sources */, DF1841F82A11C405001A466A /* Color.swift in Sources */, DF1842122A11C46D001A466A /* o.swift in Sources */, @@ -570,7 +571,6 @@ 057A0ACB2A1BB15A00F10B85 /* UIButton+.swift in Sources */, C36D9F9E2A174169006B155F /* GuideView.swift in Sources */, DF1842222A11F5A1001A466A /* Image.swift in Sources */, - DF1842022A11C433001A466A /* g.swift in Sources */, C3FFFB2E2A135E4A00FACA8E /* UILabel+.swift in Sources */, DF1842042A11C43A001A466A /* h.swift in Sources */, C312AB172A1FDD8500DA32EE /* String+.swift in Sources */, diff --git a/SOPT-32nd-APP4-CarrotiOS/SOPT-32nd-APP4-CarrotiOS/Presentation/Chat/View/ChatHeader.swift b/SOPT-32nd-APP4-CarrotiOS/SOPT-32nd-APP4-CarrotiOS/Presentation/Chat/View/ChatHeader.swift index 5a535ca..fbcdffa 100644 --- a/SOPT-32nd-APP4-CarrotiOS/SOPT-32nd-APP4-CarrotiOS/Presentation/Chat/View/ChatHeader.swift +++ b/SOPT-32nd-APP4-CarrotiOS/SOPT-32nd-APP4-CarrotiOS/Presentation/Chat/View/ChatHeader.swift @@ -122,7 +122,6 @@ extension ChatHeader { } private func setAddTarget() { - } func addBottomBorder(with color: UIColor?, andWidth borderWidth: CGFloat) { diff --git a/SOPT-32nd-APP4-CarrotiOS/SOPT-32nd-APP4-CarrotiOS/Presentation/Chat/ViewController/ChatViewController.swift b/SOPT-32nd-APP4-CarrotiOS/SOPT-32nd-APP4-CarrotiOS/Presentation/Chat/ViewController/ChatViewController.swift index fc24fa6..9b2f285 100644 --- a/SOPT-32nd-APP4-CarrotiOS/SOPT-32nd-APP4-CarrotiOS/Presentation/Chat/ViewController/ChatViewController.swift +++ b/SOPT-32nd-APP4-CarrotiOS/SOPT-32nd-APP4-CarrotiOS/Presentation/Chat/ViewController/ChatViewController.swift @@ -59,6 +59,7 @@ final class ChatViewController: UIViewController { setStyle() setDelegate() setLayout() + setAddTarget() setKeyboardObserver() hideKeyboardTappedAround() } @@ -66,6 +67,10 @@ final class ChatViewController: UIViewController { extension ChatViewController { + private func setAddTarget() { + chatHeader.reviewButton.addTarget(self, action: #selector(reviewButtonTapped), for: .touchUpInside) + } + private func setStyle() { view.backgroundColor = .white navigationController?.setNavigationBarHidden(true, animated: true) @@ -191,7 +196,6 @@ extension ChatViewController { private func chatData() { - //TODO: 이전 뷰에서 RoomId 받아옴 ChatService.shared.chat(chatRoomId: chatRoom) { response in switch response { case .success(let data): @@ -226,6 +230,11 @@ extension ChatViewController { } } } + + @objc func reviewButtonTapped() { + let reviewViewController = ReviewViewController() + self.navigationController?.pushViewController(reviewViewController, animated: true) + } } extension ChatViewController: HandleBackButtonDelegate { diff --git a/SOPT-32nd-APP4-CarrotiOS/SOPT-32nd-APP4-CarrotiOS/Presentation/Review/ReviewViewController.swift b/SOPT-32nd-APP4-CarrotiOS/SOPT-32nd-APP4-CarrotiOS/Presentation/Review/ReviewViewController.swift new file mode 100644 index 0000000..27037a0 --- /dev/null +++ b/SOPT-32nd-APP4-CarrotiOS/SOPT-32nd-APP4-CarrotiOS/Presentation/Review/ReviewViewController.swift @@ -0,0 +1,14 @@ +// +// ReviewViewController.swift +// SOPT-32nd-APP4-CarrotiOS +// +// Created by 정채은 on 2023/05/26. +// + +import UIKit + +class ReviewViewController: BaseViewController { + + + +}