我有一种奇怪的行为,如果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];
之前有人经历过这种行为,并且可以解决一些问题吗? 或者可以指导我正确的方向进一步调试以找到根本原因?
谢谢你堆!
答案 0 :(得分:0)
您是否使用过像didDismissWithButtonIndex这样的UIAlertView代理?
然后交叉检查代理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];