Swift 3.0 iOS 9.0+
PlaceholderTextView is available through Carthage. To install it, simply add the following line to your Cartfile:
github "yusayusa/PlaceholderTextView"
TODO
let textView: UITextView
// set placeholder
let attribute = NSAttributedString(string: "placeholder",
attributes: [NSFontAttributeName: UIFont.systemFont(ofSize: 15),
NSForegroundColorAttributeName: UIColor.gray,
])
textView.setPlaceholder(attribute: attribute)
PlaceholderTextView is released under the MIT license. Go read the LICENSE file for more information.