Skip to content

stateman92/MultilineTextView

Repository files navigation

MultilineTextView

UITextView has just entered the SwiftUI world! ๐Ÿ‘€

Setup

Add the following to Package.swift:

.package(url: "https://github.com/stateman92/MultilineTextView", exact: .init(0, 0, 6))

Or add the package in Xcode.

Usage

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.

Example

Example

About

UITextView has just entered the SwiftUI world! ๐Ÿ‘€

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages