I have a textfield in a UITableViewCell
When I clicked in textfield directly this method is called:
-(void)editingChanged:(UITextField *)sender
this is my code in cellForRowAtIndexPath
[cell.ProductQuantityTextField addTarget:self action:@selector(editingChanged:)forControlEvents:UIControlEventEditingChanged];
-(void) editingChanged:(UITextField *)sender
{
NSLog( @"text changed: %@",cell.ProductQuantityTextField.text);
[self ProdcutDirectSetToCartAPICall];
}
I want that, when I click the textfield then I change the value of textfield and then I click done button of keyboard that time I want call UITextField method
the shouldReturn delegate method is what you are looking for:
- (BOOL)textFieldShouldReturn:(UITextField *)textField {
// do something
return YES;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With