https://github.com/swiftykit/swiftytextview
An iOS enhanced TextView with placeholder and limit characters count support
https://github.com/swiftykit/swiftytextview
cocapods counter draggable interface-builder ios mit-license placeholder swift swift4 swiftytextview textview uitextview
Last synced: 4 months ago
JSON representation
An iOS enhanced TextView with placeholder and limit characters count support
- Host: GitHub
- URL: https://github.com/swiftykit/swiftytextview
- Owner: SwiftyKit
- License: mit
- Created: 2018-07-09T02:46:13.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-06-23T08:17:09.000Z (over 3 years ago)
- Last Synced: 2025-04-13T14:08:07.430Z (7 months ago)
- Topics: cocapods, counter, draggable, interface-builder, ios, mit-license, placeholder, swift, swift4, swiftytextview, textview, uitextview
- Language: Swift
- Size: 341 KB
- Stars: 14
- Watchers: 0
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SwiftyTextView
[](https://doge.mit-license.org)
[](https://developer.apple.com/swift)
## Overview
SwiftyTextView is an iOS enhanced TextView with placeholder and limit characters count support.

## Installation
### CocoaPods
SwiftyTextView is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:
```ruby
pod 'SwiftyTextView'
```
### Manual
Drag 'n drop SwiftyTextView.swift into your project.
## Usage
### Interface Builder
Select the UITextView you want to use and change the class to SwiftyTextView.
- Placeholder text
- Placeholder color
- Limit number of characters
- Show text count view
You can see the changes directly on the Interface Builder!
### Code
```swift
let textView:SwiftyTextView = SwiftyTextView.init(frame: CGRect.init(x: X, y: Y, width: WIDTH, height: HEIGHT))
textView.backgroundColor = .red
textView.placeholder = "Please input text..."
textView.placeholderColor = UIColor.lightGray
textView.minNumberOfWords = 0
textView.maxNumberOfWords = 30
textView.showTextCountView = true
self.view.addSubview(txtfield)
```
## Requirements
- Swift 5.0+
- iOS 9.0+
## Contact & Contribute
- Feel free to contact me with ideas or suggestions at swiftykit@gmail.com
- Fork the project and make your own changes
## License
SwiftyTextView is available under the MIT license. See the LICENSE file for more info.