---
title: "ipad开发--模态窗口中不能隐藏键盘"
author: "lpluck08"
date: "2012-05-09T11:25:21Z"
tags: []
categories: ["移动开发"]
slug: "ipad"
draft: false
lastmod: "2012-05-09T11:25:21Z"
id: 1518590
url: "https://apluck.iteye.com/blog/1518590"
---

使用resignFirstResponder也不能隐藏键盘，需要实现UIViewController的disablesAutomaticKeyboardDismissal方法，return NO

```
- (BOOL) disablesAutomaticKeyboardDismissal {
    return NO;
}
```