2010-04-03 65 views
2

我正在使用modalPresentationStyle = UIModalPresentationFormSheet将模型视图控制器作为UIViewController呈现。在我看来,我没有几个UITextFields。iPhone OS 3.2(iPad)模态查看问题

我的问题是,当我尝试关闭键盘([textfieldname resignFirstResponder])时,它什么也不做。但是,当我将modalPresentationStyle更改为UIModalPresentationPageSheet时,它工作。

这似乎是一个错误。有没有人遇到类似的问题,并找到解决办法?我可以做任何愚蠢愚蠢的事情吗?

+0

我有同样的问题。我还没有找到一个好的工作。 – MikeN 2010-06-24 20:38:49

回答

1

我跑进与UITextView的同样的问题,我结束了继承的UITextView和压倒一切的resignFirstResponder如下...

- (BOOL)resignFirstResponder{ 
    [super resignFirstResponder]; 
    // For some reason, UITextView doesn't like to give up first responder, ever.... 
    return YES; 
} 

我没有检查,如果这仍然是必要的4.3,但它肯定是需要在某些情况下为3.2。