cgossain / SAMTextView

Add a placeholder to UITextView.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SAMTextView

Add a placeholder to UITextView.

SAMTextView is tested on iOS 6 and requires ARC. Released under the MIT license.

Usage

// Initialize a text view
SAMTextView *textView = [[SAMTextView alloc] initWithFrame:CGRectMake(20.0f, 20.0f, 280.0f, 280.0f)];

// Add a placeholder
textView.placeholder = @"Type something…";

For more advanced control of the placeholder, you can set the attributedPlaceholder property instead. See the header for full documentation.

Installation

Simply add the files in the SAMTextView.h and SAMTextView.m to your project or add SAMTextView to your Podfile if you're using CocoaPods.

About

Add a placeholder to UITextView.

License:MIT License


Languages

Language:Objective-C 90.7%Language:Ruby 9.3%