TextField没有代理方法可以实时检测输入的文字
[_countTextField addTarget:self action:@selector(textFieldDidChange:) forControlEvents:UIControlEventEditingChanged];
实现方法
- (void)textFieldDidChange:(UITextField *)textField
{
if (self.productCountBlock) {
self.productCountBlock([NSString stringWithFormat:@"%@",textField.text]);
}
}