Skip to content

JiaqiSun/UITextView-Placeholder

 
 

Repository files navigation

UITextView+Placeholder

Build Status CocoaPods

A missing placeholder for UITextView.

Installation

Use CocoaPods.

pod 'UITextView+Placeholder', '~> 1.2'

Usage

  • Import Dynamic Framework:

    e.g. If you're using CocoaPods with use_frameworks! flag.

    @import UITextView_Placeholder;
  • Import Static Library:

    #import <UITextView+Placeholder/UITextView+Placeholder.h>

Then create UITextView and set placeholder.

UITextView *textView = [[UITextView alloc] init];
textView.placeholder = @"How are you?";
textView.placeholderColor = [UIColor lightGrayColor]; // optional
textView.attributedPlaceholder = ... // NSAttributedString (optional)

Congratulations! You're done. 🎉

License

UITextView+Placeholder is under MIT license. See the LICENSE file for more information.

About

A missing placeholder for UITextView.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 74.9%
  • Swift 22.3%
  • Ruby 2.8%