2
我的应用得到了崩溃,使输出如下:为什么我的代码崩溃了一些UIWebView异常?
Tried to obtain the web lock from a thread other than the main thread or the web thread. This may be a result of calling to UIKit from a secondary thread. Crashing now...
1 WebThreadLock
2 -[UIWebDocumentView(UIWebDocumentViewTextSelecting) selectionBaseWritingDirection]
3 -[UITextField _resignFirstResponder]
4 -[UIResponder _finishResignFirstResponder]
5 -[UIResponder resignFirstResponder]
6 -[UITextField resignFirstResponder]
7 -[UIView(UITextField) endEditing:]
8 -[UIWindowController _prepareKeyboardForTransition:fromView:]
9 -[UIWindowController transition:fromViewController:toViewController:target:didEndSelector:]
10 -[UIViewController presentViewController:withTransition:completion:]
11 -[UIViewController presentViewController:animated:completion:]
12 -[UIViewController presentModalViewController:animated:]
13 -[studentlogViewController parse]
14 -[NSThread main]
15 __NSThread__main__
16 _pthread_start
17 thread_start
任何人都可以让我知道,我离开了我的心,我没有任何线索,这里发生了什么
很明显,您正在使用的WebView在来往打电话给你的方法后台线程 – 2013-02-11 13:37:19
我没有在我的课堂上使用webview我解析XML数据并显示在文本 – 2013-02-11 13:39:31
看看这里:http://stackoverflow.com/questions/9679754/tried-to-obtain-the-web-锁定线程以外的其他主线程或网页以解决类似问题的答案。您可能需要使用GCD或其他形式的回调,以避免从后台线程调用UIKit方法 – 2013-02-11 13:39:52