A missing placeholder for UILabel.
Use CocoaPods.
pod 'UILabel+YHPlaceholder'
#import "UILabel+YHPlaceholder.h"
Then create UILabel
and set placeholder
.
- Implement Objective-C:
UILabel *label = [[UILabel alloc] init];
label.placeholder = @"How are you?";
label.placeholderColor = UIColor.lightGrayColor; // optional
label.attributedPlaceholder = ... // NSAttributedString (optional)
- Storyboard:
UILabel+YHPlaceholder is under MIT license. See the LICENSE file for more information.