UIScrollView - 像iOS 7邮件应用程序一样用触摸拖动键盘? [英] UIScrollView - Move keyboard with touch drag like iOS 7 mail app?

查看:89
本文介绍了UIScrollView - 像iOS 7邮件应用程序一样用触摸拖动键盘?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很好奇iOS 7邮件应用程序如何根据用户在新邮件屏幕上的触摸拖动来移动和解除键盘。

I'm curious how iOS 7 mail app is moving and dismissing the keyboard according to user's touch drag on new message screen.

此外,它还在评论界面上实现Instagram app。

Also it's implemented on comments screen of instagram app.

是否可以通过公共API实现?

Can it be implemented through public apis?

推荐答案

UIScrollView 有一个名为 keyboardDismissMode 的属性,允许您设置不同的行为。我想这就是你想要的:

UIScrollView has a property called keyboardDismissMode that allows you to set different behaviours. I think this is what you want:

scrollview.keyboardDismissMode = UIScrollViewKeyboardDismissModeInteractive;

这篇关于UIScrollView - 像iOS 7邮件应用程序一样用触摸拖动键盘?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆