滚动时在textview中关闭键盘

时间:2016-05-04 12:56:58

标签: ios textview keyboard-events

我是IOS的新手,我尝试了很多,但在用户触摸任何textview键盘时滚动时仍然无法显示返回不起作用。

我输出屏幕的截图:

this github issue

2 个答案:

答案 0 :(得分:5)

您可以在Tableview上使用关闭拖动选项来关闭键盘。

scrollView.keyboardDismissMode = UIScrollViewKeyboardDismissModeOnDrag;

enter image description here

答案 1 :(得分:0)

@Override
public void onDestroy() {
    super.onDestroy();
    Runtime.getRuntime().gc();      // notify gc to be called asap
}