From 9c049550afef14f2a4dc559c15b90a5cc5d772bb Mon Sep 17 00:00:00 2001 From: Yu Sung Date: Fri, 19 Jan 2024 16:16:26 +0900 Subject: [PATCH] =?UTF-8?q?=EC=BB=A4=EB=AE=A4=EB=8B=88=ED=8B=B0=20?= =?UTF-8?q?=EA=B8=80=20-=20=EC=A4=84=20=EA=B0=84=EA=B2=A9=200=20->=208=20?= =?UTF-8?q?=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sources/Live/Room/V2/Component/Text/TextView.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/SodaLive/Sources/Live/Room/V2/Component/Text/TextView.swift b/SodaLive/Sources/Live/Room/V2/Component/Text/TextView.swift index 3e49609..02f48c6 100644 --- a/SodaLive/Sources/Live/Room/V2/Component/Text/TextView.swift +++ b/SodaLive/Sources/Live/Room/V2/Component/Text/TextView.swift @@ -15,6 +15,13 @@ struct DetectableTextView: UIViewRepresentable { func makeUIView(context: Context) -> UITextView { let textView = UITextView() + _ = textView.layoutManager + var attributes = [NSAttributedString.Key: Any]() + let paragraphStyle: NSMutableParagraphStyle = NSMutableParagraphStyle() + paragraphStyle.lineSpacing = 8 + attributes[NSAttributedString.Key.paragraphStyle] = paragraphStyle + textView.typingAttributes = attributes + textView.isEditable = false // Make it readonly textView.backgroundColor = .clear textView.isScrollEnabled = true