Latest 0.1.0
License MIT
Platforms ios

A UIControl-like API addition to UITextView.

Build Status


UITextField is a UIControl, so it exposes a target-action interface for various events. UITextView+APSUIControlTargetAction.h adds the same interface, allowing arbitrary target-actions to subscribe to the following events:

  • UIControlEventEditingDidBegin
  • UIControlEventEditingChanged
  • UIControlEventEditingDidEnd

For example:

#import "ExampleViewController.h"
#import <UITextView+UIControl/UITextView+APSUIControlTargetAction.h>

@interface ExampleViewController ()

@property (nonatomic, strong) UITextView *textView;


@implementation ExampleViewController

- (void)viewDidLoad
    [super viewDidLoad];

    [self.textView addTarget:self action:@selector(textViewDidChange:) forControlEvents:UIControlEventEditingChanged];

- (void)textViewDidChange:(UITextView *)sender
    NSLog(@"%s, text view text: %@", __PRETTY_FUNCTION__, sender.text);


UITextView target-action screencast


Use CocoaPods and add UITextView+UIControl to your Podfile:

pod 'UITextView+UIControl', '~> 0.1.0'

Or install manually by copying everying from Classes/ into your Xcode project.


A big chunk of the work was done during the Back on the Map Objective-c Hackathon.

Latest podspec

    "name": "UITextView+UIControl",
    "summary": "A UIControl-like API addition to UITextView.",
    "homepage": "",
    "source": {
        "git": "",
        "tag": "0.1.0"
    "version": "0.1.0",
    "authors": {
        "Andrew Sardone": "[email protected]"
    "license": "MIT",
    "source_files": "Classes",
    "platforms": {
        "ios": null
    "requires_arc": false

Pin It on Pinterest

Share This