Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
GCPTextView is a subclass of UITextView that provides placeholder support.
Objective-C
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
GCPTextView
README.md

README.md

GCPTextView

GCPTextView is a subclass of UITextView that provides placeholder support and feedback about content height.

Usage

Simply add the files to your XCode project. If you are using Interface Builder, change the class type of any textViews to GCPTextView, and set the file's owner as the delegate, if desired.

An optional delegate that conforms to the <GCPTextViewDelegate> protocol may be assigned. The <GCPTextViewDelegate> protocol itself conforms to <UITextViewDelegate>

The color of the placeholder text defaults to a light gray, but can be changed using the setPlaceholderColor color method.

Delegate Methods

  • backspaceDidOccurInEmptyField
  • textView:(GCPTextView *)textView contentHeightDidChange:(CGFloat)height;

Methods

  • setDelegate:(id)delegate
  • setPlaceholder:(NSString *)placeholder
  • setPlaceholderColor:(UIColor *)color
  • placeholderIsVisible;
  • (CGFloat)contentHeight;

License

GCPTextView is available under the MIT license.

Something went wrong with that request. Please try again.