`
zhangziyangup
  • 浏览: 1078519 次
文章分类
社区版块
存档分类
最新评论

iphone获取每次输入的textfiled里的文字的委托方法。

 
阅读更多
- (BOOL) textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string
{
NSLog(@"when the user call the method the string is %@",string);
return YES;
}

string 就是每次输入的文字。

要判断输入了多少字符,可以判断range的属性。

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics