Skip to content

Commit f686367

Browse files
committed
✨ [feat] AuthView 개인정보이용방침, 이용약관 링크 작업
1 parent 33c9590 commit f686367

File tree

1 file changed

+28
-13
lines changed

1 file changed

+28
-13
lines changed

Fitfty/Projects/Auth/Sources/Auth/AuthView.swift

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ final class AuthView: UIView {
1414
private let logoImageView = UIImageView()
1515
private let snsLabel = UILabel()
1616
private let snsImageStackView = UIStackView()
17-
private let acceptPrivacyLabel = UILabel()
17+
private let acceptPrivacyTextView = LinksTextView()
1818
private let kakaoButton = UIButton()
1919
private let appleButton = UIButton()
2020
private let enterWithoutLoginButton = UIButton()
@@ -47,11 +47,15 @@ final class AuthView: UIView {
4747
loginProblemButton.addTarget(target, action: action, for: .touchUpInside)
4848
}
4949

50+
func setAcceptPrivacyTextViewLinkAction(tapLink: @escaping (URL) -> Bool) {
51+
acceptPrivacyTextView.onLinkTap = tapLink
52+
}
53+
5054
private func configure() {
5155
configureLogoImageView()
5256
configureLoginProblemButton()
5357
configureEnterButtonWithoutLogin()
54-
configureAcceptPrivacyLabel()
58+
configureAcceptPrivacyTextView()
5559
configureSnsImageStackView()
5660
configureSnsLabel()
5761
}
@@ -100,23 +104,30 @@ final class AuthView: UIView {
100104
enterWithoutLoginButton.layer.borderWidth = Style.EnterWithoutLoginButton.borderWidth
101105
}
102106

103-
private func configureAcceptPrivacyLabel() {
104-
addSubviews(acceptPrivacyLabel)
107+
private func configureAcceptPrivacyTextView() {
108+
addSubviews(acceptPrivacyTextView)
105109
NSLayoutConstraint.activate([
106-
acceptPrivacyLabel.bottomAnchor.constraint(equalTo: enterWithoutLoginButton.topAnchor,
107-
constant: -Style.AcceptPrivacyLabel.margin),
108-
acceptPrivacyLabel.centerXAnchor.constraint(equalTo: centerXAnchor)
110+
acceptPrivacyTextView.bottomAnchor.constraint(equalTo: enterWithoutLoginButton.topAnchor,
111+
constant: -Style.AcceptPrivacyTextView.margin),
112+
acceptPrivacyTextView.centerXAnchor.constraint(equalTo: centerXAnchor)
113+
])
114+
115+
let termsOfUse = Style.AcceptPrivacyTextView.termsOfUse
116+
let privacy = Style.AcceptPrivacyTextView.privacy
117+
118+
acceptPrivacyTextView.font = Style.AcceptPrivacyTextView.font
119+
acceptPrivacyTextView.textColor = Style.AcceptPrivacyTextView.textColor.color
120+
acceptPrivacyTextView.text = "서비스 가입 시 \(termsOfUse)\(privacy)에 동의하게 돼요."
121+
acceptPrivacyTextView.addLinks([
122+
termsOfUse: Style.AcceptPrivacyTextView.termsOfUseLink,
123+
privacy: Style.AcceptPrivacyTextView.privacyLink
109124
])
110-
111-
acceptPrivacyLabel.text = Style.AcceptPrivacyLabel.text
112-
acceptPrivacyLabel.font = Style.AcceptPrivacyLabel.font
113-
acceptPrivacyLabel.textColor = Style.AcceptPrivacyLabel.textColor.color
114125
}
115126

116127
private func configureSnsImageStackView() {
117128
addSubviews(snsImageStackView)
118129
NSLayoutConstraint.activate([
119-
snsImageStackView.bottomAnchor.constraint(equalTo: acceptPrivacyLabel.topAnchor,
130+
snsImageStackView.bottomAnchor.constraint(equalTo: acceptPrivacyTextView.topAnchor,
120131
constant: -Style.SnsImageStackView.margin),
121132
snsImageStackView.centerXAnchor.constraint(equalTo: centerXAnchor)
122133
])
@@ -189,9 +200,13 @@ private extension AuthView {
189200
static let title = "둘러보기"
190201
}
191202

192-
enum AcceptPrivacyLabel {
203+
enum AcceptPrivacyTextView {
193204
static let margin: CGFloat = 20
194205
static let text = "서비스 가입 시 이용약관 및 개인정보취급방침에 동의하게 돼요."
206+
static let privacy = "개인정보이용방침"
207+
static let privacyLink = "https://maze-mozzarella-6e5.notion.site/ed1e98c3fee5417b89f85543f4a398d2"
208+
static let termsOfUse = "이용약관"
209+
static let termsOfUseLink = "https://maze-mozzarella-6e5.notion.site/dd559e6017ee499fa569148b8621966d"
195210
static let textColor = CommonAsset.Colors.gray04
196211
static let font = FitftyFont.appleSDBold(size: 12).font
197212
}

0 commit comments

Comments
 (0)