Swiftpack.co - mshibanami/ResizingTextView as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by mshibanami.
mshibanami/ResizingTextView 1.4.8
Selectable, singleline/multiline, (non)self-resizing, (non)scrollable, (un)editable text view for iOS and macOS.
⭐️ 0
🕓 5 days ago
iOS macOS
.package(url: "https://github.com/mshibanami/ResizingTextView.git", from: "1.4.8")

ResizingTextView

This is a SwiftUI resizing text view for iOS and macOS.

Usage

// Resizing automatically
ResizingTextView(
    text: $text1,
    isScrollable: true,
    canHaveNewLineCharacters: true)

// Fixed-height, newline characters not allowed
ResizingTextView(
    text: $text2,
    placeholder: "Placeholder",
    isScrollable: true,
    canHaveNewLineCharacters: false)

// Uneditable, selectable, color/font changed
ResizingTextView(
    text: $text3,
    isEditable: false,
    font: .boldSystemFont(ofSize: 16),
    foregroundColor: .magenta)

// Uneditable, selectable, max 2 lines
ResizingTextView(
    text: .constant("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."),
    isEditable: false,
    lineLimit: 2)

Demo

iOS

https://user-images.githubusercontent.com/1333214/184529544-7165dea5-4d51-40b3-a2de-d887aa24a5a4.mov

macOS

https://user-images.githubusercontent.com/1333214/184529535-ce92376b-ad31-47e5-8a0a-f79f60068ff5.mov

Apps that use this package

GitHub

link
Stars: 0
Last commit: 5 days ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics