Latest 1.2.0
Homepage https://github.com/mtrudel/MTTextViewController
License MIT
Platforms ios 7.0, requires ARC
Authors

A simple delegate-based controller for presenting editable text on iOS.

Usage

In your presenting view controller, do:


- (IBAction)editNote {
  MTTextViewController *textViewController = [[MTTextViewController alloc] initWithText:self.noteText];
  textViewController.title = @"Edit Note";
  textViewController.delegate = self;
  // You can also push it on a navigation controller if you'd like
  [self presentViewController:[[UINavigationController alloc] initWithRootViewController:textViewController] animated:YES completion:nil];
}

- (void)textViewControllerDidFinish:(MTTextViewController *)controller {
  self.noteText = controller.text;
  [self dismissViewControllerAnimated:YES completion:nil];
}

- (void)textViewControllerDidCancel:(MTTextViewController *)controller {
  [self dismissViewControllerAnimated:YES completion:nil];
}

Requirements

iOS 7 or greater.

Installation

MTTextViewController is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "MTTextViewController"

Author

Mat Trudel, [email protected]

License

MTTextViewController is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "MTTextViewController",
    "version": "1.2.0",
    "summary": "A simple delegate based text entry view controller",
    "homepage": "https://github.com/mtrudel/MTTextViewController",
    "license": "MIT",
    "authors": {
        "Mat Trudel": "[email protected]"
    },
    "source": {
        "git": "https://github.com/mtrudel/MTTextViewController.git",
        "tag": "1.2.0"
    },
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes"
}

Pin It on Pinterest

Share This