Skip to content

Commit

Permalink
feat: 명함 미리보기에서 기본/덕질/직장 명함 앞면 구성 (TeamNADA#450)
Browse files Browse the repository at this point in the history
  • Loading branch information
hyun99999 committed Apr 24, 2023
1 parent 79463bd commit 8e62ca4
Showing 1 changed file with 9 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,27 +120,23 @@ extension CardCreationPreviewViewController {
frontCard.frame = CGRect(x: 0, y: 0, width: cardView.frame.width, height: cardView.frame.height)

guard let frontCardDataModel = frontCardDataModel else { return }
frontCard.initCell(cardBackgroundImage,
frontCardDataModel.cardName,
frontCardDataModel.departmentName ?? "",
frontCardDataModel.userName,
frontCardDataModel.birth,
frontCardDataModel.mbti ?? "",
frontCardDataModel.instagram ?? "",
frontCardDataModel.phoneNumber ?? "",
frontCardDataModel.urls?[0] ?? "",
isShareable: isShareable)
frontCard.initCell(cardBackgroundImage, frontCardDataModel)

cardView.addSubview(frontCard)
case .company:
return
guard let frontCard = CompanyFrontCardCell.nib().instantiate(withOwner: self, options: nil).first as? CompanyFrontCardCell else { return }
frontCard.frame = CGRect(x: 0, y: 0, width: cardView.frame.width, height: cardView.frame.height)

guard let frontCardDataModel = frontCardDataModel else { return }
frontCard.initCell(cardBackgroundImage, frontCardDataModel)

cardView.addSubview(frontCard)
case .fan:
guard let frontCard = FanFrontCardCell.nib().instantiate(withOwner: self, options: nil).first as? FanFrontCardCell else { return }
frontCard.frame = CGRect(x: 0, y: 0, width: cardView.frame.width, height: cardView.frame.height)

guard let frontCardDataModel = frontCardDataModel else { return }
frontCard.initCell(cardBackgroundImage,
frontCardDataModel: frontCardDataModel)
frontCard.initCell(cardBackgroundImage, frontCardDataModel)

cardView.addSubview(frontCard)
}
Expand Down

0 comments on commit 8e62ca4

Please sign in to comment.