开发者

Changing the iOS keyboard animation time

Is there a way to chan开发者_JS百科ge the time the iOS keyboard animation takes?


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];
    }];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜