From 3bd53396345171c2134fcb0e81ee9b5ff5fea7dc Mon Sep 17 00:00:00 2001 From: hyun99999 Date: Mon, 3 Apr 2023 04:38:17 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20BackCardCell=20=EC=9D=98=20init=20?= =?UTF-8?q?=EB=A9=94=EC=84=9C=EB=93=9C=20=EB=B0=98=EC=98=81=20(#393)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CardCreationPreviewViewController.swift | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/NADA-iOS-forRelease/Sources/ViewControllers/CardCreation/VC/CardCreationPreviewViewController.swift b/NADA-iOS-forRelease/Sources/ViewControllers/CardCreation/VC/CardCreationPreviewViewController.swift index a71c436f..94cb57f7 100644 --- a/NADA-iOS-forRelease/Sources/ViewControllers/CardCreation/VC/CardCreationPreviewViewController.swift +++ b/NADA-iOS-forRelease/Sources/ViewControllers/CardCreation/VC/CardCreationPreviewViewController.swift @@ -14,11 +14,11 @@ class CardCreationPreviewViewController: UIViewController { public var frontCardDataModel: FrontCardDataModel? public var backCardDataModel: BackCardDataModel? public var cardBackgroundImage: UIImage? - public var defaultImageIndex: Int? + public var tasteInfo: [TasteInfo]? private var isFront = true - private var cardCreationRequest: CardCreationRequest? private var isShareable = false + private let cardType: String = "BASIC" lazy var loadingBgView: UIView = { let bgView = UIView(frame: CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: UIScreen.main.bounds.height)) @@ -180,16 +180,18 @@ extension CardCreationPreviewViewController { if isFront { guard let backCard = BackCardCell.nib().instantiate(withOwner: self, options: nil).first as? BackCardCell else { return } guard let backCardDataModel = backCardDataModel else { return } + guard let tasteInfo else { return } backCard.frame = CGRect(x: 0, y: 0, width: cardView.frame.width, height: cardView.frame.height) - backCard.initCell(cardBackgroundImage, - backCardDataModel.isMincho, - backCardDataModel.isSoju, - backCardDataModel.isBoomuk, - backCardDataModel.isSauced, - backCardDataModel.oneTMI, - backCardDataModel.twoTMI, - backCardDataModel.threeTMI, - isShareable: isShareable) + + var cardTasteInfo: [CardTasteInfo] = [] + + for index in 0..