我试图在单独的UILabel
上显示对UITextField
所做的更改。在用户输入每个字符后,是否有方法可以捕获UITextField
的全文?目前我正在使用这种方法,但它不捕获用户输入的最后一个字符。iPhone如何在输入时获取UITextField的文本?
我知道UITextView
有“didChange”方法,但我找不到UITextField
的方法。
//does not capture the last character
-(BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string
{
[self updateTextLabelsWithText: textField.text];
return YES;
}
我如何可以采取文字出来的UITextField的每个字符之后输入?
谢谢!
退房:http://stackoverflow.com/questions/388237/getting-the-value-of-a-uitextfield-as-keystrokes-are-entered – hanumanDev 2012-04-28 13:23:09