CocoaPods trunk is moving to be read-only. Read more on the blog, there are 18 months to go.

ESPPlaceholderTextView 1.0.3

ESPPlaceholderTextView 1.0.3

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Dec 2014

Maintained by Andre Espeiorin.



UITextView replacement that allows developers to add Placeholder behavior to TextViews without a single line of code:

Installation

Using

How use ESPPlaceholderTextView with Storyboard (Youtube Video)

How to Use ESPPlaceholderTextView in your code

Import Classes

#import <ESPPlaceholderTextView/ESPPlaceholderTextView.h>
#import <ESPPlaceholderTextView/ESPPlaceholderControl.h>

Create ESPPlaceholderTextView instance

self.textView = [[ESPPlaceholderTextView alloc] initWithFrame:CGRectMake(0.0, 0.0, 320.0, 200.0)];
self.textView.placeholder = @"Placeholder";
self.textView.placeholderColor = [UIColor lightGrayColor];

Create ESPPlaceholderControl instance

ESPPlaceholderControl *control = [[ESPPlaceholderControl alloc] init];

Connect both objects

control.owner = self.textView;
self.textView.delegate = control;

BONUS FEATURE

If you need (as always) to delegate UITextViewDelegate's methods for another object, you can assign this object to ESPPlaceholderControl targets.

control.targets = @[self];

They will work without any interference