如何验证UITextField的内容?
|
将文本从UITeField发布到PHP时,如果我留有空格或使用奇怪的符号(例如,!,@,#,^,&,{} ...),我会遇到问题。
我可以阻止IBaction不要将无用的文本发送到服务器吗?
- (IBAction)sendeTextToServer:(id)sender{
if(textfield.text has any space or other symbols inside){
//Block the text send to server
}
else
//Send the text to server to do something.
}
如何验证UITextField的内容?
没有找到相关结果
已邀请:
1 个回复
盛虱