From 1c7727a73bd098229f3648a968678f9b74cdf226 Mon Sep 17 00:00:00 2001 From: ITlearning Date: Wed, 12 Jan 2022 12:15:21 +0900 Subject: [PATCH] =?UTF-8?q?#61=20-=20=EB=82=B4=20=EC=A0=95=EB=B3=B4=20?= =?UTF-8?q?=EC=A4=91=20=ED=8F=AC=ED=8A=B8=ED=8F=B4=EB=A6=AC=EC=98=A4,=20?= =?UTF-8?q?=ED=94=84=EB=A1=9C=EC=A0=9D=ED=8A=B8=20=EC=B6=94=EA=B0=80=20?= =?UTF-8?q?=EA=B0=80=EB=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Budi/Budi.xcodeproj/project.pbxproj | 8 ++++---- .../PortfolioViewController.swift | 7 +++---- .../Edit/MyBudiEditViewController.swift | 20 +++++++++++++------ 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/Budi/Budi.xcodeproj/project.pbxproj b/Budi/Budi.xcodeproj/project.pbxproj index dcbc48dd..a28f5537 100644 --- a/Budi/Budi.xcodeproj/project.pbxproj +++ b/Budi/Budi.xcodeproj/project.pbxproj @@ -1650,13 +1650,13 @@ CODE_SIGN_ENTITLEMENTS = Budi/Budi.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = V37X2D6JM3; + DEVELOPMENT_TEAM = ZMXTCSPNUZ; INFOPLIST_FILE = Budi/Resource/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = kr.dochoi.Budi; + PRODUCT_BUNDLE_IDENTIFIER = kr.dochoi.Budi2; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_VERSION = 5.0; @@ -1673,13 +1673,13 @@ CODE_SIGN_ENTITLEMENTS = Budi/Budi.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = V37X2D6JM3; + DEVELOPMENT_TEAM = ZMXTCSPNUZ; INFOPLIST_FILE = Budi/Resource/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = kr.dochoi.Budi; + PRODUCT_BUNDLE_IDENTIFIER = kr.dochoi.Budi2; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_VERSION = 5.0; diff --git a/Budi/Budi/Source/Login/ViewController/HistoryManagement/PortfolioViewController.swift b/Budi/Budi/Source/Login/ViewController/HistoryManagement/PortfolioViewController.swift index 59d7c58a..6eb9301b 100644 --- a/Budi/Budi/Source/Login/ViewController/HistoryManagement/PortfolioViewController.swift +++ b/Budi/Budi/Source/Login/ViewController/HistoryManagement/PortfolioViewController.swift @@ -10,7 +10,7 @@ import Combine import CombineCocoa protocol PortfolioViewControllerDelegate: AnyObject { - func getPortfolio(_ portfolio: SignupInfoModel) + func getPortfolio(_ portfolio: SignupInfoModel?) } class PortfolioViewController: UIViewController { @@ -67,7 +67,7 @@ class PortfolioViewController: UIViewController { guard let text = text else { return } guard var data = self?.viewModel.state.writedInfoData.value else { return } data.porflioLink = text - print(data.porflioLink) + print(data) self?.viewModel.state.writedInfoData.send(data) } @@ -78,8 +78,7 @@ class PortfolioViewController: UIViewController { .sink { [weak self] _ in guard let self = self else { return } if self.myBudiCoordinator != nil { - let send = self.viewModel.state.writedPortfolioData.value - print("입력받은 텍스트", send) + let send = self.viewModel.state.writedInfoData.value self.delegate?.getPortfolio(send) } else { self.viewModel.action.fetchSignupInfoData.send(()) diff --git a/Budi/Budi/Source/MyBudi/Edit/MyBudiEditViewController.swift b/Budi/Budi/Source/MyBudi/Edit/MyBudiEditViewController.swift index 402e3fae..f752cf87 100644 --- a/Budi/Budi/Source/MyBudi/Edit/MyBudiEditViewController.swift +++ b/Budi/Budi/Source/MyBudi/Edit/MyBudiEditViewController.swift @@ -49,6 +49,14 @@ final class MyBudiEditViewController: UIViewController { self?.modalViewBackgoundOff() } .store(in: &cancellables) + + viewModel.state.loginUserData + .receive(on: DispatchQueue.main) + .sink { [weak self] _ in + guard let self = self else { return } + // + } + .store(in: &cancellables) } func modalViewBackgoundOn() { @@ -252,7 +260,7 @@ extension MyBudiEditViewController: UITableViewDelegate, UITableViewDataSource { .receive(on: DispatchQueue.main) .sink { [weak self] _ in guard let self = self else { return } - self.coordinatzor?.showProjectViewController(self, viewModel: self.viewModel) + self.coordinator?.showProjectViewController(self, viewModel: self.viewModel) self.modalViewBackgoundOn() } .store(in: &cell.cancellables) @@ -330,11 +338,11 @@ extension MyBudiEditViewController: HistoryWriteViewControllerDelegate { } } - extension MyBudiEditViewController: PortfolioViewControllerDelegate { - func getPortfolio(_ portfolio: SignupInfoModel) { - var changeData = viewModel.state.loginUserData.value - print("입력받은 포트폴리오", portfolio) - + func getPortfolio(_ portfolio: SignupInfoModel?) { + guard var changeData = viewModel.state.loginUserData.value else { return } + changeData.portfolioList.append(portfolio?.porflioLink ?? "") + viewModel.state.loginUserData.send(changeData) + tableView.reloadData() } }