【发布时间】:2013-09-25 12:52:01
【问题描述】:
我遇到了崩溃:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UIKeyboardTaskQueue performTask:] may only be called from the main thread.'
我 2 天都找不到解决方案。 这是代码:
[alert dismissWithClickedButtonIndex:0 animated:YES];
UIAlertView *noTicketAlert = [[UIAlertView alloc] initWithTitle:@"Aradığınız kriterlere uygun bilet bulunamadı!" message:nil delegate:self cancelButtonTitle:@"Tamam" otherButtonTitles: nil];
[noTicketAlert show];
【问题讨论】:
-
愿意向我们展示您的警报视图代码吗?
-
这应该在 Xcode 4 和 Xcode 3 中崩溃了。
-
我认为错误信息不会更明确。
-
它是 xcode 5,程序正在运行 xcode 3 和 4。我尝试将我的应用程序升级为 ios7,但 uialertview 使我的应用程序崩溃
-
您似乎正在使用两个警报实例。能给个完整的代码吗?
标签: ios7 uialertview