Dynamic textview with auto-resizing height & width that is also movable/draggable.
iOS 13 or above
MarkupTextView is installed via the official Swift Package Manager.
Select Xcode
>File
> Swift Packages
>Add Package Dependency...
and add https://github.com/qkrtjrrnjs/MarkupTextView
.
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
MarkupTextView is under MIT license. See the LICENSE file for more information.
link |
Stars: 2 |
Last commit: 2 years ago |
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics