之后的调用功能所以我只是想只要用户按下UITextField上的键返回,键盘就会隐藏,然后调用一个函数。现在我有:隐藏返回键[UITextField]上的键盘和
-(BOOL)textFieldShouldReturn:(UITextField *)textField
{
if(textField == _currentPasswordField)
{
[textField resignFirstResponder];
[_passwordField becomeFirstResponder];
return YES;
}
else if (textField == _passwordField)
{
[textField resignFirstResponder];
[_confirmPasswordField becomeFirstResponder];
return YES;
}
else
{
[textField resignFirstResponder];
[self changePassword];
return YES;
}
}
但是,整个changePassword函数返回后键盘被隐藏。我怎样才能隐藏它,然后打电话给我的功能?
谢谢!
'changePassword'做什么?运行需要很长时间吗?它是否提供用户界面? –
不显示UI ...只是调用我的服务器并尝试更改给定user_id的密码。 – abisson