From 78274554b956ddcb68a8d6e0c56efb0265c66ec9 Mon Sep 17 00:00:00 2001 From: hyungyu Kim Date: Wed, 22 Dec 2021 02:51:47 +0900 Subject: [PATCH 1/3] =?UTF-8?q?[FIX]=20#195=20-=20=EB=AA=85=ED=95=A8?= =?UTF-8?q?=EC=83=9D=EC=84=B1=20userId=20=EC=B6=94=EA=B0=80=20=EB=B0=8F=20?= =?UTF-8?q?=EB=AF=B8=EB=A6=AC=EB=B3=B4=EA=B8=B0=20=ED=96=89=EA=B0=84=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../NetworkModel/Card/CardCreationRequest.swift | 1 + .../Sources/NetworkService/Card/CardService.swift | 2 ++ .../CardCreationPreviewViewController.swift | 12 +++++++++++- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/NADA-iOS-forRelease/Sources/NetworkModel/Card/CardCreationRequest.swift b/NADA-iOS-forRelease/Sources/NetworkModel/Card/CardCreationRequest.swift index 2681fac7..43d12cde 100644 --- a/NADA-iOS-forRelease/Sources/NetworkModel/Card/CardCreationRequest.swift +++ b/NADA-iOS-forRelease/Sources/NetworkModel/Card/CardCreationRequest.swift @@ -9,6 +9,7 @@ import Foundation // MARK: - CardCreation struct CardCreationRequest: Codable { + let userID: String let frontCard: FrontCardDataModel let backCard: BackCardDataModel } diff --git a/NADA-iOS-forRelease/Sources/NetworkService/Card/CardService.swift b/NADA-iOS-forRelease/Sources/NetworkService/Card/CardService.swift index 1b55bc4c..4cd95e8f 100644 --- a/NADA-iOS-forRelease/Sources/NetworkService/Card/CardService.swift +++ b/NADA-iOS-forRelease/Sources/NetworkService/Card/CardService.swift @@ -62,6 +62,8 @@ extension CardService: TargetType { var multiPartData: [Moya.MultipartFormData] = [] + let userIDData = request.userID.data(using: .utf8) ?? Data() + multiPartData.append(MultipartFormData(provider: .data(userIDData), name: "card.userId")) let defaultImageData = Int(request.frontCard.defaultImage).description.data(using: .utf8) ?? Data() multiPartData.append(MultipartFormData(provider: .data(defaultImageData), name: "card.defaultImage")) let titleData = request.frontCard.title.data(using: .utf8) ?? Data() diff --git a/NADA-iOS-forRelease/Sources/ViewControllers/CardCreation/CardCreationPreviewViewController.swift b/NADA-iOS-forRelease/Sources/ViewControllers/CardCreation/CardCreationPreviewViewController.swift index e9d1f823..121d0020 100644 --- a/NADA-iOS-forRelease/Sources/ViewControllers/CardCreation/CardCreationPreviewViewController.swift +++ b/NADA-iOS-forRelease/Sources/ViewControllers/CardCreation/CardCreationPreviewViewController.swift @@ -36,7 +36,10 @@ class CardCreationPreviewViewController: UIViewController { } @IBAction func touchCompleteButton(_ sender: Any) { guard let frontCardDataModel = frontCardDataModel, let backCardDataModel = backCardDataModel else { return } - cardCreationRequest = CardCreationRequest(frontCard: frontCardDataModel, backCard: backCardDataModel) + + guard let userID = UserDefaults.standard.string(forKey: Const.UserDefaults.userID) else { return } + + cardCreationRequest = CardCreationRequest(userID: userID, frontCard: frontCardDataModel, backCard: backCardDataModel) guard let cardCreationRequest = cardCreationRequest, let cardBackgroundImage = cardBackgroundImage else { return } @@ -55,6 +58,13 @@ extension CardCreationPreviewViewController { noticeLabel.font = .textRegular04 noticeLabel.textColor = .primary + + // TODO: - 행간 설정 +// let attributeString = NSMutableAttributedString(string: noticeLabel?.text ?? "") +// let paragraphStyle = NSMutableParagraphStyle() +// paragraphStyle.lineSpacing = 19 +// attributeString.addAttribute(NSAttributedString.Key.paragraphStyle, value: paragraphStyle, range: NSRange(location: 0, length: attributeString.length)) +// noticeLabel.attributedText = attributeString completeButton.titleLabel?.font = .button01 // MARK: - #available(iOS 15.0, *) From ae14f7b6713c6a19904dccf79d5bce5b86d6af47 Mon Sep 17 00:00:00 2001 From: hyungyu Kim Date: Wed, 22 Dec 2021 15:18:00 +0900 Subject: [PATCH 2/3] =?UTF-8?q?[FIX]=20#195=20-=20=EB=AA=85=ED=95=A8?= =?UTF-8?q?=EC=83=9D=EC=84=B1=20userId=20=EC=B6=94=EA=B0=80=20=EB=B0=8F=20?= =?UTF-8?q?=EB=AF=B8=EB=A6=AC=EB=B3=B4=EA=B8=B0=20=ED=96=89=EA=B0=84=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 행간 추가 - 글머리 기호 변경(저번 이슈에서 수정하지 못한 부분) --- .../Sources/Cells/CardCell/BackCardCell.swift | 6 +++--- .../CardCreationPreviewViewController.swift | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/NADA-iOS-forRelease/Sources/Cells/CardCell/BackCardCell.swift b/NADA-iOS-forRelease/Sources/Cells/CardCell/BackCardCell.swift index 3e3dbc58..e755e3e8 100644 --- a/NADA-iOS-forRelease/Sources/Cells/CardCell/BackCardCell.swift +++ b/NADA-iOS-forRelease/Sources/Cells/CardCell/BackCardCell.swift @@ -143,19 +143,19 @@ extension BackCardCell { UIImage(named: "iconTasteOnFried") : UIImage(named: "iconTasteOffFried") if !firstTMI.isEmpty { - firstTmiLabel.text = "● " + firstTMI + firstTmiLabel.text = "• " + firstTMI } else { firstTmiLabel.text = firstTMI } if !secondTMI.isEmpty { - secondTmiLabel.text = "● " + secondTMI + secondTmiLabel.text = "• " + secondTMI } else { secondTmiLabel.text = secondTMI } if !thirdTMI.isEmpty { - thirdTmiLabel.text = "● " + thirdTMI + thirdTmiLabel.text = "• " + thirdTMI } else { thirdTmiLabel.text = thirdTMI } diff --git a/NADA-iOS-forRelease/Sources/ViewControllers/CardCreation/CardCreationPreviewViewController.swift b/NADA-iOS-forRelease/Sources/ViewControllers/CardCreation/CardCreationPreviewViewController.swift index 121d0020..be616ca8 100644 --- a/NADA-iOS-forRelease/Sources/ViewControllers/CardCreation/CardCreationPreviewViewController.swift +++ b/NADA-iOS-forRelease/Sources/ViewControllers/CardCreation/CardCreationPreviewViewController.swift @@ -60,11 +60,11 @@ extension CardCreationPreviewViewController { noticeLabel.textColor = .primary // TODO: - 행간 설정 -// let attributeString = NSMutableAttributedString(string: noticeLabel?.text ?? "") -// let paragraphStyle = NSMutableParagraphStyle() -// paragraphStyle.lineSpacing = 19 -// attributeString.addAttribute(NSAttributedString.Key.paragraphStyle, value: paragraphStyle, range: NSRange(location: 0, length: attributeString.length)) -// noticeLabel.attributedText = attributeString + let attributeString = NSMutableAttributedString(string: noticeLabel?.text ?? "") + let paragraphStyle = NSMutableParagraphStyle() + paragraphStyle.lineSpacing = 19 + attributeString.addAttribute(NSAttributedString.Key.paragraphStyle, value: paragraphStyle, range: NSRange(location: 0, length: attributeString.length)) + noticeLabel.attributedText = attributeString completeButton.titleLabel?.font = .button01 // MARK: - #available(iOS 15.0, *) From 93babed9fa2e27b2d1cc5bf65027a79b2e92c35b Mon Sep 17 00:00:00 2001 From: hyungyu Kim Date: Wed, 22 Dec 2021 16:26:41 +0900 Subject: [PATCH 3/3] =?UTF-8?q?[FIX]=20#195=20-=20=EB=AA=85=ED=95=A8?= =?UTF-8?q?=EC=83=9D=EC=84=B1=20userId=20=EC=B6=94=EA=B0=80=20=EB=B0=8F=20?= =?UTF-8?q?=EB=AF=B8=EB=A6=AC=EB=B3=B4=EA=B8=B0=20=ED=96=89=EA=B0=84=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 행간 수정 --- .../Storyboards/CardCreation/CardCreationPreview.storyboard | 4 ++-- .../CardCreation/CardCreationPreviewViewController.swift | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/NADA-iOS-forRelease/Resouces/Storyboards/CardCreation/CardCreationPreview.storyboard b/NADA-iOS-forRelease/Resouces/Storyboards/CardCreation/CardCreationPreview.storyboard index 2542eaac..8adca36a 100644 --- a/NADA-iOS-forRelease/Resouces/Storyboards/CardCreation/CardCreationPreview.storyboard +++ b/NADA-iOS-forRelease/Resouces/Storyboards/CardCreation/CardCreationPreview.storyboard @@ -47,8 +47,8 @@ -