Swift 3.0 iOS 8.0+
HighlightTextView is available through Carthage. To install it, simply add the following line to your Cartfile:
github "yusayusa/HighlightTextView"
TODO
let textView: UITextView
// set condition (maximum character limit and background color, minimum character limit and background color)
let condition = Condition(range: Range(uncheckedBounds: (lower: 20, upper: 50)),
minHighlightColor: UIColor.gray,
maxHighlightColor: UIColor.red)
textView.setHighlight(condition: condition)
HighlightTextView is released under the MIT license. Go read the LICENSE file for more information.