Latest 1.2.1
Homepage https://github.com/devxoul/UITextView-Placeholder
License MIT
Platforms ios 6.0, requires ARC
Frameworks Foundation, UIKit
Authors

Build Status
CocoaPods

A missing placeholder for UITextView.

Installation

Use CocoaPods.

pod 'UITextView+Placeholder'

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.

  • Implement Objective-C:

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

    let textView = UITextView()
    textView.placeholder = "How are you?"
    textView.placeholderColor = UIColor.lightGray // optional
    textView.attributedPlaceholder = ... // NSAttributedString (optional)

Congratulations! You’re done. 🎉

License

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

Latest podspec

{
    "name": "UITextView+Placeholder",
    "version": "1.2.1",
    "summary": "A missing placeholder for UITextView.",
    "homepage": "https://github.com/devxoul/UITextView-Placeholder",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "devxoul": "[email protected]"
    },
    "source": {
        "git": "https://github.com/devxoul/UITextView-Placeholder.git",
        "tag": "1.2.1"
    },
    "platforms": {
        "ios": "6.0"
    },
    "requires_arc": true,
    "source_files": "Sources/UITextView+Placeholder.{h,m}",
    "frameworks": [
        "Foundation",
        "UIKit"
    ]
}

Pin It on Pinterest

Share This