改变的iOS键盘动画时间 [英] Changing the iOS keyboard animation time
本文介绍了改变的iOS键盘动画时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有办法改变的iOS键盘动画所需的时间?
Is there a way to change the time the iOS keyboard animation takes?
推荐答案
其实我已经找到了一个更好的解决方案。你可以做的就是编程使文本框或TextView的动画中的第一个响应者与您所选择的时间。举例使得键盘出现一秒钟可能的过程:
I've actually found a better solution. What you can do is programmatically make the textfield or textview a first responder within an animation with duration of your choice. Example for making the keyboard emerge over the course of one second might be:
[UIView animateWithDuration:1.0 animations:^
{
[myTextField becomeFirstResponder];
}];
同样,可以使键盘消失是这样的:
Similarly, you can make the keyboard disappear like this:
[UIView animateWithDuration:1.0 animations:^
{
[myTextField resignFirstResponder];
}];
这篇关于改变的iOS键盘动画时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文