My Header file
MyClass.h
@interface MyClass : UIViewController<UITextFieldDelegate>
{
}
@property (retain, nonatomic) IBOutlet UITextField *customValue;
MyClass.m
- (void)viewDidLoad
{
customValue.delegate=self;
}
- (void)textFieldDidBeginEditing:(UITextField *)customValue
{
NSLog(@"custom tips value %@",customValue.text);
}
My NSLog is printing the message, but the customValue.text is not being displayed and is coming as null.
EDIT 1
I need to get the values that is entered in the textfiled as and when the user is enter the value
textFieldDidBeginEditingas it name indicates , it will work when you start editing on the textField.For accomplishing your requirement you need to use the
shouldChangeCharactersInRangedelegate method.textFieldDidBeginEditing:
textField:shouldChangeCharactersInRange:replacementString:
For more check UITextFieldDelegate