From 9fb168a6db074ed3c78221e8b42f7bc34ea3e2a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=EC=B1=84=EC=9D=80?= Date: Wed, 20 Sep 2023 15:46:06 -0400 Subject: [PATCH] =?UTF-8?q?Refactor=20[#242]=20StringLiterals=20=EC=82=AC?= =?UTF-8?q?=EC=9A=A9=20=EC=88=98=EC=A0=95=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- YELLO-iOS/YELLO-iOS/Global/Literals/String.swift | 4 +++- .../YELLO-iOS/Presentation/Inviting/InvitingView.swift | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/YELLO-iOS/YELLO-iOS/Global/Literals/String.swift b/YELLO-iOS/YELLO-iOS/Global/Literals/String.swift index 1a7052f1..11ce0bff 100644 --- a/YELLO-iOS/YELLO-iOS/Global/Literals/String.swift +++ b/YELLO-iOS/YELLO-iOS/Global/Literals/String.swift @@ -83,7 +83,9 @@ enum StringLiterals { static let secondText = "40분 대기 초기화 + 100포인트 지급!" static let toastMessage = "링크가 복사되었습니다." static let close = "닫기" - static let myRecommendCode = "내 천인 코드" + static let myRecommendCode = "내 추천인 코드" + static let copyStringHeader = "추천인코드: " + static let copyStringFooter = "\n\n우리 같이 YELL:O 해요!\nAndroid: https://play.google.com/store/apps/details?id=com.el.yello&hl=ko&gl=KR\niOS: https://apps.apple.com/app/id6451451050" } enum Recommending { diff --git a/YELLO-iOS/YELLO-iOS/Presentation/Inviting/InvitingView.swift b/YELLO-iOS/YELLO-iOS/Presentation/Inviting/InvitingView.swift index 91c8b871..30eb8eaa 100644 --- a/YELLO-iOS/YELLO-iOS/Presentation/Inviting/InvitingView.swift +++ b/YELLO-iOS/YELLO-iOS/Presentation/Inviting/InvitingView.swift @@ -169,6 +169,7 @@ final class InvitingView: BaseView { extension InvitingView { + // MARK: Objc function @objc func closeButtonClicked() { self.isHidden = true self.removeFromSuperview() @@ -204,11 +205,10 @@ extension InvitingView { } } - @objc - func copyButtonClicked() { + @objc func copyButtonClicked() { guard let recommender = self.recommenderID.text else { return } let filteredID = String(recommender.dropFirst()) - let recommenderID = "추천인코드: " + filteredID + "\n\n우리 같이 YELL:O 해요!\nAndroid: https://play.google.com/store/apps/details?id=com.el.yello&hl=ko&gl=KR\niOS: https://apps.apple.com/app/id6451451050" + let recommenderID = StringLiterals.Inviting.copyStringHeader + filteredID + StringLiterals.Inviting.copyStringFooter UIPasteboard.general.string = recommenderID print(UIPasteboard.general.string ?? "") updateEvent()