라이브 UI 변경

This commit is contained in:
Yu Sung
2024-01-18 17:32:14 +09:00
parent 7ce5a36172
commit 01833fbc1f
37 changed files with 1763 additions and 1135 deletions

View File

@@ -0,0 +1,31 @@
//
// TextView.swift
// SodaLive
//
// Created by klaus on 2024/01/18.
//
import SwiftUI
import UIKit
struct DetectableTextView: UIViewRepresentable {
var text: String
func makeUIView(context: Context) -> UITextView {
let textView = UITextView()
textView.isEditable = false // Make it readonly
textView.backgroundColor = .clear
textView.isScrollEnabled = true
textView.dataDetectorTypes = .link
textView.font = UIFont(name: Font.light.rawValue, size: 11.3)
textView.textColor = .white
textView.textContainer.lineFragmentPadding = 0
textView.textContainerInset = .zero
return textView
}
func updateUIView(_ uiView: UITextView, context: Context) {
uiView.text = text
}
}