커뮤니티 게시글 - 링크적용

This commit is contained in:
Yu Sung
2024-01-18 18:03:17 +09:00
parent 01833fbc1f
commit 6c152650a1
2 changed files with 31 additions and 12 deletions

View File

@@ -10,6 +10,8 @@ import UIKit
struct DetectableTextView: UIViewRepresentable {
var text: String
var textSize: CGFloat = 11.3
var font: String = Font.light.rawValue
func makeUIView(context: Context) -> UITextView {
let textView = UITextView()
@@ -17,7 +19,7 @@ struct DetectableTextView: UIViewRepresentable {
textView.backgroundColor = .clear
textView.isScrollEnabled = true
textView.dataDetectorTypes = .link
textView.font = UIFont(name: Font.light.rawValue, size: 11.3)
textView.font = UIFont(name: font, size: textSize)
textView.textColor = .white
textView.textContainer.lineFragmentPadding = 0
textView.textContainerInset = .zero