A missing placeholder for UITextView.
Use CocoaPods.
pod 'UITextView+Placeholder'
Create UITextView
, then set placeholder
.
UITextView *textView = [[UITextView alloc] init];
textView.placeholder = @"How are you?";
textView.placeholderColor = [UIColor lightGrayColor]; // optional
Congratulations! You're done.
--
Since 1.1.0 you can use attributedPlaceholder
.
textView.attributedPlaceholder = ... // NSAttributedString
UITextView+Placeholder is under MIT license. See LICENSE for more information.