MarkupTextView
Dynamic textview with auto-resizing height & width that is also movable/draggable.
Requirements
iOS 13 or above
Installation
MarkupTextView is installed via the official Swift Package Manager.
Select Xcode
>File
> Swift Packages
>Add Package Dependency...
and add https://github.com/qkrtjrrnjs/MarkupTextView
.
Usage
-
First import MarkupTextView
import MarkupTextView
-
Implementation
let textView = MarkupTextView() textView.placeholder = "Enter Text" // Default: "Text" textView.placeholderColor = .systemGray // Default: .black textView.font = UIFont.systemFont(ofSize: 20) textView.borderColor = .systemGreen // Default: .systemBlue textView.drag = .always // Default: .always textView.maxHeight = 250 // Default: UIScreen.main.bounds.size.height textView.maxWidth = 250 // Default: UIScreen.main.bounds.size.width
License
MarkupTextView is under MIT license. See the LICENSE file for more information.