Last active
August 29, 2015 13:56
-
-
Save jameswomack/9280991 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// NGViewController.h | |
// TextFieldChanges | |
// | |
// Created by James Womack on 2/28/14. | |
// Copyright (c) 2014 James Womack. All rights reserved. | |
// | |
#import <UIKit/UIKit.h> | |
@interface NGViewController : UIViewController | |
@property (weak, nonatomic) IBOutlet UITextField *correctableTextField; | |
@end | |
// | |
// NGViewController.m | |
// TextFieldChanges | |
// | |
// Created by James Womack on 2/28/14. | |
// Copyright (c) 2014 James Womack. All rights reserved. | |
// | |
#import "NGViewController.h" | |
@interface NGViewController () | |
@end | |
@implementation NGViewController | |
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
[[NSNotificationCenter defaultCenter] | |
addObserver:self | |
selector:@selector(textDidChange:) | |
name:UITextFieldTextDidChangeNotification | |
object:self.correctableTextField]; | |
} | |
- (void)textDidChange:(id)textInput | |
{ | |
NSLog(@"%@", self.correctableTextField.text); | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment