I have a textfield in the alertview called phoeNumberTF.
phoneNumberTF.delegate = self;
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Enter your phone number" message:nil preferredStyle:UIAlertControllerStyleAlert];
[alert addAction:[UIAlertAction
actionWithTitle:@"Send"
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action)
{
NSArray * textfields = alert.textFields;
phoneNumberTF = textfields[0];
[self sendPhoneNumber:phoneNumberTF.text];
}]];
shouldChangeCharactersInRange
delegate method is not getting called
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string
{
}