0

我有一个奇怪的行为,如果 UIAlert 触发(如下面的那个),所有后续的键盘或按下行为都被禁用/无响应。滚动屏幕仍然有效,但任何按钮或键盘按下都不会触发任何操作。

        [[[[UIAlertView alloc] initWithTitle:@"Invalid Address"
                                     message:@"The email address you entered isn't valid. Please check and try again."
                                    delegate:self
                           cancelButtonTitle:@"OK"
                           otherButtonTitles:nil] autorelease] show];

任何人以前经历过这种行为并且可以阐明一些问题吗?或者也许引导我朝着正确的方向进一步调试它以找到根本原因?

谢谢各位!

4

1 回答 1

0

您是否使用过任何 UIAlertView 代表,例如 didDismissWithButtonIndex ?

然后交叉检查委托 UIAlertview 委托方法实现。

别的

只需将委托作为 nil 传递delegate:nil

UIAlertView *alert =  [[UIAlertView alloc] initWithTitle:@"Invalid Address"
                                         message:@"The email address you entered isn't valid. Please check and try again."
                                        delegate:nil
                               cancelButtonTitle:@"OK"
                               otherButtonTitles:nil];
[alert show];
[alert release];
于 2012-11-21T04:56:55.787 回答