有没有一种方法可以更改 iOS 键盘动画所需的时间?
我实际上找到了一个更好的解决方案。您可以以编程方式使文本字段或文本视图在持续时间为您选择的动画中成为第一响应者。例如,让键盘在一秒钟内出现的示例可能是:
[UIView animateWithDuration:1.0 animations:^
{
[myTextField becomeFirstResponder];
}];
同样地,你可以像这样使键盘消失:
[UIView animateWithDuration:1.0 animations:^
{
[myTextField resignFirstResponder];
}];