UITextView刚刚进入SwiftUI世界
多行文本视图
UITextView刚刚进入SwiftUI世界!👀
如何使用
您可以像使用任何其他 SwiftUI 视图一样使用:MultilineTextView
MultilineTextView(
text: "Multiple lines of text with some links, e.g. https://www.google.com, which should be broken into multiple lines at the end of the screen. I just add some more words to make sure that even on larger devices that can be tested too. And here is another link https://www.facebook.com too",
textViewProperties: .init(
textColor: .red,
linkColor: .orange,
textFont: .boldSystemFont(ofSize: 12),
linkFont: .italicSystemFont(ofSize: 12),
accessibilityIdentifier: "accessibilityIdentifier",
textAlignment: .justified
)
)
For details see the Example app.